diff --git a/.RData b/.RData index 0f4ce26..7ffebb1 100644 Binary files a/.RData and b/.RData differ diff --git a/.Rhistory b/.Rhistory index 7347a31..5771aeb 100644 --- a/.Rhistory +++ b/.Rhistory @@ -114,3 +114,33 @@ head(mtcars) q() s q() +mtcars[[[9]] +mtcars[[9]] +mtcars[["am]] +mtcars[["am"]] +mtcars$am +mtcars[1] +head(mtcars[1]) +mtcars["mpg"] +mtcars[c("mpg", "hp")] +mtcars[c("mpg", "hp")][1] +mtcars[c("mpg", "hp")][[1]] +mtcars[24,] +mtcars["Camaro Z28",] +mtcars[c("Datsun 710", "Camaro Z28")] +mtcars[c("Datsun 710", "Camaro Z28",)] +mtcars[c("Datsun 710", "Camaro Z28"),] +L = mtcars$am == 0 +L +mtcars[L,] +mtcars[L,] +mtcars[L,]$mpg +library(gdata) +library(foreign) +help(read.mtp) +mydata = read.table("mydata.txt") +mydata +mydata = read.csv("mydata.csv") +mydata +getwd() +q() diff --git a/mydata.csv b/mydata.csv new file mode 100644 index 0000000..05ab2ef --- /dev/null +++ b/mydata.csv @@ -0,0 +1,4 @@ +Col1,Col2,Col3 +100,a1,b1 +200,a2,b2 +300,a3,b3 diff --git a/mydata.txt b/mydata.txt new file mode 100644 index 0000000..018793a --- /dev/null +++ b/mydata.txt @@ -0,0 +1,4 @@ +100 a1 b1 +200 a2 b2 +300 a3 b3 +400 a4 b4