When I use id <- read.csv(file.choose(), header=T) I get an error in the next thing that I want to do:
> filtered <- data_rs146217251[id,]
Error in data_rs146217251[id, ] : invalid subscript type 'list'
I want to import the .csv column exactly as this:
> id <- c("4428814_4428814", "3490518_3490518", "3094358_3094358")
> id
[1] "4428814_4428814" "3490518_3490518"
[3] "3094358_3094358"
So that I can run this:
> filtered <- data_rs146217251[id,]
> filtered
g=0 g=1 g=2
4428814_4428814 0 0 1
3490518_3490518 0 0 1
3094358_3094358 0 0 1
How do I import the .csv column in a format that would be precisely in the same form as the c() function, as in id <- c("4428814_4428814", "3490518_3490518", "3094358_3094358"), rather than the list that read.csv() gives?