Hello,
I am now running a multiple linear regression program, but I do not know the
difference between the command step and stepAIC.
Thanks.
Maggie
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Thanks for the info.
I have 2 degree distributions that have different degrees.
I want both these barplots to have the same axes. Is this possible?
I have used xlim and ylim. ylim works fine for both plots
But xlim I am not getting the values till 60. And if I give names(dd) -
0:60 it gives an
Is there an easy way to turn a vector of length n into an n by n matrix, in
which the diagonal equals the vector, the first off diagonal equals the
first order differences, the second... etc. I.e. to do this more
efficiently:
diffmatrix - function(x){
n - length(x);
M - diag(x);
Hi,
do you know the parameters of the binomial variate? then maybe you could use
something like the code below. as Petr pointed out, it is generally not
guaranteed that you can create variates with any linear correlation (ie,
depending on the parameters of the binomial)
n - 100# how many
Hi,
Not sure it is exactly what you're looking for, but it might help you:
save(PortafolioInicial, ...) ## you just save the original object
instead of the assign()ed one.
But when you load() it, you have to know its name, so it might be
difficult to use.
Even better (for me at least), is
Dear Group,
Is there a more efficient way to create a data frame structure (using rep I
guess?)
require(plyr)
week - rdply(10, data.frame(week = 1:52))
names(week) - c(Year, Week)
week$Year - week$Year + 2000
Basically trying to create a year and week data frame to start appending
data to for
Hi,
thank you very much.
On Tue, Apr 26, 2011 at 10:06 PM, Jerome Asselin
jerome.asselin.s...@gmail.com wrote:
On Tue, 2011-04-26 at 19:46 +0200, ivan wrote:
Hello,
given that a self made function produces multiple outputs, is there a
possibility to separate latter by stars or simply
On Apr 27, 2011, at 00:22 , Andre Guimaraes wrote:
Greetings from Rio de Janeiro, Brazil.
I am looking for advice / references on binary logistic regression
with weighted least squares (using lrm weights), on the following
context:
1) unbalanced sample (n0=1, n1=700);
2) sampling
On 26.04.2011 23:08, jim holtman wrote:
As soon as you execute the 'return' , the value is returned.
Right, and nothing else will be evaluated after the first return() was
evaluated.
Uwe Ligges
What you
did not show is did the code have if-then-else to go down separate
paths.
On
hi I am still tryingto do this, I have been working on this for a year but i
have remained stuck...
I have points at regular intervals but within an irregular window
I need to make a nb weights matrix, then nb2wlist
conceptually a D8 neighbourhood something like this:
000
000
0011100
Dear all I would like to ask you if an assignment can be done inside a lapply
statement.
For example
I would like to covert a double nested for loop
for (i in c(1:dimx)){
for (j in c(1:dimy)){
Powermap[i,j] - Pr(c(i,j),c(PRX,PRY),f)
}
}
to something like that:
Hi:
You could try something like
df - data.frame( expand.grid( Week = 1:52, Year = 2002:2011 ))
dim(df)
head(df)
The first variable changes faster than the second.
HTH,
Dennis
On Wed, Apr 27, 2011 at 1:03 AM, Santosh Srinivas
santosh.srini...@gmail.com wrote:
Dear Group,
Is there a more
unlist(lapply(1:nrow(ij),function(rowId) { return
(Powermap[i,j]-Pr(c(ij$i[rowId],ij$j[rowId]),c(PRX,PRY),f)) }))lapply
actually catches each return value of the excuted function.
here your function actually returns nothing if the assignment succeeds.
If your purpose for the call to Pr is
No, that does not work.
You cannot do assignment within (l)apply.
Nor in any other function for that matter.
Nick Sabbe
--
ping: nick.sa...@ugent.be
link: http://biomath.ugent.be
wink: A1.056, Coupure Links 653, 9000 Gent
ring: 09/264.59.36
-- Do Not Disapprove
-Original Message-
On Wed, Apr 27, 2011 at 12:58 PM, Nick Sabbe nick.sa...@ugent.be wrote:
No, that does not work.
You cannot do assignment within (l)apply.
Nor in any other function for that matter.
Yes that may work if you want to.
You can do non-local assignment within lapply using - (and, for that
matter,
On Wed, 27 Apr 2011, Maggie Wong wrote:
Hello,
I am now running a multiple linear regression program, but I do not know the
difference between the command step and stepAIC.
And what is the 'problem about step and stepAIC'? You can find out by
reading the help, as the posting guide asked
Dear Alex,
I think you want to use apply()
ij - expand.grid(i = seq_len(dimx),j = seq_len(dimy))
Powermap - apply(ij, 1, function(x){
Pr(x, c(PRX, PRY), f)
})
Best regards,
Thierry
ir. Thierry Onkelinx
I would like to use lapply as there is a parallel version of lapply called
mclapply.
My purpose is to convert
for (i in c(1:dimx)){
for (j in c(1:dimy)){
Powermap[i,j] - Pr(c(i,j),c(PRX,PRY),f)
}}
to something that can run in parallel with mclapply:
I am not sure then how to store
On Wed, 27 Apr 2011, peter dalgaard wrote:
On Apr 27, 2011, at 00:22 , Andre Guimaraes wrote:
Greetings from Rio de Janeiro, Brazil.
I am looking for advice / references on binary logistic regression
with weighted least squares (using lrm weights), on the following
context:
1) unbalanced
Here is a solution with lapply
PowerMatrix - matrix(unlist(lapply(seq_len(dimx*dimy), function(x){
i - 1 + (x - 1) %% dimx
j - 1 + (x - 1) %/% dimy
Pr(c(i,j),c(PRX,PRY),f)
})), nrow = dimx)
A reproducible example
dimx - 5
dimy - 6
PowerMatrix -
Hello,
I've got a question concerning kruskal.test:
Is there any post-hoc test for kruskal.test like there is one for aov
(TukeyHSD) and is it possible to plot this post-hoc test (if available). I need
to find out, which of my sample-groups differ significantly from each other...
If not, is
Dear community,
Thanks for regr2.plot. I've another question.
When fixing OLS I used training data and test data.
I'd like to know if it's possible to draw the plane I've fixed with the
training data, and draw the observed and predicted points achieved with the
test data. If so any help or
I am trying to fit gamma and exponential distributions using fitdist function
in the fitdistrplus package to the data I have and obtain the parameters
along with the AIC values of the fit. However, I am getting errors with both
distributions. I have given an reproducible example with the errors I
Hello,
I am working on a project analysing the performance of motor-vehicles
through messages logged over a CAN bus.
I am using R 2.12 on Windows XP and 7
I am currently plotting the data in R, overlaying 5 or more plots of
data, logged at 1kHz, (using plot.ts() and par(new = TRUE)).
The
Hi, thanks, I think I've changed the previous as you told me but I'm having
this error, what does it mean?
model- lm(log(v1)~log(v2)+v3, data=dat)
newax- expand.grid(
v2 = seq(min(log(dat$v2)), max(log(dat$v2)), length=100),
v3= seq(min(dat$v3), max(dat$v3), length=100))
fit -
Hello
We are working on a class in C++. The files compile fine (R CMD SHLIB ...) and
run in R. A bzipped tar archive with source code can be downloaded from here:
http://sovo.md-hh.com/files/GUTS3.tar.bz
In R, dyn.load(GUTS.so) generates an instance of the GUTS class. (How) Is it
possible to
Dear list,
im facing an issue of statistical data analysis that I consider myself
unable to resolve in R so i hope to get some valuable insights from you. i
run an ANOVA with four factors; factor4 is an between factor (two different
groups measured), the others are withins (tested
I guess your failure of getting two dimensional array may be related to this :
http://www.rforge.net/rJava/news.html
0.9-0 (under development)
o fixes issues introduced by several new features in the late
0.8 series. Most imporantly .jarray() and .jevalArray() behave
as
Luis Felipe Parra wrote:
Sorry David, I understand what you mean but could you help with how it would
be done more specifically.
Use
save(list=paste(Algoritmo, _Portafolio, sep=), ... )
Duncan Murdoch
Thanks
On Wed, Apr 27, 2011 at 11:27 AM, David Winsemius dwinsem...@comcast.netwrote:
Because you have two dependent variables, you'll want to to use a
multivariate logit. mlogit does this, but I don't know the syntax off
hand.
If you just wanted to look at one dependent variable, it would be the
following (which Alex said)
glm(y~x1*x2,family='binomial')
On Mon, Apr 25, 2011 at
Jonathan Gabris wrote:
Hello,
I am working on a project analysing the performance of motor-vehicles
through messages logged over a CAN bus.
I am using R 2.12 on Windows XP and 7
I am currently plotting the data in R, overlaying 5 or more plots of
data, logged at 1kHz, (using plot.ts() and
Dear all,
I am trying to speed up some code and I would like to check fast that it works
by comparing two different matrices.
What is the fastest way to do that in R?
Best Regards
Alex
__
R-help@r-project.org mailing list
Hi
x - matrix(rnorm(1e6), 1000,1000)
y - matrix(rnorm(1e6), 1000,1000)
identical(x,y)
[1] FALSE
The response is almost instant.
In case you are not satisfied with the unspecific answer be more specific
with your question.
Regards
Petr
r-help-boun...@r-project.org napsal dne 27.04.2011
Date: Wed, 27 Apr 2011 11:16:26 +0200
From: jonat...@k-m-p.nl
To: r-help@r-project.org
Subject: [R] Speed up plotting to MSWindows graphics window
Hello,
I am working on a project analysing the performance of motor-vehicles
through messages logged over a CAN bus.
I am using R 2.12 on
Thanks Icn for the lookup.
I appreciate your skill.
The static double field con0dbl started working for me too.
I was surprised, and checked my code carefully.
I think they corrected that in rJava.
I download and install rJava each time I use R.
Hill
--
View this message in context:
Jeroen Ooms jeroenooms at gmail.com writes:
Is there an easy way to turn a vector of length n into an n by n matrix, in
which the diagonal equals the vector, the first off diagonal equals the
first order differences, the second... etc. I.e. to do this more
efficiently:
diffmatrix -
That was great :)
REgards
--- On Wed, 4/27/11, Petr PIKAL petr.pi...@precheza.cz wrote:
From: Petr PIKAL petr.pi...@precheza.cz
Subject: Odp: [R] fast way to compare two matrices
To: Alaios ala...@yahoo.com
Cc: R-help@r-project.org, r-help-boun...@r-project.org
Date: Wednesday, April 27,
On 27.04.2011 12:56, Duncan Murdoch wrote:
Jonathan Gabris wrote:
Hello,
I am working on a project analysing the performance of motor-vehicles
through messages logged over a CAN bus.
I am using R 2.12 on Windows XP and 7
I am currently plotting the data in R, overlaying 5 or more plots of
Hi there,
this is probably simple but I can't seem to figure it out by myself...
I have two dataframes (df.1 and df.2):
df.1 - data.frame(year=factor(rep(1:3,3)), level=rep(letters[1:3],3),
number=c(11:19))
df.2 - data.frame(year=factor(c(1:5)), number=c(21:25))
I would like to create a new
df.1 - merge(df.1, df.2, by = year) df.1$sum - df.1$number.x +
df.1$number.y
df.1 year level number.x number.y sum 1 1 a 11 21 32 2 1 a 17 21 38 3 1 a 14
21 35 4 2 b 12 22 34 5 2 b 15 22 37 6 2 b 18 22 40 7 3 c 16 23 39 8 3 c 13 23
36 9 3 c 19 23 42
Scott
On Wednesday, April 27, 2011
Dear all
I am looking for a shorter way and more elegant to write the following
for (i in c(1:length(Shadowlist))){
filename-paste('/home/apa/maps/',model,i,'.mat',sep=)
varname-paste(model,'_shadow',i,sep=)
eval(parse(text=paste('writeMat(filename,',varname,'=Shadowlist[[i]])',sep=)))
}
Hi
r-help-boun...@r-project.org napsal dne 27.04.2011 13:30:13:
Hi there,
this is probably simple but I can't seem to figure it out by myself...
I have two dataframes (df.1 and df.2):
df.1 - data.frame(year=factor(rep(1:3,3)), level=rep(letters[1:3],3),
number=c(11:19))
df.2 -
On 26.04.2011 21:06, Truc Nguyen Trung wrote:
Dear Luke !
This is not Luke but the R-help mailing list. In case you want to
contact Luke Tierney: He has its own mail address.
Thanh you for the lovely packages. I have used it, it woks fine for Linux, XP,
but concerning about windows 7 -
Dear ExpeRts,t
I am trying to read tab delimted data produced by somewhat brain dead
software that seems to think it's a good idea to have an extra tab
character after the last column - except for the header line. As
explained in the help page, read.delim now assumes that the first
Great, many thanks to Scott and Petr!
2011/4/27 Petr PIKAL petr.pi...@precheza.cz:
Hi
r-help-boun...@r-project.org napsal dne 27.04.2011 13:30:13:
Hi there,
this is probably simple but I can't seem to figure it out by myself...
I have two dataframes (df.1 and df.2):
df.1 -
On 27.04.2011 13:59, Alaios wrote:
Dear all
I am looking for a shorter way and more elegant to write the following
for (i in c(1:length(Shadowlist))){
filename-paste('/home/apa/maps/',model,i,'.mat',sep=)
varname-paste(model,'_shadow',i,sep=)
Hi
If I understand correctly you maybe could read a file without header,
discard last column, read first line of a file and put it as column names.
read.delim(textConnection(infile), header=F, skip=1)
scan(textConnection(infile), nlines=1, sep=\t, what=c(,))
Regards
Petr
Hello
I have a matrix (though it could also be a ragged array) called items.used,
that has the item numbers of questions administered to a set of respondents. I
also have a vector of item parameters called b[]. I am looking for an elegant
way to create a matrix b.mat in which each element is
Hi,
I have following problem when trying to feed an CSV file to quantmod
using following command:
getSymbols(test1,src=csv)
Error in charToDate(x) :
character string is not in a standard unambiguous format
The sample test1.csv file contents:
Symbol, Date, Open, High, Low, Close, Volume
Hi,
I have some questions for the wireframe function of the lattice package. My
dataset's x-data are sampled logarithmically and as such I would like to have
a semilogarithmic 3D plot when plotting a time series. Does anyone know how to
change the example in
Dear ALL
I want to load HTSanalyzeR, It 's necessary to load igraph package.
This time I see this error:
library(igraph)
library(HTSanalyzeR)
Loading required package: GSEABase
Loading required package: Biobase
Error: package 'Biobase' is not installed for 'arch=i386'
I 'll be glade if you
See ?merge.
df.1 - data.frame(year=factor(rep(1:3,3)), level=rep(letters[1:3],3),
number=c(11:19))
df.2 - data.frame(year=factor(c(1:5)), number=c(21:25))
df.3 - merge(df.1, df.2, by = year)
df.3$new - with(df.3, number.x + number.y)
Jeremy
On Wednesday, April 27, 2011 7:30:13 AM UTC-4, E
On 27/04/2011 13:18, Mike Marchywka wrote:
Date: Wed, 27 Apr 2011 11:16:26 +0200
From:jonat...@k-m-p.nl
To:r-help@r-project.org
Subject: [R] Speed up plotting to MSWindows graphics window
Hello,
I am working on a project analysing the performance of motor-vehicles
Hello,
can I get somehow the pure structure without any details
via str or other functions?
I have a very large list with lists as elements...
And now I want to know which structure I have, becaiuse I need to kick out some
entries.
Any idea?
Oliver
On Apr 27, 2011, at 12:07 AM, Dennis Murphy wrote:
Hi:
Maybe this can help get you started. Reading your data into a matrix
m,
m - structure(c(1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
On Apr 27, 2011, at 12:00 AM, kparamas wrote:
Thanks for the info.
I have 2 degree distributions that have different degrees.
Do you mean a different range of values?
I want both these barplots to have the same axes. Is this possible?
I have used xlim and ylim. ylim works fine for both
On 27.04.2011 13:46, Stat Consult wrote:
Dear ALL
I want to load HTSanalyzeR, It 's necessary to load igraph package.
This time I see this error:
library(igraph)
library(HTSanalyzeR)
Loading required package: GSEABase
Loading required package: Biobase
Error: package 'Biobase' is not
Grr,
and 1) do not cross post to several lists (as the posting guide says)!
2) what is your name, Stat Consult? Don't you feel the name Stat
Consult somewhat ridiculous when asking such elementary question that
could have been sorted out if you had read the posting guide and the
manuals?
Dear list members,
is it possible to set some options only inside a function so that the original
options are restored once the function is finished or aborted due to an error?
Until now I do something like:
dummy=function()
{
old.options=options(error=dummy1())
See ?on.exit
Jeremy
On Wednesday, April 27, 2011 9:16:13 AM UTC-4, Jannis wrote:
Dear list members,
is it possible to set some options only inside a function so that the
original options are restored once the function is finished or aborted due
to an error? Until now I do something
On 27.04.2011 15:16, Jannis wrote:
Dear list members,
is it possible to set some options only inside a function so that the original
options are restored once the function is finished or aborted due to an error?
Until now I do something like:
dummy=function()
{
Here is more information on the equation. It is a growth function:
Growth = a + b*(1-exp(-k*time))
where a, b and k are parameters. I wanted to test the difference in total
growth between treatments and the parameters a + b represent total growth.
Thus, I figured that I could add the
There is probably a more elegant way to do this, but you could write
it into dummy1():
dummy1 - function()
{
...original function
options(old.options)
}
Alternatively, you could use ?tryCatch with the finally argument as a
call to options.
HTH,
Jon
On Wed, Apr 27, 2011 at 9:16 AM, Jannis
On Apr 27, 2011, at 5:28 AM, Gary Nobles wrote:
hi I am still tryingto do this, I have been working on this for a
year but i
have remained stuck...
I have points at regular intervals but within an irregular window
I need to make a nb weights matrix, then nb2wlist
Not sure I understand
Thanks, David! That is another interesting perspective to (sub/super)
diagonal story! For now I was looking only at block sizes of lower triangle
submatrices as Dennis suggested.
Regards,
Santosh
On Wed, Apr 27, 2011 at 5:57 AM, David Winsemius dwinsem...@comcast.netwrote:
On Apr 27, 2011, at
On Apr 27, 2011, at 7:25 AM, Hans W Borchers wrote:
Jeroen Ooms jeroenooms at gmail.com writes:
Is there an easy way to turn a vector of length n into an n by n
matrix, in
which the diagonal equals the vector, the first off diagonal equals
the
first order differences, the second...
Ich bin bis 02.05.2011 abwesend.
Ihre Mail wird nicht weitergeleitet. Ich beantworte sie nach meiner
Rückkehr.
In dringenden Fällen schreiben Sie bitte an
forschungsdatenzent...@statistik-hessen.de .
Hinweis: Dies ist eine automatische Antwort auf Ihre Nachricht R-help
Digest, Vol 98,
On Apr 27, 2011, at 6:49 AM, Dr. Meesters, Christian wrote:
Hi,
I have some questions for the wireframe function of the lattice
package. My dataset's x-data are sampled logarithmically and as
such I would like to have a semilogarithmic 3D plot when plotting a
time series. Does anyone
On Apr 27, 2011, at 9:28 AM, Schatzi wrote:
Here is more information on the equation. It is a growth function:
Growth = a + b*(1-exp(-k*time))
where a, b and k are parameters. I wanted to test the difference in
total growth between treatments and the parameters a + b represent
total
Hi Dennis,
My replies are in-line.
On Tue, Apr 26, 2011 at 9:15 PM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
My view, which may well be narrow, is that techniques like PLS and PCR
are useful fit procedures, but I would be very leery about using them
as prediction machines. With new data,
Many thanks for your messages.
I will take a look at the survey package.
I was concerned with the issues raised by Cramer (1999) in Predictive
performance of the binary logit model in unbalanced samples.
In this particular case, misclassification costs are much higher for
the smaller group
Dear All,
I run R on a windows 7 machine and it has been worked very well. I installed
Graphvis 2.20.3 and Rgraphviz.
recently, however, I cannot load the Rgraphviz package and error message popped
up
The message shown on the pop up window with the title: R Consol: Rgui.exe -
Sysytem error
On Wed, Apr 27, 2011 at 4:58 AM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
You could try something like
df - data.frame( expand.grid( Week = 1:52, Year = 2002:2011 ))
expand.grid already returns a data frame... You might want
KEEP.OUT.ATTRS = F though. Even it feels like you are yelling
Hello R-help,
I am wondering if anyone can help me with this:
I want to access data in a list which has been passed
into a C function, but I cannot work out how to access
the values. How do I move from the given SEXP pointer
to the next object in the list? I have tried to use CDR,
but to no
Date: Wed, 27 Apr 2011 14:40:23 +0200
From: jonat...@k-m-p.nl
To: r-help@r-project.org
Subject: Re: [R] Speed up plotting to MSWindows graphics window
On 27/04/2011 13:18, Mike Marchywka wrote:
Date: Wed, 27 Apr 2011 11:16:26 +0200
On Apr 27, 2011, at 13:29 , Alaios wrote:
That was great :)
REgards
You may need to turn your sarcasm detector back on. Beware:
x - matrix(rnorm(1e6), 1000,1000)
y - solve(solve(x))
identical(x,y)
[1] FALSE
all.equal(x,y)
[1] TRUE
summary(c(x-y))
Min.1st Qu. Median
Thanks a lot Jim, Dennis.
Jim, actually where dots were I meant etcetera or similar data. ;)
My output is close to that one Dennis proposed with function aggregate, but
i would like to keep the column var2 and the rest of columns with the unique
value corresponding to var1 greatest value, So
It is not a human growth curve. The parameter estimates are about:
a = .5
b = 7
k = 1
It is not a sigmoidal curve as there is never a concave segment.
From: ml-node+3478241-1447170361-211...@n4.nabble.com
[mailto:ml-node+3478241-1447170361-211...@n4.nabble.com]
Sent: Wednesday, April 27, 2011
Lisa,
Please look at some of the demos in the HH package.
These are built on the capabilities of the glht function in the multcomp
package.
## install.packages(HH) ## if necessary
library(HH)
demo(MMC.WoodEnergy-aov, package=HH) ## first
demo(MMC.WoodEnergy, package=HH) ## second
Rich
On
On 27/04/2011 9:43 AM, Cormac Long wrote:
Hello R-help,
I am wondering if anyone can help me with this:
I want to access data in a list which has been passed
into a C function, but I cannot work out how to access
the values. How do I move from the given SEXP pointer
to the next object in the
hi all.
I have a matrix of data with 5 different groups and 20 individual
response per group, and about 12 variables collected for each. I want to
represent the result in a 2D plot. PCA is not so good because the
difference between the groups is not obvious. I have seen, in a recent
paper,
Dear all,
I have the following R dataframe:
set.seed(11)
(df - data.frame(ID=rep(1:10,1:10),a=factor(sample(1:4,55,rep=T))))
where ID is an identification code.
I need to create a new variable b in which I would paste the full group
of a variable according to ID variable.
For
Please ask about Rgraphviz (and particularly binary distributions of
it) on the list of those providing it (which is not R!).
And do use a sensible subject line (which really does need to include
'Rgraphviz'), as the posting guide asked you to.
On Wed, 27 Apr 2011, Fang, Yongxiang wrote:
On Wed, Apr 27, 2011 at 11:25:42AM +, Hans W Borchers wrote:
Jeroen Ooms jeroenooms at gmail.com writes:
Is there an easy way to turn a vector of length n into an n by n matrix, in
which the diagonal equals the vector, the first off diagonal equals the
first order differences, the
Thanks Claudia,
Meanwhile I implemented a simple function to evaluate the Youden-Index and
subsequently all other parameters. This is sufficient for my purpose.
Cheers,
Christian
__
R-help@r-project.org mailing list
Massimiliano -
Here's one way, assuming you wanted b to be the same
length as a:
df = transform(df,b=ave(as.character(df$a),df$ID,
FUN=function(a)paste(a,collapse='')))
If you just want one observation for each value of ID, you
could use
Hi. Comments below
On Wed, Apr 27, 2011 at 2:32 AM, agent dunham crossp...@hotmail.com wrote:
Hi, thanks, I think I've changed the previous as you told me but I'm having
this error, what does it mean?
model- lm(log(v1)~log(v2)+v3, data=dat)
newax- expand.grid(
v2 =
Dear Julian,
Though it's not exactly what you're looking for, you might take a look at
the heplots package (on CRAN).
I hope this helps,
John
John Fox
Senator William McMaster
Professor of Social Statistics
Department of Sociology
McMaster University
Dear all, let say, I have following list object:
listObj - vector(list, length = 3)
listObj[[1]] - rnorm(3)
listObj[[2]] - rnorm(4)
listObj[[3]] - rnorm(5)
Now I want to convert above list into a Matrix. Ofcourse I can do it using
Reduce(rbind, listObj). However as you notice that as
Hi Christofer,
You might try
sapply(listObj, function(l) l[1:max(sapply(listObj, length))] )
HTH,
Jorge
On Wed, Apr 27, 2011 at 1:23 PM, Bogaso Christofer wrote:
Dear all, let say, I have following list object:
listObj - vector(list, length = 3)
listObj[[1]] - rnorm(3)
listObj[[2]]
Here's one way:
uselen = max(sapply(listObj,length))
do.call(rbind,lapply(listObj,function(x){length(x) = uselen;x}))
[,1] [,2] [,3] [,4] [,5]
[1,] 0.0702225 -1.143031 1.6437560 NANA
[2,] -0.6100869 2.657910 -0.6028418 -0.7739858NA
I don't know who to contact in the management of this R-forum,
and there are a few things I cannot figure out.
As I understand it, to participate and learn on the R-forum,
I must receive all the emails even concerning topics I have no
interest in currently. It clogs up my email, takes a long
Absence of evidence is not evidence of absence. Perhaps you are not getting
answers for a good reason.
From a previous email:
1) reading the source code of packages that use rJava, such as RWeka is the
best way to understand how things work. If you are asked to do so is for a
reason;
You might want to use the logspline package instead of the density function, it
allows you to specify bounds on a distribution.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
Anyone have experience specifying the penalty.factor option in the
glmnet command?
I have 3 variables (out of a million genotype variables) that I want to
force into the model (i.e., set penalty factor to 0), but I can't figure out
how to do that.
[[alternative HTML version deleted]]
Two problems with the code below.
A. It produces empty JPEGs. When the 'bwplot' line alone is submitted, the
plot duly shows up.
B. When the 'bwplot' line alone is submitted, y labels are values 1 to 6,
not actual distinct values of y$maxthreads.
(C. I would, of course, prefer to produce plots
Rich,
thanks a lot, i will definitly check it out. however, since the analysis
mentioned above is already implemented could you or anyone tell me whether
it contains any statistical flaws?
best
Lisa
__
Von:
Dear all,
I am trying to write a script to pause the execution of a function and
provide some additional commands to the function and then continue execution
of the function. For example, when my function detects a wrong number in a
dataset, the function pauses automatically and returns
If I have a vector of n elements, e.g. a vector of length 4 with elements 10,
20, 30, 40 and want to find the different values of x such that x^2=10,
x^2=20, x^30 and x^2=40, how could I do this in R? I'm thinking of using the
uniroot function, but am finding difficult applying it to a vector.
Try this:
sapply(listObj, '[', 1:max(sapply(listObj, length)))
On Wed, Apr 27, 2011 at 2:23 PM, Bogaso Christofer
bogaso.christo...@gmail.com wrote:
Dear all, let say, I have following list object:
listObj - vector(list, length = 3)
listObj[[1]] - rnorm(3)
listObj[[2]] - rnorm(4)
1 - 100 of 151 matches
Mail list logo