search for: icfpcontest

Displaying 1 result from an estimated 1 matches for "icfpcontest".

2008 Mar 15
0
Appending new values to an existing factor vector
...memory issues will still be present if I do that. What I'd like is a way to read in, say, a million lines at a time, do the factor conversion, then append to my existing data frame, which has columns of factors. However, something I came across while participating in the ICFP 2007 (http://www.icfpcontest.org/) using R was the strange behaviour when adding new/unknown values to a factor vector: > (a <- factor(c("I","C","I","C","F","I"))) [1] I C I C F I Levels: C F I > append(a,"P") [1] "3" "1" "...