Alexy Khrabrov wrote:
> On Nov 24, 2007, at 2:07 PM, Chuck Cleland wrote:
>
>
>> with(d, split(word, kind))
>>
>> # OR
>>
>> with(d, split(as.character(word), kind))
>>
>
> Awesome! Scoping: how do I get the result back to the top level?
>
> > with(d, wk <- split(word,kind))
> > wk
> Err
Alexy Khrabrov wrote:
> On Nov 24, 2007, at 2:07 PM, Chuck Cleland wrote:
>
>> with(d, split(word, kind))
>>
>> # OR
>>
>> with(d, split(as.character(word), kind))
>
> Awesome! Scoping: how do I get the result back to the top level?
>
> > with(d, wk <- split(word,kind))
> > wk
> Error: object
On Nov 24, 2007, at 2:07 PM, Chuck Cleland wrote:
> with(d, split(word, kind))
>
> # OR
>
> with(d, split(as.character(word), kind))
Awesome! Scoping: how do I get the result back to the top level?
> with(d, wk <- split(word,kind))
> wk
Error: object "wk" not found
-- trying to create it at
Alexy Khrabrov wrote:
> I wonder what's the right way in R to do the following -- placing
> objects of the same kind together in subarrays of varying length.
> Here's what I mean:
>
> > word <- c("a","b","c","d","e","f","g","h","i","j")
> > kind <- c(1,1,1,2,3,4,5,5,7,7)
> > d <- data.fram
I wonder what's the right way in R to do the following -- placing
objects of the same kind together in subarrays of varying length.
Here's what I mean:
> word <- c("a","b","c","d","e","f","g","h","i","j")
> kind <- c(1,1,1,2,3,4,5,5,7,7)
> d <- data.frame(word,kind)
> d
word kind
1
5 matches
Mail list logo