Try this:
> input <- textConnection("var1 a
+ var2 b
+ var3 c
+ var4 d
+ var5 e")
> x <- read.table(input, as.is = TRUE)
> close(input)
> # create a list
> xList <- as.list(x$V2)
> names(xList) <- x$V1
> xList
$var1
[1] "a"
$var2
[1] "b"
$var3
[1] "c"
$var4
[1] "d"
$var5
[1] "e"
>
On Tue, N
Try this:
as.list(scan("your_txt_file"))
On Tue, Nov 23, 2010 at 3:05 PM, Guido Leoni wrote:
> Dear List I'm a newbie R user.
> I'm utilizing the list function in order to make a var like this:
> clusters<-list(a=var1,b=var2) My problem is that the total numer of
> variables that I need to
Dear List I'm a newbie R user.
I'm utilizing the list function in order to make a var like this:
clusters<-list(a=var1,b=var2) My problem is that the total numer of
variables that I need to include in my list is up to 200. I've the text
string with the complete list of my variables but is too l
3 matches
Mail list logo