On 01/24/2011 05:05 AM, nandan amar wrote:
Thanks a lot.
I am getting following errors on,
R CMD INSTALL gsarima_0.0-2.tar.gz (gsarima_0.0-2.tar.gz is in same directory
where I am running R)
Error: unexpected symbol in "R CMD"
and
install.pacakges('gsarima',dep=TRUE,clean=TRUE)
Error: co
I was re-running some code that I hadn't run in a couple of months to make
barplots in R. I didn't change a single thing in the script, but the plots
wouldn't work this time around. The plot itself (the bars and axes) will
graph in the window, but no text appears. In the console it says I have
The $ notation, such as accountants$statef,
shouldn't it be
The $ notation, such as accountants$home,
instead?
regards,
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
Dear R fans,
I am trying to do step-wise linear regression using the F-test to decide
which variables to admit. Ewout Steyerberg suggests using the F-test for
this purpose.
I first build a model using no variables using lm(y ~ 1) and then using one
variable that is a strong predictor using lm(y
Is there a way to vectorize this loop or a smarter way to do it ?
y
[1] 0.003990746 -0.037664639 0.005397999 0.010415496 0.003500676
[6] 0.001691775 0.008170774 0.011961998 -0.016879531 0.007284486
[11] -0.015083581 -0.006645958 -0.013153103 0.028148639 -0.005724317
[16] -0.027408025
Hi R-Users,
Â
Thanks in advance.
Â
I am using R-2.12.0 on Windows XP.
Â
I am trying to produce an n X m matrix from text data stored in different
files. Where n = number of words (say w1, w2, â¦, wn). M is the number of
documents (say d1, d2, â¦, dm)
Â
A. Using package tm
Â
I am using pack
On Jan 23, 2011, at 6:04 PM, Akram Khaleghei Ghosheh balagh wrote:
Hello
I am running a project but I encounter a problem . I would be happy
to receive help :
problem:
I have a binary dependent variable and some covariates logit(y)=a+bx
+cz .
I want to estimate the score vectors and their c
Hi,
Welcome to R! What you have run into is a feature of how subsetting
works. By default, it converts to the lowest possible dimensions.
The odd name you see, "d.8.10...c..", is an attempt to convert "
d[8:10, "c"] " into a valid name. R does this approximately by
converting disallowed chara
Hello
I am running a project but I encounter a problem . I would be happy
to receive help :
problem:
I have a binary dependent variable and some covariates logit(y)=a+bx+cz .
I want to estimate the score vectors and their covariance by the usage of
logit function and so glm in R .The vlaue o
Hi all,
I'm a new R user and am confused about how R behaves when converting a vector
to a data frame when using the data.frame function. I'm specifically
interested in cases where the vector is expressed as a subset of another data
frame. For example, say I want to create a data frame from
# 4 . (a) Create subvectors, one for boys and one for girls.
bmi.male <- subset(bmi, gender == "male") # Creates a subset of bmi
with
male only values n=30
bmi.female <- subset(bmi, gender == "female") # Creates a subset of bmi
with female only values n=30
male.bmi.only <-(bmi.m
On Jan 23, 2011, at 6:00 PM, Thomas Stewart wrote:
Here is a hack, crude solution to get the digits:
Digits <- function(a){
out <- rep(NA,nchar(a))
for(i in 1:nchar(a)) out[i] <- substr(a,i,i)
return(as.numeric(out))
}
Digits(183429)
str1 <- c(12345, 34567, 45678)
sapply(strsplit(as.charact
On Jan 23, 2011, at 6:00 PM, Thomas Stewart wrote:
Here is a hack, crude solution to get the digits:
Digits <- function(a){
out <- rep(NA,nchar(a))
for(i in 1:nchar(a)) out[i] <- substr(a,i,i)
return(as.numeric(out))
}
Digits(183429)
str1 <- c(12345, 34567, 45678)
sapply(strsplit(as.char
Stuart Luppescu ccsr.uchicago.edu> writes:
>
> I want box plots by group to display in order of increasing
> mean (or median) of each group but can't seem to figure it out and
> couldn't find anything on R-seek, either.
>
?reorder ... ?
__
R-help
Hello all, I want box plots by group to display in order of increasing
mean (or median) of each group but can't seem to figure it out and
couldn't find anything on R-seek, either.
My data looks like this:
meas unit sid gradersprti
1 2.24 1002 9902NA 0.860
2 3.04 1007 43
require(data.table)
DT = as.data.table(df)
# 1. Patients with ah and ihd
DT[,.SD["ah"%in%diagnosis && "ihd"%in%diagnosis],by=id]
id diagnosis
[1,] 2ah
[2,] 2 ihd
[3,] 2im
[4,] 4ah
[5,] 4 ihd
[6,] 4angina
# 2. Patients with ah but no ihd
DT[,.S
Along with imdb.com, boxofficemojo.com might be a potential database.
-tgs
On Sun, Jan 23, 2011 at 3:46 AM, Barry Rowlingson <
b.rowling...@lancaster.ac.uk> wrote:
> On Sat, Jan 22, 2011 at 10:07 PM, Matt Curcio
> wrote:
> > Greetings all,
> > I am wondering if anyone is aware of any studies th
Here is a hack, crude solution to get the digits:
Digits <- function(a){
out <- rep(NA,nchar(a))
for(i in 1:nchar(a)) out[i] <- substr(a,i,i)
return(as.numeric(out))
}
Digits(183429)
If all you want is the last three numbers, consider another hack solution:
Last3Digits <- function(a) a
Try 'split'
> x
bmi gender
1 24.78 male
2 26.42 male
3 23.18 female
4 22.36 female
> # create a list with the split genders
> split(x, x$gender)
$female
bmi gender
3 23.18 female
4 22.36 female
$male
bmi gender
1 24.78 male
2 26.42 male
>
>
On Sun, Jan 23, 2011 at 1:36 PM,
Do you want to store each digit as a separate character, or if you
want to compare the last three digits with other numbers, then use the
"%%" operator.
> x <- 12345
> x %% 1000
[1] 345
On Sun, Jan 23, 2011 at 1:39 PM, Quan Zhou wrote:
> Hi Everyone,
> A quick question how to store a number lik
On Jan 23, 2011, at 2:07 PM, Denis Kazakevich wrote:
Dear David
Thank you for your e-mail
I believe that equivalent to Stata egen tag is simply
df$tag <- df[!duplicated(df[c("station","week")]),]
I am not sure about
egen count
It might be something like
aggregate(station~week, df, function(
On Jan 23, 2011, at 1:39 PM, Quan Zhou wrote:
Hi Everyone,
A quick question how to store a number like 12345 to a vector or
array with
size(1,5), like 1, 2, 3, 4, 5
?strsplit
?unlist
So I can compare if the last three digits of this number is the same
with
some other numbers.
Davi
Marc Jekel gmx.de> writes:
> Another question for the community that really frightened me today. The
> following logical comparison produces a "false" as output:
>
> t = sum((c(.7,.69,.68,.67,.66)-.5)*c(1,1,-1,-1,1))
> tt = sum((c(.7,.69,.68,.67,.66)-.5)*c(1,-1,1,1,-1))
>
> t == tt
>
> This is
Hello R Fans,
Another question for the community that really frightened me today. The
following logical comparison produces a "false" as output:
t = sum((c(.7,.69,.68,.67,.66)-.5)*c(1,1,-1,-1,1))
tt = sum((c(.7,.69,.68,.67,.66)-.5)*c(1,-1,1,1,-1))
t == tt
This is really strange behavior. Mos
I'm looking for answers to your questions as well. Has double
buffering been really implemented for Windows? I cannot find any
announcement in the NEWS or ONEWS or OONEWS file in svn, although it
looks Windows graphics devices perform much better than Linux
x11()/Mac OS quartz().
It looks the Grap
On Sunday 23 January 2011 20:52:21 nandan amar wrote:
> I am trying to use function garsim from package gsarima.
> I can download gsarima package from
> http://cran.fyxm.net/web/packages/gsarima/index.html for linux.
> But how I can add it to R.
>
For example by entering
R CMD INSTALL /pat
Hi,
I am a student at the University of Twente ( ITC).
I am using the R packages for my data analysis, but for the last few weeks now
, I have been getting the error message when trying to work on variograms or
krigging.
Error : .onLoad failed in loadNamespace() for 'gstat', details:
call: fu
Hi Nandan,
On 01/23/2011 08:52 PM, nandan amar wrote:
I am trying to use function garsim from package gsarima.
I can download gsarima package from
http://cran.fyxm.net/web/packages/gsarima/index.html for linux.
But how I can add it to R.
I have compiled and installed R from its R source code und
Hi,
Try looking at ?subset
I think something like this should work:
dat.male <- subset(dat, gender == "male")
dat.female <- subset(dat, gender == "female")
though it may require tweaking depending how your data is stored. If
you want more specific help, suppose your matrix is called "dat" (but
Hi Tim,
I already answered this exact question from a different poster (by the
name of Paul Evans, subject: "Passing in arguments into function"),
that occurred within marvelous temporal proximity to your own, so I
will just refer you to that (search the archives with name + subject).
Just as a n
?nls
On Jan 23, 2011, at 10:00 AM, laleluia wrote:
Hi
I have a very big data.frame :
str(fslu12)
'data.frame': 277200 obs. of 11 variables:
$ V1 : num 304 304 304 304 304 ...
$ V2 : num 300 300 300 300 300 300 300 300 300 300 ...
$ V3 : num 10 10 10 10 10 10 10 10 10 10 ...
$ V4 : num
Hi Paul,
You need to pass the formula object, not a string. If you have a
function that is passing one of its arguments down to lm(), just pass
the argument directly, no need to do anything special. Here are some
examples using a built in dataset:
## wrapper function
foo <- function(fooform, ..
I am trying to use function garsim from package gsarima.
I can download gsarima package from
http://cran.fyxm.net/web/packages/gsarima/index.html for linux.
But how I can add it to R.
I have compiled and installed R from its R source code under Ubuntu.
regards.
--
Amar Kumar Nandan
Karnataka ,Indi
I think you guys make it more difficult than it has to be. Estimating
probability of success with a loglog-link is equivalent to estimating
probability of failure with a cloglog-link, so all you have to do is to
change the response variable accordingly (and then you can interpret
parameter estimat
Hello,
Say I have 2 columns, bmi and gender, the first being all the values and the
second being male or female. How would I subset this into males only and
females only? I have searched these fora and read endlessly about select[]
and split() functions but to no avail. Also the table is not ord
Hi
I have a very big data.frame :
str(fslu12)
'data.frame': 277200 obs. of 11 variables:
$ V1 : num 304 304 304 304 304 ...
$ V2 : num 300 300 300 300 300 300 300 300 300 300 ...
$ V3 : num 10 10 10 10 10 10 10 10 10 10 ...
$ V4 : num 79.1 52 30.6 37.3 63 79.1 52 30.6 37.3 63 ...
$
Hi Everyone,
A quick question how to store a number like 12345 to a vector or array with
size(1,5), like 1, 2, 3, 4, 5
So I can compare if the last three digits of this number is the same with
some other numbers.
Thanks a lot
[[alternative HTML version deleted]]
_
Maybe that:
su <- lapply(dat[2:5],function(x)table(x))
su
mode(su)
myBYdata <- data.frame( do.call(cbind,lapply(su, as.data.frame)) )
myBYdata
У Няд, 23/01/2011 у 07:43 -0500, Wei Yang піша:
> Dear all,
>
> I would like to ask whether anyone has experience with the problem below.
>
>
> I want
Hi,
I had a function that looked like:
diff <- lm(x ~ y + z)
How can I pass the argument to the 'lm' function on the fly? E.g., if I pass it
in as a string (e.g. "x ~ y + z"), then the lm function treats it as a string
and not a proper argument.
many thanks
[[alternative HTML
Hi,
I had a function that looked like:
diff <- lm(x ~ y + z)
How can I pass the argument to the 'lm' function on the fly? E.g., if I pass it
in as a string (e.g. "x ~ y + z"), then the lm function treats it as a string
and not a proper argument.
many thanks
[[alternative HTM
Sorry, but I was always getting message that the post had not been accepted.
The function I mentioned belong to the package "gss".
I have abandoned this approach since I couldn’t get much more information on
it.
thanks
--
View this message in context:
http://r.789695.n4.nabble.com/using-Smoly
Hi
This worked after I followed this used sudo R and also added a CRAN
destination to my etc sources file
I got a new error
some packages are not being updated now
they give this error
/usr/bin/ld: cannot find -lf77blas
/usr/bin/ld: cannot find -latlas
and
Cannot find curl-config
also is
Dear David
Thank you for your e-mail
I believe that equivalent to Stata egen tag is simply
df$tag <- df[!duplicated(df[c("station","week")]),]
I am not sure about
egen count
It might be something like
aggregate(station~week, df, function(x)sum(!is.na(x)), na.action = na.pass)
I made this qu
Robert -
If sqlTables() works, then R already knows the name of your database.
Do you get a different result if you try
seiz.df <- sqlFetch(chnl, 'MAIN')
- Phil Spector
Statistical Computing Facility
Currently, the Rsymphony maintainers do not support Rsymphony under Windows.
Best wishes,
Uwe Ligges
On 23.01.2011 14:58, BSanders wrote:
Hi, I'm new to R, and at this phase, I don't really even know how to learn
how to use R.
I want to use R and Symphony together. CAn I use Symphony on a
Are you using RPostgreSql package? I use this quite effectivly to
interact with my database.
HTH
Stephen
On Jan 23, 2011, at 10:48 AM, Robert W. Burn wrote:
Dear list -
I am having a problem using RODBC to access records from tables in a
PostgreSQL database.
There is no problem establish
Dear list -
I am having a problem using RODBC to access records from tables in a PostgreSQL
database.
There is no problem establishing the connection using chnl <- odbcConnect (dsn=
... etc.
The DSN seems to be properly set up using the PostgreSQL Unicode ODBC driver,
and
sqlTables(chnl) works
On Jan 23, 2011, at 8:25 AM, kiotoqq wrote:
I've got this table:
A B
1 7.8 215
2 6.8 280
3 9.4 356
4 5.2 38
5 8.2 167
6 4.8 127
7 3.7 8
8 6.2 201
9 9.7 346
10 8.1 241
how can I get the variance and covariance of A and B?
?var
(If that hadn't been your first guess, you c
The answer is
?cor
but this question is not really appropriate for this list. Read one of
the fine introductions to R, and turn to this list only when you get
stuck.
-Best,
Ista
On Sun, Jan 23, 2011 at 1:25 PM, kiotoqq wrote:
>
> I've got this table:
>
>
> A B
> 1 7.8 215
> 2 6.8 280
> 3
I think there are multiple solutions that match your criteria. Here is one:
dat <- structure(list(Id = 1:20, v1 = c(1L, 2L, 4L, 1L, 3L, 3L, 3L,
+ 4L, 1L, 4L, 2L, 1L, 2L, 4L, 3L, 2L, 1L, 2L, 4L, 3L), v2 = c(2L,
+ 1L, 2L, 1L, 2L, 1L, 4L, 4L, 2L, 1L, 4L, 4L, 3L, 3L, 2L, 3L, 4L,
+ 3L, 1L, 3L), v3 = c(
On Jan 22, 2011, at 1:02 PM, Denis Kazakiewicz wrote:
Hi to all R community
Does anybody know good R packages/books dedicated to efficient usage
of
R in pharmacoepidemiological research?
http://lmgtfy.com/?q=pharmacoepidemiology+%22r-project%22
--
David Winsemius, MD
Heritage Laboratorie
Dear Peter
Thank you
Lo and behold
Now I've got it
In code
aggregate(.~ id, lapply(df, as.character), FUN =
function(x)paste(sort(x), collapse = ''), na.action = na.pass)
there are no contradictions with NAs.
na.action = na.pass is applied to aggregate where default is na.omit.
And afterwards th
Dear all,
I would like to ask whether anyone has experience with the problem below.
I want to select a subset of the sample (see data below) so that each level
(1,2,3,4 in the example) for every variable (v1,v2,v3,v4 in the example) is
shown at least once in the subset. I also want the sample s
I've got this table:
A B
1 7.8 215
2 6.8 280
3 9.4 356
4 5.2 38
5 8.2 167
6 4.8 127
7 3.7 8
8 6.2 201
9 9.7 346
10 8.1 241
how can I get the variance and covariance of A and B?
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-get-variance-tp3232523p3232
Dear all,
I experience a problem in implementing a S4 class in a package and would
appreciate your help in this matter.
The class is implemented using Rcpp, which works well. I then extend the
class with R functions, adding them as methods with a call to
setMethod(...). When I do this outsid
Hi, I'm new to R, and at this phase, I don't really even know how to learn
how to use R.
I want to use R and Symphony together. CAn I use Symphony on a windows
based machine? I downloaded
Symphony 5.2.0, and when I hit to install it, I'm getting an error that I
can't get past. "Bad end of cen
You can take a look on task views, specially in
http://cran.r-project.org/web/views/Pharmacokinetics.html
On Sat, Jan 22, 2011 at 4:02 PM, Denis Kazakiewicz
wrote:
> Hi to all R community
> Does anybody know good R packages/books dedicated to efficient usage of
> R in pharmacoepidemiological rese
Try this:
x1[!apply(x1 == t(x2), 1, any),]
On Sat, Jan 22, 2011 at 6:35 PM, Shai & Rivka Uliel
wrote:
> Hi
>
>
> ihave one table that look like
>
> SNP1 SNP2 SNP3 SNP4 SNP5
> SIRE1 1 -1 -1 1 -1
> SIRE2 1 -1 1 1 1
> SIRE3 -1 -1 1 1 0
> SIRE4 -1 1 1 0 1
> SIRE5 -1 1 -1
Hi,
I am trying to build a binary of Rquantlib package 0.3.5 under Window 7
64bits. I am using mingw gcc version 4.5.1 (tdm64-1) which is a
experimental version of 64 bits ming gcc. (http://tdm-gcc.tdragon.net/). I
have successfully compiled boost 1.45 and Quantlib 1.0.1 with this gcc.
And then
MM wrote:
Hello,
Is the "std.dev" component of ls.diag( lsfit(x,y) ) the sample standard
deviation of the residuals of the fit?
I have
ls.diag(lsfit(xx,yy))$std.dev
different from
sd(lsfit(xx,yy)$residuals)
where xx and yy are vectors of 5 elements.
Compare
ls.diag(lsfit(xx,yy))$std
Den wrote:
Dear Dennis
Thank you very much for your comprehensive reply and for time you've
spent dealing with my e-mail.
Your kindly explanation made things clearer for me.
After your explanation it looks simple.
lapply with chosen options takes small part of cycle with same id
(eg. df[df$id==
> Date: Sat, 22 Jan 2011 19:49:43 -0800
> From: santosh.srini...@gmail.com
> To: r-help@r-project.org
> Subject: Re: [R] which operating system + computer specifications lead to the
> best performance for R?
>
> Hi Josh,
>
> I was referring to the below point that I read a while back when I
> ins
If you want all your NAs in the column GPAX to be 2.36, you could also say
df2$GPAX[is.na(df2$GPAX)] <- 2.36
If you want only that specific NA to be 2.36, you are probably better off using
df2$GPAX[rownames(df2) == 156] <- 2.36.
--- On Sun, 1/23/11, Den wrote:
> From: Den
> Subject: Re: [R]
Dear Rsociety,
I'd like to kingly ask to anyone is willing to answer me how to implement a
NON NESTED random effects structure in lme()
In particular I've tried the following translation from lmer to lme, as
suggested from some web example
mod1<-lmer(y~x*z+(x*z|factorA1/factorB)+(x*z|factorA
Hi,
I would like write a split function to implement a new split method with the
package RPART.
I see that I can define my split function as specified in the example of
usersplits function, but I don't understand how I can use the variable
"offsets". What is the meaning of these variable?
Tha
It's not too clear to me what you plan to do.
You want to model population growth using a normal distribution?
You should consider the classic differential equation of population growth
and look at variants with species interaction.
For modeling a single species you want to have
dP/dt = r*P (r i
Hey guys,
I´m just getting started with R (version 2.12.0) and odfWeave and kinda
stumble from one problem to the next, the current one is the following:
trying to use odfWeave:
> odfctrl <- odfWeaveControl(
+ zipCmd = c("C:/Program Files/unz552dN/VBunzip.exe $$file$$ .",
+
On Sat, Jan 22, 2011 at 10:07 PM, Matt Curcio wrote:
> Greetings all,
> I am wondering if anyone is aware of any studies that draw a
> relationship between an actor and their box office gross for a movie.
> In other words, is anybody aware of any databases that contain box
> office movie grosses,
68 matches
Mail list logo