[R] Creating dataframe names on the fly?

2009-03-20 Thread science!

I am aware that it is easily possible to create var names on the fly. e.g.
assign(paste("m",i,sep=""),j)
but is it possible to assign dataframes to variables created on the fly?

e.g. 
If I have a dataframe called master and I wanted to subset parts of those
data into separate dataframes, I could do:

m1=subset(master,master$SAMPLE=='1')
m2=subset(master,master$SAMPLE=='2')
.

but I would like to do this in a loop. Can someone give me suggestions on
how to accomplish this?


I tried assign(paste("m",i,sep=""),subset(master,master$SAMPLE==i) with no
success.


thanks! 

-- 
View this message in context: 
http://www.nabble.com/Creating-dataframe-names-on-the-fly--tp22631171p22631171.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


[R] memory corruption in R

2014-08-04 Thread cosmos science
HI...

I am using R-package CORElearn (
http://cran.r-project.org/web/packages/CORElearn/index.html).

During its application on a dataset, It crashed. The crash message says
*** glibc detected *** /usr/local/lib64/R/bin/exec/R: malloc(): memory
corruption: 0x4b9b0788 ***

The error log "cdump.dat" is attached.

I am using R-3.1.1 and CORElearn version is 0.9.43
May I know where is the problem?

Regards
Mridul
__
R-help@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.


Re: [R] memory corruption in R

2014-08-04 Thread cosmos science
The CORElearn crashed when I used a test file of 100MB for the analysis.
However, it was difficult to send this big file to the developer, so I sent
a smaller test file ( ~40MB) to the developer. With this file, the
CORElearn did not crash.

So, now I am now running the code with the same (~40MB) test file to see it
again crashes. It will take sometime to finish.



On Mon, Aug 4, 2014 at 1:18 PM, cosmos science 
wrote:

> HI...
>
> I am using R-package CORElearn (
> http://cran.r-project.org/web/packages/CORElearn/index.html).
>
> During its application on a dataset, It crashed. The crash message says
> *** glibc detected *** /usr/local/lib64/R/bin/exec/R: malloc(): memory
> corruption: 0x4b9b0788 ***
>
> The error log "cdump.dat" is attached.
>
> I am using R-3.1.1 and CORElearn version is 0.9.43
> May I know where is the problem?
>
> Regards
> Mridul
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] memory corruption in R

2014-08-04 Thread cosmos science
 08:01 6292232
/usr/lib64/gconv/ISO8859-1.so
7fd246aef000-7fd246cee000 ---p 2000 08:01 6292232
/usr/lib64/gconv/ISO8859-1.so
7fd246cee000-7fd246cef000 r--p 1000 08:01 6292232
/usr/lib64/gconv/ISO8859-1.so
7fd246cef000-7fd246cf rw-p 2000 08:01 6292232
/usr/lib64/gconv/ISO8859-1.so
7fd246cf-7fd246df9000 rw-p  00:00 0
7fd246df9000-7fd246e0 r-xp  08:01 2624191
/usr/local/lib64/R/library/methods/libs/methods.so
7fd246e0-7fd24700 ---p 7000 08:01 2624191
/usr/local/lib64/R/library/methods/libs/methods.so
7fd24700-7fd247001000 rw-p 7000 08:01 2624191
/usr/local/lib64/R/library/methods/libs/methods.so
7fd247001000-7fd24700a000 r-xp  08:01 2104542
/usr/local/lib64/R/library/utils/libs/utils.so
7fd24700a000-7fd24720a000 ---p 9000 08:01 2104542
/usr/local/lib64/R/library/utils/libs/utils.so
7fd24720a000-7fd24720b000 rw-p 9000 08:01 2104542
/usr/local/lib64/R/library/utils/libs/utils.so
7fd24720b000-7fd2472b2000 rw-p  00:00 0
7fd2472b2000-7fd2472be000 r-xp  08:01 6161012
/usr/lib64/libnss_files-2.15.so
7fd2472be000-7fd2474bd000 ---p c000 08:01 6161012
/usr/lib64/libnss_files-2.15.so
7fd2474bd000-7fd2474be000 r--p b000 08:01 6161012
/usr/lib64/libnss_files-2.15.so
7fd2474be000-7fd2474bf000 rw-p c000 08:01 6161012
/usr/lib64/libnss_files-2.15.so
7fd2474de000-7fd2474e5000 r--s  08:01 6299914
/usr/lib64/gconv/gconv-modules.cache
7fd2474e5000-7fd247596000 rw-p  00:00 0
7fd2475b4000-7fd2475c8000 r--p  08:01 5716
/usr/share/fonts/default/Type1/n019003l.pfb
7fd2475c8000-7fd2475c9000 r--s  08:01 533587
/var/cache/fontconfig/87f5e051180a7a75f16eb6fe7dbd3749-le64.cache-3
7fd2475c9000-7fd2475d2000 r--s  08:01 525846
/var/cache/fontconfig/b79f3aaa7d385a141ab53ec885cc22a8-le64.cache-3
7fd2475d2000-7fd2475d5000 r--s  08:01 534865
/var/cache/fontconfig/0b1bcc92b4d25cc154d77dafe3bceaa0-le64.cache-3
7fd2475d5000-7fd2475d7000 r--s  08:01 534856
/var/cache/fontconfig/2e1514a9fdd499050989183bb65136db-le64.cache-3
7fd2475d7000-7fd2475d9000 r--s  08:01 533612
/var/cache/fontconfig/3f821257dd33660ba7bbb45c32deb84c-le64.cache-3
7fd2475d9000-7fd2475db000 r--s  08:01 533611
/var/cache/fontconfig/830f035fa84a65ce80e050178dbb630d-le64.cache-3
7fd2475db000-7fd2475dc000 r--s  08:01 533610
/var/cache/fontconfig/81a173283b451552b599cfaafd6236bd-le64.cache-3
7fd2475dc000-7fd2475dd000 r--s  08:01 533609
/var/cache/fontconfig/ac68f755438cc3dc5a526084839fc7ca-le64.cache-3
7fd2475dd000-7fd2475de000 r--s  08:01 533608
/var/cache/fontconfig/12513961c6e7090f8648812f9eaf65d6-le64.cache-3
7fd2475de000-7fd2475df000 r--s  08:01 533607
/var/cache/fontconfig/c25f174be0e642a5b89dcf759df7168e-le64.cache-3Aborted
(core dumped)




On Mon, Aug 4, 2014 at 1:49 PM, cosmos science 
wrote:

> The CORElearn crashed when I used a test file of 100MB for the analysis.
> However, it was difficult to send this big file to the developer, so I sent
> a smaller test file ( ~40MB) to the developer. With this file, the
> CORElearn did not crash.
>
> So, now I am now running the code with the same (~40MB) test file to see
> it again crashes. It will take sometime to finish.
>
>
>
> On Mon, Aug 4, 2014 at 1:18 PM, cosmos science 
> wrote:
>
>> HI...
>>
>> I am using R-package CORElearn (
>> http://cran.r-project.org/web/packages/CORElearn/index.html).
>>
>> During its application on a dataset, It crashed. The crash message says
>> *** glibc detected *** /usr/local/lib64/R/bin/exec/R: malloc(): memory
>> corruption: 0x4b9b0788 ***
>>
>> The error log "cdump.dat" is attached.
>>
>> I am using R-3.1.1 and CORElearn version is 0.9.43
>> May I know where is the problem?
>>
>> Regards
>> Mridul
>>
>
>

[[alternative HTML version deleted]]

__
R-help@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.


[R] Error while using rfImpute

2009-05-08 Thread cosmos science
Dear Administrator,

I am using linux (suse 10.2). While attempting rfImpute, I am getting the
following error message:

> Members <- rfImpute(Status ~ ., data = Members)

Error in .C("classRF", x = x, xdim = as.integer(c(p, n)), y =
as.integer(y),  :
  C symbol name "classRF" not in DLL for package "randomForest".

I need the help to sort out above error.

Thanks a lot
Regards
Mradul

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] RStudio 1.1.453 - Windows 10 - How to subset named vector by names that are NOT "foo"

2018-07-31 Thread Data Science Classes
You can do

Vect[-grep (“foo”, names(vect))]

On Tue, 31 Jul 2018 at 11:12 PM, إبراهيم خطاب Ibrauheem Khat'taub <
barhomopo...@gmail.com> wrote:

> H
> i All,
>
> If I have this vector:
>
> > vect <- c(foo = 11, bar = 2, norf = 45)
>
> I can have a subset that has only "bar and "norf" this way:
> > vect[c("bar","norf")]
>
> Now how do I achieve the same by asking it for a subset that simply
> excludes "foo"? I tried all these, resulting in errors:
>
> vect[-"foo"]
> vect[-c("foo")]
> vect[!"foo"]
> vect[!c("foo")]
>
> Thanks!
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
-- 
Regards,
Data Science Classes

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.