[R] Vector with factors inside lists/tuples
Håvard Wahl Kongsgård
haavard.kongsgaard at gmail.com
Sat Jun 25 20:13:11 CEST 2011
Hi, sorry my question was not really clear
|Are you very early in efforts at learning R?
No, have been a long term user of R, but only use R for the statistical stuff.
The heart of the issue is that I have list of keywords that I want to
analyse with a machine learning algorithm (20 000 keywords with a
response variables). It's much like "micro" array data, but in my case
it's not "genes", but instead keywords. To get it to work in R, I
could create a data frame with multiple vectors containing different
factors.
That would look like this
V1, V2,
"Harry", "Kline"
"Brown", "Larry"
If I am not mistaken if I used V1 and V2 with the standard GLM
function the result would be like
glm( V0 ~ "HARRY" + "KLINE" + "Brown" + "Larry")
Or I could create a complex ordered array where keywords are
represented 1 and 0.
If I used that in GLM I would get the same result with glm?
But is there a better approach?
-Håvard
More information about the R-help
mailing list