[R] Referencing a component of a large object (Error: slot NULL)

2015-08-28 Thread Andrea Lamont
) does not work. I get an error that reads Error: trying to get slot "variables" from an object of a basic class ("NULL") with no slots I am happy to send reproducible code, however, I obtain this object through the package 'mi' and is computationally intensive. I'

[R] Referencing a component of a large object (Error: slot NULL)

2015-08-28 Thread Andrea Lamont
I am running a simulation and need to refer to a matrix of parameters from a large object. Here is a snippet of the object structure itself: Formal class 'mi' [package "mi"] with 3 slots ..@ call : language .local(y = y, n.chains = ..2, max.minutes = 2) ..@ data :List of 100

[R] set.cor/mat.regress

2015-01-07 Thread Andrea Lamont
is that the subscript not being bound. I tried other options like square=FALSE to no avail. It seems like such a straightforward function, I'm not sure what I'm doing wrong. Any help is appreciated. Thanks Andrea -- Andrea Lamont, PhD Post-Doctoral Fellow University of South

[R] if, apply, ifelse

2013-11-27 Thread Andrea Lamont
Hello: This seems like an obvious question, but I am having trouble answering it. I am new to R, so I apologize if its too simple to be posting. I have searched for solutions to no avail. I have data that I am trying to set up for further analysis ("training data"). What I need is 12 groups based

[R] ifelse, apply, if

2013-11-27 Thread Andrea Lamont
rraw)|d$C12AW1rraw==0)),777899, 0))) Any ideas on how to approach this efficiently? Thanks, Andrea -- Andrea Lamont, MA Clinical-Community Psychology University of South Carolina Barnwell College Columbia, SC 29208 Please consider the environment before printing this email. CONFIDENTIAL:

Re: [R] FW: Transposing the output of 'table'

2013-10-06 Thread Andrea Lamont
gt; > __ > 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] pulling out coefficients

2013-09-23 Thread Andrea Lamont
h no avail. Thoughts on how to use a loop to call coefficients? Thanks, -- Andrea Lamont, MA Clinical-Community Psychology University of South Carolina Barnwell College Columbia, SC 29208 Please consider the environment before printing this email. CONFIDENTIAL: This transmission is intended for the

[R] multiple core

2013-08-20 Thread Andrea Lamont
is a multicore and parallel package, but I am not understanding how to use these packages. Is there a straightforward way to tell R to use more than one processor? In my search, I found this: Sys.setenv(MC_CORES=12) but am unsure what it does... Thanks! Andrea -- Andrea Lamont, MA Clinical-Comm

Re: [R] flexible approach to subsetting data

2013-07-24 Thread Andrea Lamont
rection="long", v.names=c("dose", "resp"), > varying=list(dose=grepl("dose", names(df5)), > resp=grepl("resp", names(df5)) ) > ) > > - > David L Carlson > Associate Prof

Re: [R] flexible approach to subsetting data

2013-07-24 Thread Andrea Lamont
50 2 5 1 5 3 5 > > -- > David. > > > --------- > > David L Carlson > > Associate Professor of Anthropology > > Texas A&M University > > College Station, TX 77840-4352 > > > >

[R] flexible approach to subsetting data

2013-07-23 Thread Andrea Lamont
lumns and edits each time 'm' changes. Is there a flexible way to approach this? I'm inclined to use a for loop, but know that 1) this is generally inefficient and 2) am having trouble with the coding regardless. Any suggestions are appreciated. Thanks, Andrea -- Andrea Lamont, M