I think you need to spend some time with an R tutorial or two to learn
how to handle such basics yourself.
However, if I understand correctly, probably the easiest way to do it
is by converting a matrix of 0's to a data frame -- which you
shouldn't do at all if you can do your analysis directly wi
> On Apr 4, 2016, at 9:22 AM, Janszen, Derek
> wrote:
>
> Hi,
>
> I want to create a data frame similar to the following, but greatly scaled up:
> df <- data.frame(aaa= c("a","b","c"), integer(3), integer(3))
> names(df)[2:3] <- paste("var",1:2,sep="")
> which yields
> aaa var1 var2
> 1 a
Hi,
I want to create a data frame similar to the following, but greatly scaled up:
df <- data.frame(aaa= c("a","b","c"), integer(3), integer(3))
names(df)[2:3] <- paste("var",1:2,sep="")
which yields
aaa var1 var2
1 a 0 0
2 b 0 0
3 c 0 0
I would not relish having
3 matches
Mail list logo