[R] R Large Dataset Problem
Rainer M Krug
r.m.krug at gmail.com
Fri Apr 13 14:47:48 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 13/04/12 14:20, Milan Bouchet-Valat wrote:
> Le vendredi 13 avril 2012 à 04:32 -0700, efulas a écrit :
>> Dear All,
>>
>> I have a problem with my data. First problem is that my data is really large and R is
>> omitting some columns from my data. Is there any way to read the whole data without
>> omitting.
> How did you import it? Please be precise.
>
>> Another problem is that my data have 102k columns and each column have active or inactive
>> molecules. The data is like below
>>
>> Molecul id
>>
>> 129876 1010101110011110011110011100111100110.......... 234532
>> 1010101110011110011110011100111100110.......... 123678
>> 1010101110011110011110011100111100110.......... . . . . (102k values)
>>
>>
>> When i read the data in R. R define my rows as a "Inf" because R read it as a one number. I
>> want them to be seperated like "1 0 1 0" . Is there anyway to do this in R?
> See ?read.fwf. If you still have problems loading your data, feel free to ask again on specific
> issues.
You could also read them in so that the 1 and 0 are in one field and specify that this column is a
character, and then use strsplit() to split them up:
> x <- "1010101110011110011110011100111100110" strsplit(x, split="")
[[1]]
[1] "1" "0" "1" "0" "1" "0" "1" "1" "1" "0" "0" "1" "1" "1" "1" "0" "0" "1" "1"
[20] "1" "1" "0" "0" "1" "1" "1" "0" "0" "1" "1" "1" "1" "0" "0" "1" "1" "0"
Cheers,
Rainer
>
>
> Regards
>
> ______________________________________________ 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.
- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys.
(Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer at krugs.de
Skype: RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk+IIHQACgkQoYgNqgF2egoC5gCfb86H8KCMryM3zhvWPm3ejeIr
qDcAni5hTezs9rfJGKq0c6fE8pnltpYS
=wd+P
-----END PGP SIGNATURE-----
More information about the R-help
mailing list