search for: ruiyang

Displaying 3 results from an estimated 3 matches for "ruiyang".

2017 Nov 15
2
Converting a string to variable names
...haracter(test_sample),sep="")))[,1] + } This would not work probably because x is simply a name instead of a data.frame variable(Error: "attempt to set 'rownames' on an object with no dimensions"). But I could not find the right way out? How should I solve it? Thanks! Ruiyang > On Nov 14, 2017, at 4:39 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > > Hi Ruiyang, > I think you want "get": > > For (index in seq(1,16)){ > plot(x=(a given set of value),y=get(paste(?PC?,as.character(index),sep=??))) > } > > On Wed, Nov 15,...
2017 Nov 14
2
Converting a string to variable names
...de like this: For (index in seq(1,16)){ plot(x=(a given set of value),y=paste(?PC?,as.character(index),sep=??) } But this would not work because y is assigned a string instead of the variable names. So how could I assign y with a variable name instead of a string? Your reply would be appreciated! Ruiyang Liu
2017 Nov 14
0
Converting a string to variable names
Hi Ruiyang, I think you want "get": For (index in seq(1,16)){ plot(x=(a given set of value),y=get(paste(?PC?,as.character(index),sep=??))) } On Wed, Nov 15, 2017 at 7:43 AM, ??? <ruiyangliu94 at gmail.com> wrote: > Hi, > Suppose that I want to do a series of plots with the y value for...