[R] noob requesting help

Rui Barradas ruipbarradas at sapo.pt
Sun Jun 17 10:25:14 CEST 2012


Hello,

It's stringsAsFactors = FALSE, just one '='.

Your data structure, a list, seems to have elements, vectors, of the 
same lengths, all of them are of length 34773. You can check it with

sapply(dat, length)

It should return 4 times the value 34773. If so, there's no reason for 
David's sugestion not to work. If it does work, use dput() now, after 
converting 'dat' to a data.frame. (We still don't have a data example.)

Good luck, hope it works this time,

Rui Barradas

Em 16-06-2012 19:56, capital_P escreveu:
>
> David Winsemius wrote
>>
>>> Try
>>>
>>> dat2 <- data.frame(do.call(cbind, dat), stringsAsFactors=FALSE)
>>
>> Use instead:
>>
>> dat2 <- data.frame( dat, stringsAsFactors=FALSE)
>>
>
> Both do not seem to work:
>
>> dat2 <- data.frame(do.call(cbind, dat), stringsAsFactors=FALSE)
> Error: cannot allocate vector of size 136 Kb
> In addition: Warning messages:
> 1: In function (..., deparse.level = 1)  :
>    number of rows of result is not a multiple of vector length (arg 3)
> 2: In structure(list(message = as.character(message), call = call),  :
>    Reached total allocation of 2047Mb: see help(memory.size)
> 3: In structure(list(message = as.character(message), call = call),  :
>    Reached total allocation of 2047Mb: see help(memory.size)
>
>
>
>> dat2 <- data.frame(dat, stringsAsFactors == FALSE)
> Error in data.frame(dat, stringsAsFactors == FALSE) :
>    object 'stringsAsFactors' not found
>
> I do feel like this is going in the right direction. Thanks for your help so
> far.
>
> --
> View this message in context: http://r.789695.n4.nabble.com/noob-requesting-help-tp4632803p4633607.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list