Q:

converting from dataframe to list introduces factors

I have a dataframe which i need to convert from, df:
group      ID
1     23143
1      7273
1      5578
3     10982
2      9722
3     26994
2      6497
..     ...

to a list like:
$C1
 [1] "23143" "7273" "5578"
$C2
 [1] "9722" "6497"
$C3
 [1] "10982" "26994"

I can do this by:
list <- split.data.frame(df,df$group)
list <-lapply(ss,"[[","ID)

but this introduces factors for the ID values, how can i convert this list into characters?

A:

Start by running your code with options(stringsAsFactors=FALSE) to prevent strings from being automatically turned into factors. With that said, the example data you gave doesn't result in strings anyway, so I'm not sure if maybe your actual data is different.
Your data:
df <- data.frame(group=c(1,1,1,3,2,3,2),
                 ID=c(23143,7273,5587,10982,9722,26994,6497))

newlist <- split.data.frame(df,df$group)
newlist <-lapply(newlist,`[[`,"ID")

class(newlist[[1]])

[1] "numeric"

Some string data:
df2 <- data.frame(group=c(1,1,1,3,2,3,2),
                 ID=c("Joe","Sam","Rod","Mike","Steny","Larry","Chris"))

newlist2 <- split.data.frame(df2,df2$group)
newlist2 <-lapply(newlist2,`[[`,"ID")

class(newlist2[[1]])

[1] "factor"

With options set:
options(stringsAsFactors=FALSE)
df3 <- data.frame(group=c(1,1,1,3,2,3,2),
                  ID=c("Joe","Sam","Rod","Mike","Steny","Larry","Chris"))

newlist3<- split.data.frame(df3,df3$group)
newlist3 <-lapply(newlist3,`[[`,"ID")

class(newlist3[[1]])

[1] "character"

