Displaying 2 results from an estimated 2 matches for "q1_4".
Did you mean:
q14
2013 Feb 21
3
Having trouble converting a dataframe of character vectors to factors
...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 for reproducibility:
scs2<-structure(list(Q1_1...
2003 Jan 02
2
--copy-unsafe-links, links preserved in source tree or local directory?
...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 -> ../../test/qw.F
Test/Q2:
total 0
-rw-rw-r-- 1 olsen olsen 0 Jan 2 14:06 q2_1
-rw-rw-r-- 1 olsen olsen 0 Jan 2 14:06 q2_2
lrwxrwxrwx 1 olsen olsen 4 J...