Displaying 20 results from an estimated 10000 matches similar to: "About name of list elements"
2013 Apr 27
2
Polynomial Regression and NA coefficients in R
Hey all,
I'm performing polynomial regression. I'm simulating x values using runif() and y values using a deterministic function of x and rnorm().
When I perform polynomial regression like this:
fit_poly <- lm(y ~ poly(x,11,raw = TRUE))
I get some NA coefficients. I think this is due to the high correlation between say x and x^2 if x is distributed uniformly on the unit interval
2014 Aug 07
2
How to (appropropriately) use require in a package?
Dear All,
What is the preferred way for Package A, to initialize a cluster, and load
Package B on all nodes?
I am writing a package that parallelizes some functions through the use of
a cluster if useRs are on a Windows machine (using parLapply and family).
I also make use of another package in some of my code, so it is necessary
to load the required packages on each slave once the cluster is
2013 Sep 21
1
Translating recoding syntax from SPSS to R
Colleagues,
I am in the process of learning R. I've been able to import my dataset (from Stata) and do some simple coding. I have now come to coding situation that requires some assistance. This is some code in SPSS that I would like to be able to execute in R:
if (race eq 1 and usborn=0) confused=1 .
if (race eq 2 and usborn=0) confused=1 .
if (race eq 1 and usborn=1) confused=0 .
if (race
2015 Oct 08
1
Unexpected failure when calling new() with unnamed arg and
>>>>> Joshua Wiley <jwiley.psych at gmail.com>
>>>>> on Thu, 8 Oct 2015 12:19:16 +1100 writes:
> Hi, I realize this is an old thread, but just wondering
> whether a conclusion was ever reached on this issue? I'm
> using formula(NULL) but it would be nice if default
> initialization worked for formula classes as well.
Well,
2013 Apr 30
1
Mixed Modeling in lme4
Hi All,
I am trying to shift from running mixed models in SAS using PROC MIXED
to using lme4 package in R. In trying to match the coefficients of R
output to that of SAS output, I came across this problem.
The dataset I am using is this one:
http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect034.htm
If I run the following code:
proc mixed data=rc
2003 Sep 27
1
pdb_mysql question...
Hello everybody,
First of all, congratulations on samba 3.0 :o)
Iam trying to install samba 3.0 with pdb_mysql support though im getting some trouble i cant understand.
After reading the output of ./configure --help, i used the following configure args:
./configure --with-expsam=xml,mysql --with-pam --with-pam_smbpass
make
make install
then i took a look at ./examples/pdb/mysql/smb.conf and:
2013 Jan 08
1
Problem getting loess tricubic weights
Hi
I am trying to get the tricube weights from the loess outputs as I need to
calculate an error function which requires the weight.
So I have used the following example from the R:
cars.lo <- loess(dist ~ speed, cars, span=0.5, degree=1, family="symmetric")
Then i try to get the weights:
cars.lo$weights
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2015 May 13
2
Unexpected failure when calling new() with unnamed arg and
Thanks Martin for looking into this. H.
On 05/13/2015 03:57 AM, Martin Maechler wrote:
>>>>>> Herv? Pag?s <hpages at fredhutch.org>
>>>>>> on Tue, 12 May 2015 15:18:42 -0700 writes:
>
>> Hi,
>
>> The man page for new() suggests that if 'a' is an object with slots
>> "slot1" and "slot2" and C is a
2013 Mar 25
2
ifelse can't return a list? Please explain (R-2.15.3)
I hope you are doing well.
For me, this was an unexpected problem. I've hoped for quite a few
wrong things today, but I'm only asking you about this one. Why does
ifelse(1, list(a, b, c), list(x, y, z))
return a list with only a, not list(a, b, c) as I hoped. I wish it
would either
cause an error or return the whole list, not just the first thing.
Working example:
> x <- 1
>
2013 Mar 26
2
GAM model with interactions between continuous variables and factors
Hi all,
I am not sure how to handle interactions with categorical predictors in the
GAM models. For example what is the different between these bellow two
models. Tests are indicating that they are different but their predictions
are essentially the same.
Thanks a bunch,
> gam.1 <- gam(mortality.under.2~ maternal_age_c+ I(maternal_age_c^2)+
+ s(birth_year,by=wealth) +
+
2014 Apr 03
1
summary of lme4.0 model in package
Dear all,
My package has Depends: lme4.0 in the DESCRIPTION. I need to extract the fixed effect of a model and their standard errors. I use coef(summary(model)) inside a function to do that. Model is the output of a call to glmer() from the lme4.0 package.
coef(summary(model)) throws an error: $ operator is invalid for atomic vectors
I have tracked it down to a problem with summary(model)
2013 Apr 21
2
double exponential regression R
Hello all!
I have a problem with a double exponential equation.
This are my data's> structure(list(proc = c(1870.52067384719,
766.789388745793, 358.701545859122, 237.113777545511, 43.2726259059654,
148.985133316262, 92.6242882655781, 88.4521557193262, 56.6404686159112,
27.0374477259404, 34.3347291080268, 18.3226992991316, 15.2196612445747,
5.31600719692165, 16.7015717397302,
2013 Oct 05
3
trying to compile R in win 7 (with Rtools)
hello all,
I am trying to compile the R in Win7
and compiles one small part
but the script don't move from the 'base' directory to 'stats'
I installed the Rtools likee administrator
and call the terminal (MS-DOS) like administrator too.
if somebody can tell me any tips, I thank in advanced
cleber
#############################################
File LOG
2013 Apr 04
5
Help for bootstrapping‏
I have a set of data for US t-bill returns and US stock returns frm 1980-2012. I am trying to bootstrap the data and obtain the minimum variance portfolio and repeat this portfolio 1000 times. However I am unable to get the correct code function for the minimum variance portfolio. When I tried to enter Opt(OriData+1, 1, 5, 0), I get "error:subscript out of bounds" Please help!
2009 Jan 13
3
Comparing elements for equality
Suppose I have a dataframe as follows:
dat <- data.frame(id = c(1,1,2,2,2), var1 = c(10,10,20,20,25), var2 =
c('foo', 'foo', 'foo', 'foobar', 'foo'))
Now, if I were to subset by id, such as:
> subset(dat, id==1)
id var1 var2
1 1 10 foo
2 1 10 foo
I can see that the elements in var1 are exactly the same and the
elements in var2 are exactly
2017 Aug 17
2
autocreate deprecated q
I'm getting "autocreate plugin is deprecated"
I've removed 1) but still see error
am I correct I don't need default IMAP folders in dovecot.conf as they
come from 15-mailboxes.conf ?
# grep autocreate dovecot.conf
lda_mailbox_autocreate = yes
mail_plugins = quota sieve autocreate
mail_plugins = quota imap_quota autocreate
do I just remove BOTH 'mail_plugin ...
2013 Feb 12
3
grabbing from elements of a list without a loop
Hello!
# I have a list with several data frames:
mylist<-list(data.frame(a=1:2,b=2:3),
data.frame(a=3:4,b=5:6),data.frame(a=7:8,b=9:10))
(mylist)
# I want to grab only one specific column from each list element
neededcolumns<-c(1,2,0) # number of the column I need from each element of
the list
# Below, I am doing it using a loop:
newlist<-NULL
for(i in 1:length(mylist) ) {
2017 Aug 17
1
autocreate deprecated q
On Thu, August 17, 2017 5:03 pm, Aki Tuomi wrote:
>
>> On August 17, 2017 at 8:56 AM voytek at sbt.net.au wrote:
>
> autocreate and autosubscribe are moved under mailbox settings
>
> namespace { mailbox FooBox { auto = create }
> mailbox Trash { auto = subscribe }
> }
Aki, thanks
I've inserted it, but, maybe not in the correct place ?
Aug 17 17:22:43 imap(ve at
2007 May 31
3
where to get list of all ActiveRecord classes
Anybody know how to get a list of all your model classes from a rails
environment?
I''d like to do something like "ActiveRecord::Base.subclasses" but that
gives me:
pcollins@horatio:~/proj/foobox$ script/console
Loading development environment.
>> ActiveRecord::Base.subclasses
NoMethodError: protected method `subclasses'' called ...
Anybody know how to do
2012 Nov 11
4
Multiplying elements of a list by rows of a matrix
Hi all,
I have the following code:
set.seed(1)
x1 <- matrix(sample(1:12), ncol=3)
x2 <- matrix(sample(1:12), ncol=3)
x3 <- matrix(sample(1:12), ncol=3)
X <- list(x1,x2,x3)
tt <- matrix(round(runif(5*4),2), ncol=4)
Is there a way I can construct a new list where
newlist[[i]] = tt[i,] %*% X[[i]]
without using a for loop? Each element of newlist will be 3 x 1 vector.
Thanks
--
Tina