Displaying 2 results from an estimated 2 matches for "q1_1".
Did you mean:
q11
2013 Feb 21
3
Having trouble converting a dataframe of character vectors to factors
...s2,function(x) as.factor(x))
After doing either of above I end up with
>str(scs2)
chr [1:10, 1:10] "very important" "very important" "very important" "very important" ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:10] "Q1_1" "Q1_2" "Q1_3" "Q1_4" ...
>class(scs2)
"matrix"
But when I do it one at a time it works:
scs2$Q1_1<-as.factor(scs2$Q1_1)
scs2$Q1_2<- as.factor(scs2$Q1_2)
What am I doing wrong? How do I accomplish this with sapply or similar function?
Data...
2003 Jan 02
2
--copy-unsafe-links, links preserved in source tree or local directory?
...outside of the 'parent source tree'
('Test' in the example below) would be copied as files.
rsyc-2.5.4 on RedHat-7.3 i386, XFS filesystem
Thanks,
Seth
olsen@gps.caltech.edu
example:
chump0:~> ll Test/*
Test/Q1:
total 0
-rw-rw-r-- 1 olsen olsen 0 Jan 2 14:05 q1_1
-rw-rw-r-- 1 olsen olsen 0 Jan 2 14:05 q1_2
lrwxrwxrwx 1 olsen olsen 4 Jan 2 14:06 q1_3 -> q1_2
lrwxrwxrwx 1 olsen olsen 24 Jan 2 14:09 q1_4 -> /home/olsen/Test/Q2/q2_1
lrwxrwxrwx 1 olsen olsen 15 Jan 2 14:42 q1_5 -> ../../...