Displaying 1 result from an estimated 1 matches for "junkarea".
2011 Jan 01
3
Retrieving Factors with Levels Ordered
...ata frame and save it. (I want a text file.)
testdf <- data.frame(feducord)
str(testdf)
'data.frame': 1001 obs. of 1 variable:
$ feducord: Ord.factor w/ 7 levels "Elem"<"Mid"<"HS"<..:
5 6 5 7 3 4 3 3 3 5 ...
write.table(testdf, file = 'Junkarea/test.txt')
# So far, so good.
rm(testdf, feducord)
# Go away.
# Come back later to retrieve the data.
testdf <- read.table(file = 'Junkarea/test.txt')
# But levels are no longer ordered
str(testdf)
'data.frame': 1001 obs. of 1 variable:
$ feducord: Factor w/ 7 level...