Antony Unwin wrote:
.
> The course itself went very well. We encouraged people to bring their
> laptops and work in groups. Using JGR as the interface to R helped a
> lot, as it was easier for people to load their own data and use the
> help. Of course, JGR is compul
Thank you so much to Mark and Gabor for their codes (please see below). Now
I solved my problem : )
Best,
Jorge
# - Mark's code
res=sapply(colnames(dx), function(.colname) {
if (.colname %in% colnames(dy)) dy[,.colname]
else {numeric(nrow(dy))}
})
res
# - Gabor's code
res
?View
On Sat, Apr 12, 2008 at 5:47 PM, john useast <[EMAIL PROTECTED]> wrote:
> Dear R friends:
>
>
> Sorry this might be a trivial question: I have about 8000 records with 11
> variables in csv format. I did get it into R. head and tail all tell every
> record is in the memory. However, when
?assign
I think this will work for you.
list=dir(pattern=".sav")
library(foreign)
for (i in 1:length(list)){
# The saved data frame will be dat
name=substring(list[i],1,nchar(list[i])-4)
assign(name, read.spss(list[i],to.data.frame=TRUE))
rname=paste("../R/",name,".rda",sep="")
The problem comes from fitting the model using a formula like this:
mlogit <- vglm(bcsse$Active ~ bcsse$Impinteg + bcsse$Hsgradyr,
family = multinomial(), na.action=na.pass)
If you write the formula in that form, prediction will be virtually
impossible, because it will be looking for vari
I wrote a little routine to convert multiple spss data files (as data frames)
to R data files. The code is as follows:
#
list=dir(pattern=".sav")
library(foreign)
for (i in 1:length(list)){
# The saved data frame will be dat
dat=read.spss(list[i],to.data.frame=TRUE)
name=substring(list[i],1,nchar
Hi Ethan --
Use the XML library
> library(XML)
> url <- 'http://www.nascar.com/races/cup/2007/1/data/standings_official.html'
> xml <- htmlTreeParse(url, useInternal=TRUE)
The previous line retrieves the html and stores it in an internal
represnetation. There are warnings, but I think these are
Dear all,
I'd like to use R to read in data from the web. I need some help finding an
efficient way to strip the HTML tags and reformat the data as a data.frame
to analyze in R.
I'm currently using readLines() to read in the HTML code and then grep() to
isolate the block of HTML code I want from
On Sat, 12 Apr 2008, john useast wrote:
John,
Do not hijack an existing thread to ask a new question.
You have replied to Hadley's reply to Biago and changed the subject line.
Instead, start a new thread unsing 'Compose' or whatever capability your
mail agent has to create a new message.
I s
Dear R friends:
Sorry this might be a trivial question: I have about 8000 records with 11
variables in csv format. I did get it into R. head and tail all tell every
record is in the memory. However, when i tried to print it, only last 1000
records stay in the screen; the rest just gone
On Sat, Apr 12, 2008 at 1:06 PM, Biago <[EMAIL PROTECTED]> wrote:
>
> Hi all - my first time here and am having an issue with the Predict function.
>
> I am using a tutorial as a guide, locate here:
> http://www.ats.ucla.edu/STAT/R/dae/mlogit.htm
>
> My code gives this error
>
> > newdata1$pre
Dear R users.
I have data observed on the surface of a torus, and
am trying to fit the nonlinear regression using
the geodesic equation on a torus. Could anyone give
me a helpful advise on this problem? I would
definitely appreicate your reply.
Sincerely,
S
Dear Greg,
thank you again for your help.
The graph looks much better now. However, I need the bars to be assigned to
the left y-axis, and the lines should be assigned to the right y-axis (the
y-axes have different ranges,e.g. left y-axis 0-20, and right y-axis 0-1).
Also would be nice if the
Try
mapply(function(x,y)lm(y~x),as.data
.frame(data.x),as.data.frame(data.y),SIMPLIFY=F)
2008/4/12, baptiste Auguié <[EMAIL PROTECTED]>:
> Hello R list,
>
>
> I have two matrices of identical dimensions, and I want to fit a
> straight line for each pair of columns and plot the resulting lines.
> I
Jaroslav Urbánek wrote:
> Hello.
> I'm solving ODEs in R. I need "as many methods as possible",
> so I downloaded the Fortran functions from http://www.netlib.org/ode/.
> Then I created DLLs and dyn.loaded them to R. Problem is that
> I don't know how to use them. I've been trying for many days
>
See
?merge
?match
for two different ways and do an RSiteSearch for those
to find examples in the archives
On Sat, Apr 12, 2008 at 12:19 AM, Edwin Sendjaja <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have got 2 Tables from different files:
>
> Table 1 (lets say file: Salesman.data)
>
>
Dear All,
I was looking for a package covering multivariate markov regime switch
models for non-observed regimes.
Is there anything out there?
Keywan
http://www.arasgallery.com http://www.arasgallery.com
--
View this message in context:
http://www.nabble.com/Multivariate-Makov-Regime-Switch
Does anyone know how to solve this. I am so desperate.
I'd be terribly grateful for any help.
Am Samstag, 12. April 2008 05:19:16 schrieb Edwin Sendjaja:
> Hello,
>
> I have got 2 Tables from different files:
>
> Table 1 (lets say file: Salesman.data)
>
>
> | ID | User_ID
Hi all - my first time here and am having an issue with the Predict function.
I am using a tutorial as a guide, locate here:
http://www.ats.ucla.edu/STAT/R/dae/mlogit.htm
My code gives this error
> newdata1$predicted <- predict(mlogit,newdata=newdata1,type="response")
Error in `$<-.data.frame`
Hello.
I'm solving ODEs in R. I need "as many methods as possible",
so I downloaded the Fortran functions from http://www.netlib.org/ode/.
Then I created DLLs and dyn.loaded them to R. Problem is that
I don't know how to use them. I've been trying for many days
and can't solve it. So I would be ve
Barplot is probably not the best way here (it is possible, but more work than
it is worth).
Here is one approach that gives something similar to what you want:
plot(x, y, lend=1, lwd=25, ylim=c(-1,10), xlim=c(0.75,5.25),type='h',
col='grey')
lines(x, y2)
Is that good enough? or do you ne
Type "?par" at the command line to bring up the help page, then scroll down and
read the sections on xpd and usr.
From: Edwin Sendjaja [mailto:[EMAIL PROTECTED]
Sent: Fri 4/11/2008 9:56 PM
To: Greg Snow; r-help@r-project.org
Subject: Re: [R] Legend position outsi
List,
I am having trouble locating documentation on how one extracts posterior
variances of the random effects from an lme object. I have found equivalent
documentation for lmer(using ranef()), but nothing for lme. Any help would be
greatly appreciated!
Sam
--
Note the new contac
The function in package nnet for 'Multinomial Logit Regression' is called
multinom() and not nnet(). You seem not to have used it, and therein lies
your error.
If you need more help, multinom() is support software for a book (see
library(help=nnet)), and the book has extensive worked examples.
> Hi again. I believe that I described the things bad before.
>
> I want to make the analysis with a sample data (train.set) of dataset for
> later see if the predictions adjust to the rest of data non selected with
> the sample train.
>
> Then, of the same form in glm:
>
> library(nnet)
> net <-
Hello R list,
I have two matrices of identical dimensions, and I want to fit a
straight line for each pair of columns and plot the resulting lines.
I got it to work with a for loop, but there must be a better way,
> n<-5
> N<-10
>
> data.x<-matrix(1:(n*N),ncol=n)
> data.y<-matrix(1:(n*N) +
Antony Unwin wrote:
> This email isn't asking for assistance, but I thought R-help readers
> would find it interesting. This week we offered a half-day
> introduction to R for researchers at Augsburg University. The
> response was astonishing. Although Augsburg has no medical faculty
> a
Dear Greg, dear all,
thank you for your reply!
To clarify, here is an example of what I want to do (but better, of
course!):
x<- c(1,2,3,4,5)
y<- 0:4
y2<- c(0,0,7,8,9)
barplot(y ,ylim=c(-1,10), ylab="", xaxt="n",yaxt="n", main="")
axis(4,at=c(1,2,3,4,5,6))
text(6,2.9, "2nd y-axis", s
This email isn't asking for assistance, but I thought R-help readers
would find it interesting. This week we offered a half-day
introduction to R for researchers at Augsburg University. The
response was astonishing. Although Augsburg has no medical faculty
and no engineers, there was far
Hi again. I believe that I described the things bad before.
I want to make the analysis with a sample data (train.set) of dataset for
later see if the predictions adjust to the rest of data non selected with
the sample train.
Then, of the same form in glm:
library(nnet)
net <- nnet(response.
Hi, I'm doing a stats project using R to work out the size of a t-test and
wilcoxon test depending on the distribution and sample size. I just can't get
it to work - I want to put my results from the function size() into an array.At
the moment I keep getting the error message:Error in res[dist
Rory Winston wrote:
> Hi
>
> Does anyone know how I might pick out diagonal elements of a matrix using a
> vector?
>
> If I create a matrix a:
>
> a <- matrix(c(1:16), 4, byrow=TRUE)
>
> and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary
> diagonal (upper or lower), is ther
On Sat, 2008-04-12 at 10:56 +0100, Rory Winston wrote:
> Hi
>
> Does anyone know how I might pick out diagonal elements of a matrix using a
> vector?
>
> If I create a matrix a:
>
> a <- matrix(c(1:16), 4, byrow=TRUE)
Not sure if this does all that you describe below, but:
diag(a)
and you can
On 4/12/2008 5:56 AM, Rory Winston wrote:
> Hi
>
> Does anyone know how I might pick out diagonal elements of a matrix using a
> vector?
>
> If I create a matrix a:
>
> a <- matrix(c(1:16), 4, byrow=TRUE)
>
> and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary
> diagonal
Hi
Does anyone know how I might pick out diagonal elements of a matrix using a
vector?
If I create a matrix a:
a <- matrix(c(1:16), 4, byrow=TRUE)
and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary
diagonal (upper or lower), is there any way I can use a vector to do thi
Troels Ring wrote:
> Dear friends - occurring in Windows R2.6.2
> I am modeling physical chemistry in collaboration with a friend who has
> preferred working in Excel. I used uniroot, and find a solution to a two
> buffer problem in acid-base chemistry which I believe is physiologically
> sensib
Dear friends - occurring in Windows R2.6.2
I am modeling physical chemistry in collaboration with a friend who has
preferred working in Excel. I used uniroot, and find a solution to a two
buffer problem in acid-base chemistry which I believe is physiologically
sensible. Using "goal seek" in Exce
I just found out that this message got scrambled with other threads,
so I trying to re-send...
Dear R'ers,
I am trying to build a composite plot (with several plots in one
figure). I have tried, but I cannot use facetting, as I need to
customize each plot using grid.
Since all the plots are the
38 matches
Mail list logo