Hi all,
1i have 3 vectors a,b and c, each of length 25... i want to define a
new data frame z such that z[1] = (a[1] b[1] c[1]), z[2] = (a[2] b[2] c[2])
and so on...how do i do it in R
2 Then i want to draw bootstrap samples from z.
Kindly suggest how i can do this in R.
Thanks,
Preetam
I'm a student currently working with the *sleepstudy* dataset in
matrix.pkg. It deals with the reaction times of sleep deprived students
over a period of days.
I am trying to model reaction times in order to describe the variation
between students by days they havent slept.
This is what I'm
Hi Jason,
I think that the easiest for you would be to keep your current elseif
statements as is, but change your NA into something else (e.g., -999,
or anything else). To do this in one line, you can use the package
gdata.
In this code, I assume that your data are stored in the variable
Hi Andrew,
I don't know the dataset at all (and you seem to assume that your
readers will), but anyway: it looks like you're trying to do an
intercept-only model. If that's the case, try:
logmod11 - lmer(log(Reaction) ~ 1 + (1|Subject),REML=FALSE)
1 is the intercept, and anything in
Sorry, this list has a No homework policy.
Please ask your lecturer or tutor about this.
cheers,
Rolf Turner
On 25/04/13 14:18, Andrew Cochrane wrote:
I'm a student currently working with the *sleepstudy* dataset in
matrix.pkg. It deals with the reaction times of sleep deprived
Dear r-users,
I would like to investigate about how to fill in missing data. I started with
a complete data and try to introduce missing data into the data series. Then I
would use some method to fill in the missing data and then compare with the
original data how good it is. My question
On 04/24/2013 06:53 PM, Hrachya Astsatryan wrote:
Dear all,
We are doing some research about the time series analysis of NDVI, and
we found the NDVITS package which is a very great tool.
Unfortunately when we run it, after TimeSeriesAnalysis it asks to enter
Village or Country.
On Wed, Apr 24, 2013 at 9:23 PM, Santosh santosh2...@gmail.com wrote:
Dear Rxperts,
Sorry if I am posting a really really dumb request.. I am new to subversion
and am trying to use subversion to download the tables package as suggested
by Duncan. I installed subversion client(from collabnet)
Dear Duncan,
On Wed, Apr 24, 2013 at 11:04 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
What I've done sometimes in debugging is to change that error to a
warning in the getNamespace() function, and add some tracing code to the
serialization code to print the names of objects as they
Hi
I am trying to install a package (bioconductor) but every time I try to install
it I get this message:
source(http://bioconductor.org/biocLite.R;)
Warning in install.packages(BiocInstaller, repos = a[BioCsoft, URL]) :
'lib = C:/Program Files/R/R-3.0.0/library' is not writable
Error in
Hi,
Do you have administrator rights?
Regards,
Pascal
On 04/25/2013 04:19 PM, Gitte Brinch Andersen wrote:
Hi
I am trying to install a package (bioconductor) but every time I try to install
it I get this message:
source(http://bioconductor.org/biocLite.R;)
Warning in
You could use bquote. Something like this:
a-c(1,2,3,4)
b-c(1,2,3,4)
nTrials - length(a)
for (trial in 1:nTrials) {
plot(x=a[1:trial], y=b[1:trial],
ylab=expression(paste(Apple[P])),
xlab=expression(paste(Banana^th)),
main=bquote(italic(i-)~.(trial)^th~choice))
Hi,
I've just started using R and fdrtool, and I'm not sure if the qvalues I'm
receiving back are accurate. I performed fdrtool on pvalues obtained from a two
way anova on proteomics data. So I have 266 data values (protein spots) for two
factors (ft, vr, and the interaction) for each
FAQ 7.31
also if you are using POSIXct for current dates, the resolution is down to
about a milliseconds.
Sent from my iPad
On Apr 24, 2013, at 13:57, O'Hanlon, Simon J simon.ohan...@imperial.ac.uk
wrote:
Dear list,
When using as.POSIXlt with times measured down to microseconds the default
On Apr 25, 2013, at 7:02, Preetam Pal lordpree...@gmail.com wrote:
Hi all,
1i have 3 vectors a,b and c, each of length 25... i want to define a
new data frame z such that z[1] = (a[1] b[1] c[1]), z[2] = (a[2] b[2] c[2])
and so on...how do i do it in R
z - data.frame(a, b, c)
2
Greetings!
For some reason I am not managing to work out how to do this
(in principle) simple task!
As a result of applying strsplit() to a vector of character strings,
I have a long list L (N elements), where each element is a vector
of two character strings, like:
L[1] = c(A1,B1)
L[2] =
Dear Dr. Harding,
Try
sapply(L, [, 1)
sapply(L, [, 2)
HTH,
Jorge.-
On Thu, Apr 25, 2013 at 8:16 PM, Ted Harding ted.hard...@wlandres.netwrote:
Greetings!
For some reason I am not managing to work out how to do this
(in principle) simple task!
As a result of applying strsplit() to a
On 13-04-25 3:46 AM, Liviu Andronic wrote:
Dear Duncan,
On Wed, Apr 24, 2013 at 11:04 PM, Duncan Murdoch
murdoch.dun...@gmail.com wrote:
What I've done sometimes in debugging is to change that error to a
warning in the getNamespace() function, and add some tracing code to the
serialization
I read your data into a dataframe
x - read.table( clipboard )
and renamed the only column
colnames( x )[1] - orig
With a loop, I created a 2nd column miss where in every 10th row the
observation is set to NA:
for( i in 1 : length( x$orig ) )
{
if( as.integer( rownames( x )[ i ] ) %% 10
Juliet,
for you the diagnostic plots:
just to recall:
the first model was this:
fit-gam(target
~s(mgs)+s(gsd)+s(mud)+s(ssCmax),family=quasi(link=log),data=wspe1,method=REML,select=F)
summary(fit)
Parametric coefficients:
Estimate Std. Error t value Pr(|t|)
With reference to R News
News:
R version 3.0.0 (Masked Marvel) has been released on 2013-04-03.
R version 2.15.3 (Security Blanket) has been released on 2013-03-01
R version 2.15.2 (Trick or Treat)
R version 2.15.1 (Roasted Marshmallows) ...
R version 2.15.0 (Easter Beagle)
R version 2.14.0
Hello,
Something like this?
x - scan(text =
125
130.3
327.2
252.2
33.8
6.1
5.1
0.5
0.5
0
2.3
0
0
0
0
0
0
0
0
0
0.8
5.1
0
0.3
0
0
0
0
0
0
45.7
43.4
0
0
0
0
0
)
putMissing - function(x, by){
idx - by*seq_along(x)
idx - idx[which(idx = length(x))]
x[idx] - NA
x
}
Thanks, Jorge, that seems to work beautifully!
(Now to try to understand why ... but that's for later).
Ted.
On 25-Apr-2013 10:21:29 Jorge I Velez wrote:
Dear Dr. Harding,
Try
sapply(L, [, 1)
sapply(L, [, 2)
HTH,
Jorge.-
On Thu, Apr 25, 2013 at 8:16 PM, Ted Harding
Dear Miao
On 25 April 2013 03:26, jpm miao miao...@gmail.com wrote:
I am trying to find out the scale efficiency and optimal scale of banks
by stochastic frontier analysis given the panel data of bank. I am free to
choose any model of stochastic frontier analysis.
The only approach I know to
Thanks Patrick--I think this solution will work perfectly.
Jason
Jason Stout, MD, MHS
Box 102359-DUMC
Durham, NC 27710
FAX 919-681-7494
From: Patrick Coulombe [patrick.coulo...@gmail.com]
Sent: Thursday, April 25, 2013 1:53 AM
To: Jason Stout, M.D.
Cc:
On 04/25/2013 07:46 PM, Ajay Ohri wrote:
With reference to R News
News:
R version 3.0.0 (Masked Marvel) has been released on 2013-04-03.
R version 2.15.3 (Security Blanket) has been released on 2013-03-01
R version 2.15.2 (Trick or Treat)
R version 2.15.1 (Roasted Marshmallows) ...
R
I am not sure but it looks suspiciously like a set of references to the
comicstrip Peanuts by Charlie Shultz. http://en.wikipedia.org/wiki/Peanuts
John Kane
Kingston ON Canada
-Original Message-
From: ohri2...@gmail.com
Sent: Thu, 25 Apr 2013 15:16:17 +0530
To:
Robin,
On Wed, Apr 24, 2013 at 11:24 AM, Robin Tviet robintv...@outlook.comwrote:
I am trying to understand how to use the flexmix package, I have read the
Leisch paper but am very unclear what is needed for the M-step driver. I
am just fitting a simple linear regression model. The
Hi all,
I have 4 matrices, each having 5 columns and 4 rows .denoted by
B1,B2,B3,B4.
I have generated a vector of 7 indices, say (1,2,4,3,2,3,1} which refers to
the index of the matrices to be chosen and then appended one on the top of
the next: like, in this case, I wish to have the
HI,
set.seed(24)
#creating the four matrix in a list
lst1-lapply(1:4,function(x) matrix(sample(1:40,20,replace=TRUE),ncol=5))
names(lst1)- paste0(B,1:4)
vec- c(1,2,4,3,2,3,1)
res-do.call(rbind,lapply(vec,function(i) lst1[[i]]))
dim(res)
#[1] 28 5
#or
B1- lst1[[1]]
B2- lst1[[2]]
B3- lst1[[3]]
Hi,
May be this helps.
L- list(c(A1,B1),c(A2,B2),c(A3,B3))
simplify2array(L)[1,]
#[1] A1 A2 A3
simplify2array(L)[2,]
#[1] B1 B2 B3
#or
library(stringr)
word(sapply(L,paste,collapse= ),1)
#[1] A1 A2 A3
A.K.
- Original Message -
From: ted.hard...@wlandres.net ted.hard...@wlandres.net
On 04/25/2013 12:19 AM, Gitte Brinch Andersen wrote:
Hi
I am trying to install a package (bioconductor) but every time I try to install
it I get this message:
source(http://bioconductor.org/biocLite.R;)
Warning in install.packages(BiocInstaller, repos = a[BioCsoft, URL]) :
'lib =
Hello!
I have Windows 7 Enterprise and two versions of R installed: 2.15.3 and
3.0.0.
Before I had R 3.0 I made it a setting that all .RData files - when I
double-click on them - were opened by R 2.15.3.
Now I want them to be opened by R 3.0 instead of R 2.15.3 (but I don't want
to remove R
Katherine,
Split the rate names into their currency and tenor parts and assign a
numeric value to each tenor. Choose a model to do your approximations (I
used linear regression in the example below). Use this model to generate
estimates for all combinations of currency and tenor.
For example:
First you should read some introductory manuals on R. There are many to
choose from at
http://cran.r-project.org/other-docs.html
For example, your first question is very simple:
z - data.frame(a, b, c)
To draw a single random sample (with replacement) from z:
z1 - z[sample(1:nrow(z), nrow(z),
Another approach:
x[1:length(x) %% 10 == 0] - NA
Just replace 10 by the interval you want. Or to add 5 missing values
randomly:
x[sample(1:length(x), 5)] -NA
-
David L Carlson
Associate Professor of Anthropology
Texas AM University
College Station, TX
On 13-04-25 8:33 AM, Dimitri Liakhovitski wrote:
Hello!
I have Windows 7 Enterprise and two versions of R installed: 2.15.3 and
3.0.0.
Before I had R 3.0 I made it a setting that all .RData files - when I
double-click on them - were opened by R 2.15.3.
Now I want them to be opened by R 3.0
Hi Dr. Therneau,
Thanks for your reply to my question. I'm aware that many on the list do not
like type III SS. I'm not particularly attached to the idea of using them but
often produce output for others who see value in type III SS.
You mention the problems with type III SS when testing
Weird - because I was successful in doing it as I was installing earlier R
versions and moved from an earlier version to a newer version. Never had
any problems with making permanent changes to file associations in any
other programs either.
On Thu, Apr 25, 2013 at 9:00 AM, Duncan Murdoch
Hello!
I am doing Principle Componenets Analysis using psych package:
mypc-principal(mydata,5,scores=TRUE)
However, I was asked to run a case-weighted PCA - using an individual
weight for each case.
I could use corr from boot package to calculate the case-weighed
intercorrelation matrix. But
On 25/04/2013 14:00, Duncan Murdoch wrote:
On 13-04-25 8:33 AM, Dimitri Liakhovitski wrote:
Hello!
I have Windows 7 Enterprise and two versions of R installed: 2.15.3 and
3.0.0.
Before I had R 3.0 I made it a setting that all .RData files - when I
double-click on them - were opened by R
Dear Mr Adams,
Thanks a lot for your solution. I understand it was very tricky and needed lot
of application. Thanks again and do appreciate your efforts.
Regards
Katherine
--- On Thu, 25/4/13, Adams, Jean jvad...@usgs.gov wrote:
From: Adams, Jean jvad...@usgs.gov
Subject: Re: [R] Linear
Well, what you really want to do is convert the list to a matrix, and
it can be done directly and considerably faster than with the
(implicit) looping of sapply:
f1 - function(l)sapply(l,[,1)
f2 - function(l)matrix(unlist(l),nr=2)
l -
Please take this discussion offlist. It is **not** about R.
-- Bert
On Thu, Apr 25, 2013 at 5:59 AM, Paul Miller pjmiller...@yahoo.com wrote:
Hi Dr. Therneau,
Thanks for your reply to my question. I'm aware that many on the list do not
like type III SS. I'm not particularly attached to the
I want to draw boxplot where the geom_points are displayed based on
ERBB2.MUT subset and they should be displayed in the right box (based
both on the ERBB2.2064 field and ERBB2_Status).
However, given my command I currently only see red points corresponding
to MUT subset in one straight line
You've missed the point of my earlier post, which is that type III is not an answerable
question.
1. There are lots of ways to compare Cox models, LRT is normally considered the most
reliable by serious authors. There is usually not much difference between score, Wald,
and LRT tests
Dear all,
I am unable to understand how Hline() works in tabular(). I've read
the vignette and the help page, and here this example compiles
perfectly fine:
latex( tabular( Species + Hline() + 1
~ Heading()*mean*All(iris), data=iris) )
However, if I try it on my own data it fails.
Hi,
The data for my new project are in a bunch of .sql files, instead of the
clasic csv files that I'm used to work with.
Could someone explain to me how to read these files into R?
Thanks,
-Ignacio
[[alternative HTML version deleted]]
__
Hi Bill,
Very clear response.
How about when the missing values are on the response variable being
predicted (y)? That is, the model is fitted only to complete cases, but then
I want to have predictions for all individual y (including those missing).
Can I use the mean for that variable 'y'?
Brian, how do I remove the relevant old Registry entries?
Thank you!
Dimitri
On Thu, Apr 25, 2013 at 10:29 AM, Prof Brian Ripley
rip...@stats.ox.ac.ukwrote:
On 25/04/2013 14:00, Duncan Murdoch wrote:
On 13-04-25 8:33 AM, Dimitri Liakhovitski wrote:
Hello!
I have Windows 7 Enterprise and
On 25/04/2013 17:15, Dimitri Liakhovitski wrote:
Brian, how do I remove the relevant old Registry entries?
That is not an R question. Our sysadmins do it
Thank you!
Dimitri
On Thu, Apr 25, 2013 at 10:29 AM, Prof Brian Ripley
rip...@stats.ox.ac.uk mailto:rip...@stats.ox.ac.uk wrote:
a) See FAQ 2.17
b) Methods for configuring operating systems are off topic here. I will say
there is a REGEDIT program in Windows, but there are potential permissions
complications (you may not have them) and possible collateral damage (don't
touch it if you don't understand it) that mean you
Thanks arun,The second one look ok..thanks indeed
Elisa
Date: Thu, 25 Apr 2013 07:37:25 -0700
From: smartpink...@yahoo.com
Subject: Re: connecting matrices
To: eliza_bo...@hotmail.com
CC: r-help@r-project.org
HI Elisa,
I guess there is a mistake.
Check whether this is what you wanted.
With so little information, one can only guess.
I would guess your .sql files contain scripts written in the SQL
language, in which case you will need some local database support to help
you run those scripts in whatever database has the data. Perhaps the
scripts will output csv files.
If it
The format of files with a SQL extension are not necessarily well- defined. In
most cases I have found, they are text files that contain SQL Data Definition
Language statements (CREATE TABLE) and possibly Data Manipulation Language
statements (INSERT INTO). You may be able to extract the
https://github.com/hadley/devtools/wiki/Reproducibility
John Kane
Kingston ON Canada
-Original Message-
From: angerusso1...@gmail.com
Sent: Thu, 25 Apr 2013 11:09:18 -0400
To: r-help@r-project.org, r-help-requ...@r-project.org
Subject: [R] problem with geom_point in ggplot using a
I have a problem with the RNetCDF package in MacOSX 10.8.3, R3.0.0.
If you have a solution, it would be great !
Thanks a lot.
Marc Girondot
install.packages(RNetCDF)
essai de l'URL
'http://cran.at.r-project.org/bin/macosx/contrib/3.0/RNetCDF_1.6.1-2.tgz'
Content type 'application/x-gzip'
Dear Rxperts/RStudio users,
Is there a way to set tabs (the TAB key) in the text editor of RStudio,
similar to the way customization can be done in Tinn-R?
Thanks and regards,
Santosh
[[alternative HTML version deleted]]
__
On 25/04/2013 3:04 PM, Santosh wrote:
Dear Rxperts/RStudio users,
Is there a way to set tabs (the TAB key) in the text editor of RStudio,
similar to the way customization can be done in Tinn-R?
You're asking on the wrong list. RStudio has its own support forums.
Start on their web site...
On Wed, Apr 24, 2013 at 4:37 PM, Achim Zeileis achim.zeil...@uibk.ac.at wrote:
On Wed, 24 Apr 2013, Paul Johnson wrote:
On Wed, Apr 24, 2013 at 3:11 AM, alfonso.carf...@uniparthenope.it
wrote:
I'm using the package pglm and I'have estimated a random probit model.
I need to save in a vector
I will be giving a webinar on glmnet on Friday May 3, 2013 at 10am PDT (pacific
daylight time)
The one-hour webinar will consist of:
- Intro to lasso and elastic net regularization, and coefficient paths
- Why is glmnet so efficient and flexible
- New features of the latest version of glmnet
I have not use tinn-r in a while but Tools Options Code Editing perhaps?
John Kane
Kingston ON Canada
-Original Message-
From: santosh2...@gmail.com
Sent: Thu, 25 Apr 2013 12:04:17 -0700
To: r-help@r-project.org
Subject: [R] RStudio.. text editor
Dear Rxperts/RStudio users,
On Thu, Apr 25, 2013 at 3:14 PM, Paul Johnson pauljoh...@gmail.com wrote:
On Wed, Apr 24, 2013 at 4:37 PM, Achim Zeileis achim.zeil...@uibk.ac.at
wrote:
On Wed, 24 Apr 2013, Paul Johnson wrote:
On Wed, Apr 24, 2013 at 3:11 AM, alfonso.carf...@uniparthenope.it
wrote:
I'm using the package
Great Thanks so much!
On Thu, Apr 25, 2013 at 12:30 PM, John Kane jrkrid...@inbox.com wrote:
I have not use tinn-r in a while but Tools Options Code Editing
perhaps?
John Kane
Kingston ON Canada
-Original Message-
From: santosh2...@gmail.com
Sent: Thu, 25 Apr 2013
Hi all,
I am trying to run R NDVITS package, and I am getting the following error:
Error in validObject(.Object) :
invalid class GridTopology object: cells.dim has incorrect dimension
Can you please suggest any idea about understanding this error and solving it.
Regards,
Vahe
On Thu, 25 Apr 2013, Ista Zahn wrote:
On Thu, Apr 25, 2013 at 3:14 PM, Paul Johnson pauljoh...@gmail.com wrote:
On Wed, Apr 24, 2013 at 4:37 PM, Achim Zeileis achim.zeil...@uibk.ac.at wrote:
On Wed, 24 Apr 2013, Paul Johnson wrote:
On Wed, Apr 24, 2013 at 3:11 AM,
On 26/04/13 03:40, Terry Therneau wrote:
(In response to a question about computing type III sums of squares in a
Cox regression):
SNIP
If you have customers who think that the earth is flat, global warming
is a conspiracy, or that type III has special meaning this is a
re-education
Hello,
I was looking at the R (installed on RHEL6) shell script and saw
R_HOME_DIR=/usr/lib64/R. Nowhere (and I could have got it wrong) does
it read in the environment value R_HOME_DIR. I have the need to rsync
the entire folder below /usr/lib64/R to another computer into another
directory
Quoting Saptarshi Guha saptarshi.g...@gmail.com:
Hello,
I was looking at the R (installed on RHEL6) shell script and saw
R_HOME_DIR=/usr/lib64/R. Nowhere (and I could have got it wrong) does
it read in the environment value R_HOME_DIR. I have the need to rsync
the entire folder below
SUMMARY:
Specific problem: I'm regridding biomass-burning emissions from a
global/unprojected inventory to a regional projection (LCC over North
America). I need to have boundaries for Canada, Mexico, and US
(including US states), but also Caribbean and Atlantic nations
(notably the Bahamas). I
On Apr 25, 2013, at 7:53 AM, Bert Gunter wrote:
Well, what you really want to do is convert the list to a matrix, and
it can be done directly and considerably faster than with the
(implicit) looping of sapply:
f1 - function(l)sapply(l,[,1)
f2 - function(l)matrix(unlist(l),nr=2)
l -
There are three courses in R at the Summer Institute for Statistics
Genetics, in Seattle this July, ranging from completely introductory to
advanced programming.
The intermediate and advanced courses are taught by me and Ken Rice, the
(new) introductory course by Ken and Tim Thornton.
More
Well...
WIth the same list,l,as before:
system.time(x3 - simplify2array(l))
user system elapsed
2.110.052.20
system.time(x2 - f2(l)) ## the matrix(unlist(...)) one
user system elapsed
0.110.000.11
identical(x2,x3)
[1] TRUE
So kind of a big difference if you
I had this weird encoding issue for my Emacs and R environment. Display of
Chinese characters are all good with my .Rprofile setting
Sys.setlocale(LC_ALL,zh_CN.utf-8); except the echo of input ones.
linkTexts[5]
font
使ç¨å¸®å©
functionNotExist()
é误:
Thanks for this martin. I'll start retooling and let you know how it goes.
Ben Caldwell
Graduate fellow
On Apr 24, 2013 4:34 PM, Martin Morgan mtmor...@fhcrc.org wrote:
On 04/24/2013 02:50 PM, Benjamin Caldwell wrote:
Dear R help,
I've what I think is a fairly simple parallel problem, and
Well, to my understanding, you planned to rsync the original compiled
folder from one machine to somewhere on another machine, and work with it.
Then how about create a file link on the second machine for /usr/lib64/R?
Or maybe I misunderstand your purpose?
On Thu, Apr 25, 2013 at 5:57 PM,
76 matches
Mail list logo