I'm trying to create a variable out of a single point in 5 different data tables.
ie. I have data for mental disorders for each year in seperate CSV files. How do I track just one variable (eg Autism) in each file and put it into one variable?
Here is what I have so far:
d2000 <- read.table("C:/AL00.csv")
d2001 <- read.table("C:/AL01.csv")
d2002 <- read.table("C:/AL02.csv")
d2003 <- read.table("C:/AL03.csv")
rownames(d2000) <- d2000[,3]
rownames(d2001) <- d2001[,3]
rownames(d2002) <- d2002[,3]
rownames(d2003) <- d2003[,3]
ASD = c(d2000["Autism","Total"],d2001["Autism","Total"],d2002["Autism","Total"])
This isn't working. I tried typing in just one of the data points:
>d2000["Autism","Total"]
[1] 2,763
Levels: 1,075 1,480 2,763
It outputs the correct number, but what are these "Levels"? Are they my problem, if so, how would I fix?