Skip to content

Substitute list value

8 messages · Charles Stangor, michael.weylandt at gmail.com (R. Michael Weylandt, Jessica Streicher +2 more

It should. Reproducible example of it not?

Michael
On Jul 11, 2012, at 3:06 PM, Charles Stangor <cstangor at gmail.com> wrote:

            
1 day later
#
two things:

- R always counts from 1, not from 0
- listmembers are accessed by using [[ ]] , not [ ]

try 

t1[t==ll[[1]], "v"] <- 99

greetings Jessi
On 11.07.2012, at 15:47, Charles Stangor wrote:

            
#
On 13/07/2012 9:50 AM, Bert Gunter wrote:
I think Jessica was right, and clear.  List members are accessed using 
[[ ]].  Lists are subsetted using [ ].  Your first example extracts the 
second member of x.  Your second example constructs a new list with a 
subset of the members that are in x.

Duncan Murdoch