Hi,Not sure about the criteria for deciding number of zeros.
vec1<- c(23,244,1343,45,153555,546899,75)
lst1<- strsplit(as.character(vec1),"")
m1<-max(sapply(lst1,length))
res<- t(sapply(lst1,function(x) as.numeric(c(rep(0,m1-length(x)),x
res
# [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
On Thu, Apr 25, 2013 at 7:16 PM, Steven LeBlanc wrote:
> Greets,
>
> I'm trying to learn to use nls and was running the example code for an
> exponential model:
>
>> x <- -(1:100)/10
>> y <- 100 + 10 * exp(x / 2) + rnorm(x)/10
>> nlmod <- nls(y ~ Const + A * exp(B * x))
> Error in B * x : non-nu
Greets,
I'm trying to learn to use nls and was running the example code for an
exponential model:
> x <- -(1:100)/10
> y <- 100 + 10 * exp(x / 2) + rnorm(x)/10
> nlmod <- nls(y ~ Const + A * exp(B * x))
Error in B * x : non-numeric argument to binary operator
In addition: Warning message:
In nl
Hi Everyone,
I am working with the R function "dataEllipse". I plot the 95% confidence
ellipses for several different samples in the same plot and I color-code
the ellipse of each sample, but I do not know how to specify a different
line pattern for each ellipse. I can only modify the pattern for
Hi All,
I am trying to use the C50 package to build classification trees in R.
Unfortunately there is not enought documentation around its use. Can anyone
explain to me - how to prune the decision trees?
Regards,
Indrajit
[[alternative HTML version deleted]]
Is there a way to use read.csv() on such a file without deleting one
of the header rows?
Thanks.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.ht
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, Sapt
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" 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 am getting
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()
é误: 没æ
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
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 inform
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)
>
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 w
Quoting Saptarshi Guha :
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 i
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 locati
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):
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 issue,
On Thu, 25 Apr 2013, Ista Zahn wrote:
On Thu, Apr 25, 2013 at 3:14 PM, Paul Johnson wrote:
On Wed, Apr 24, 2013 at 4:37 PM, Achim Zeileis wrote:
On Wed, 24 Apr 2013, Paul Johnson wrote:
On Wed, Apr 24, 2013 at 3:11 AM,
wrote:
I'm using the package pglm and I'have estimated a "random pr
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
[[al
Great Thanks so much!
On Thu, Apr 25, 2013 at 12:30 PM, John Kane 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 12:04:17 -0
On Thu, Apr 25, 2013 at 3:14 PM, Paul Johnson wrote:
> On Wed, Apr 24, 2013 at 4:37 PM, Achim Zeileis
> wrote:
>> On Wed, 24 Apr 2013, Paul Johnson wrote:
>>
>>> On Wed, Apr 24, 2013 at 3:11 AM,
>>> wrote:
>>>
I'm using the package pglm and I'have estimated a "random probit model".
I
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 u
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
-
On Wed, Apr 24, 2013 at 4:37 PM, Achim Zeileis wrote:
> On Wed, 24 Apr 2013, Paul Johnson wrote:
>
>> On Wed, Apr 24, 2013 at 3:11 AM,
>> wrote:
>>
>>> I'm using the package pglm and I'have estimated a "random probit model".
>>> I need to save in a vector the fitted values and the residuals of t
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...
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]]
__
R-help@r-project.org
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' le
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 usin
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 portion
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 tu
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 w
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 s
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
mailto:rip...@stats.ox.ac.uk>> wrote:
On 25/04/2013 14
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
wrote:
> 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 ver
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'?
EXAMP
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]]
__
R-
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.
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 thou
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
Please take this discussion offlist. It is **not** about R.
-- Bert
On Thu, Apr 25, 2013 at 5:59 AM, Paul Miller 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 idea of using them
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 <-
strsplit(paste(sample(LETTERS,1e6,rep=TRUE),sample(1:10,1
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 wrote:
From: Adams, Jean
Subject: Re: [R] Linear Interpolation : Missing rates
To: "K
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 2.15.3.
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.
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 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 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 inter
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 inste
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 A&M University
College Station, TX 7784
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)
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:
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 2.15.3
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 = "C
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...@wland
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<- l
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 followin
Robin,
On Wed, Apr 24, 2013 at 11:24 AM, Robin Tviet wrote:
>
> 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 documentation is far
> fro
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: r-help@r-projec
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 ver
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: r-
Dear Miao
On 25 April 2013 03:26, jpm miao 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 work with R
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 Hard
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
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.1
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|)
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 ]
On 13-04-25 3:46 AM, Liviu Andronic wrote:
Dear Duncan,
On Wed, Apr 24, 2013 at 11:04 PM, Duncan Murdoch
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
Dear Dr. Harding,
Try
sapply(L, "[", 1)
sapply(L, "[", 2)
HTH,
Jorge.-
On Thu, Apr 25, 2013 at 8:16 PM, Ted Harding wrote:
> 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
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] =
On Apr 25, 2013, at 7:02, Preetam Pal wrote:
> Hi all,
>
> 1>i 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> Then i wan
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"
wrote:
> Dear list,
> When using as.POSIXlt with times measured down to microseconds the default
> format.POSIXlt seems
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 biologica
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"~"choi
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 install.packages("Bi
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
Erro
Dear Duncan,
On Wed, Apr 24, 2013 at 11:04 PM, Duncan Murdoch
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 are loaded.
>> (This
On Wed, Apr 24, 2013 at 9:23 PM, Santosh 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) and tried to
> acce
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".
library("ndvi
76 matches
Mail list logo