[R] .jinit() : Cannot create Java virtual machine

2011-11-14 Thread ahwangyuwei
Dear all, when using .jinit() I get the message .jinit() : Cannot create Java virtual machine (-1). The details: I am using the Dismo package.Dismo has a function 'maxent' that communi-cates with this program(MaxEnt).MaxEnt is available as a stand-alone Java program. It is normal when I

[R] help in fitted values in lm function

2011-11-14 Thread arunkumar1111
Hi, I have a data set of 1 rows and ran a linear regression by using the function lmres = lm(formula,data) then got the fitted value by using the value fit=fitted(lmres). but the number of rows in the fitted one is about 9548, What could be the reason for reduction in the number of rows in

[R] .jinit() : Cannot create Java virtual machine

2011-11-14 Thread ahwangyuwei
Dear all, when using .jinit() I get the message .jinit() : Cannot create Java virtual machine (-1). sessionInfo() R version 2.14.0 (2011-10-31)Platform: i386-pc-mingw32/i386 (32-bit)locale:[1] LC_COLLATE=Chinese_People's Republic of China.936 [2] LC_CTYPE=Chinese_People's Republic of

[R] Error .jcall(mxe, S, fit, c(autorun, -e, afn, -o, dirout, : java.lang.NoSuchMethodError: density.Params.readFromArgs([Ljava/lang/String; )Ljava/lang/String;

2011-11-14 Thread ahwangyuwei
Dear all, I get the error when I use maxent.jar: Error .jcall(mxe, S, fit, c(autorun, -e, afn, -o, dirout, : java.lang.NoSuchMethodError: density.Params.readFromArgs([Ljava/lang/String;)Ljava/lang/String; sessionInfo() result: R version 2.14.0 (2011-10-31)Platform: i386-pc-mingw32/i386

Re: [R] Confused with an error message related to plotrix library in the newer versions of R.

2011-11-14 Thread Jim Lemon
On 11/14/2011 05:59 PM, Prasanth V P wrote: require(plotrix) xy.pop- c(17,15,13,11,9,8,6,5,4,3,2,2,1,3) xx.pop- c(17,14,12,11,11,8,6,5,4,3,2,2,2,3) agelabels- c(0-4,5-9,10-14,15-19,20-24,25-29,30-34, 35-39,40-44,45-49,50-54,55-59,60-64,65+)

Re: [R] help in fitted values in lm function

2011-11-14 Thread Petr PIKAL
Hi Hi, I have a data set of 1 rows and ran a linear regression by using the function lmres = lm(formula,data) then got the fitted value by using the value fit=fitted(lmres). but the number of rows in the fitted one is about 9548, What could be the reason for reduction in the

[R] regular expression for selection

2011-11-14 Thread Petr PIKAL
Dear all I am again (as usual) lost in regular expression use for selection. Here are my data: dput(mena) c(138516_10g_50ml_50c_250utes1_m53.00-_s1.imp, 138516_10g_50ml_50c_250utes1_m54.00_s1.imp, 138516_10g_50ml_50c_250utes1_m55.00_s1.imp, 138516_10g_50ml_50c_250utes1_m56.00_s1.imp,

Re: [R] regular expression for selection

2011-11-14 Thread baptiste auguie
Hi, Try grepl instead of sub, mena[grepl(m5., mena)] HTH, baptiste On 14 November 2011 21:45, Petr PIKAL petr.pi...@precheza.cz wrote: Dear all I am again (as usual) lost in regular expression use for selection. Here are my data: dput(mena)

Re: [R] regular expression for selection

2011-11-14 Thread Jim Lemon
On 11/14/2011 07:45 PM, Petr PIKAL wrote: Dear all I am again (as usual) lost in regular expression use for selection. Here are my data: dput(mena) c(138516_10g_50ml_50c_250utes1_m53.00-_s1.imp, 138516_10g_50ml_50c_250utes1_m54.00_s1.imp, 138516_10g_50ml_50c_250utes1_m55.00_s1.imp,

Re: [R] regular expression for selection

2011-11-14 Thread Petr PIKAL
Hi Hi, Try grepl instead of sub, mena[grepl(m5., mena)] It does not select those m5? strings from those character vectors. I need as an output a vector m53, m54, m55, m56, m57, m58, m59 Regards Petr HTH, baptiste On 14 November 2011 21:45, Petr PIKAL petr.pi...@precheza.cz

[R] Help with text separation

2011-11-14 Thread Michael Griffiths
Good morning R list, My apologies if this has *already* answered elsewhere, but I have not found the answer that I am looking for. I have a character string, i.e. form-c('~ A + B + C + C / D + E + E / F + G + H + I + J + K + L * M') Now, my aim is to find the position of all those instances

Re: [R] regular expression for selection

2011-11-14 Thread Petr PIKAL
Hi On 11/14/2011 07:45 PM, Petr PIKAL wrote: Dear all I am again (as usual) lost in regular expression use for selection. Here are my data: dput(mena) c(138516_10g_50ml_50c_250utes1_m53.00-_s1.imp, 138516_10g_50ml_50c_250utes1_m54.00_s1.imp,

Re: [R] Running totals

2011-11-14 Thread Mark Carter
From: Joshua Wiley jwiley.ps...@gmail.com dat$RTotal - cumsum(dat$BAL) Wow, that's really great. I'm starting to really enjoy using R. My statistical needs are not that great, but I love the way that R handles tabular data. __

Re: [R] regular expression for selection

2011-11-14 Thread Uwe Ligges
On 14.11.2011 10:22, Petr PIKAL wrote: Hi On 11/14/2011 07:45 PM, Petr PIKAL wrote: Dear all I am again (as usual) lost in regular expression use for selection. Here are my data: dput(mena) c(138516_10g_50ml_50c_250utes1_m53.00-_s1.imp, 138516_10g_50ml_50c_250utes1_m54.00_s1.imp,

Re: [R] Confused with an error message related to plotrix library in the newer versions of R.

2011-11-14 Thread Prasanth V P
Hi Jim, It's working perfectly fine with the rxcol parameter. I am just wondering how could I miss that..!!! By the way, many thanks for pointing it out... Otherwise, I would have been using the old version of R for just getting the required plot. Much Appreciated, Prasanth. -Original

[R] Automatic Labeling of Document Clusters

2011-11-14 Thread vioravis
I am performing document clustering on a set of documents using R. I performed hierarchical clustering using hclust and have identified the cluster corresponding to each data point. I would like to lablel each cluster automatically in order to identify the top keywords associated with each

Re: [R] regular expression for selection

2011-11-14 Thread Rainer Schuermann
Does library( stringr ) str_extract( mena, m5[0-9] ) achieve what you are looking for? Rgds, Rainer On Monday 14 November 2011 10:22:09 Petr PIKAL wrote: Hi On 11/14/2011 07:45 PM, Petr PIKAL wrote: Dear all I am again (as usual) lost in regular expression use for selection.

[R] arrow egdes and lty

2011-11-14 Thread Matthias Gondan
Dear R developers, I want to draw an arrow in a figure with lty=2. The lty argument also affects the edge of the arrow, which is unfortunate. Feature or bug? Is there some way to draw an arrow with intact edge, still with lty=2? Example code: plot(1:10) arrows(4, 5, 6, 7, lty=2) Best wishes,

Re: [R] What is the CADF test criterion=BIC report?

2011-11-14 Thread Pfaff, Bernhard Dr.
Hello Paul, just a guess: different sample sizes! In your first call, the sample is shorter than in your second. Hence, you can test this, if you curtail your data set in your second call and then you should obtain the same result, i.e.: library(vars) data(Canada) test -

Re: [R] Odp: Problem using read.xls - Everything converted to factors

2011-11-14 Thread Ronaldo Reis Júnior
Hi, I have this same problem using read.xls in a table that I have NA values. Look: Using the importing from a csv file using read.table summary(dados) TratV1V2 A:5 Min. :1.0 Min. :1.000 B:5 1st Qu.:1.0 1st Qu.:1.000 Median :1.5 Median :2.000

Re: [R] regular expression for selection

2011-11-14 Thread Petr PIKAL
Hi Thank you. It is a pure magic, something taught in Unseen University. this is what I got as a help for selecting only letters from set of character vector. vzor [1] 61A 62C/27 65A/27 66C/29 69A/29 70C/31 73A/31 [8] 74C/33 77A/33 81A/35 82C/37 85A/37 86C/39 89A/39 [15]

Re: [R] regular expression for selection

2011-11-14 Thread Uwe Ligges
On 14.11.2011 11:27, Petr PIKAL wrote: Hi Thank you. It is a pure magic, something taught in Unseen University. this is what I got as a help for selecting only letters from set of character vector. vzor [1] 61A 62C/27 65A/27 66C/29 69A/29 70C/31 73A/31 [8] 74C/33 77A/33

[R] how to include integrate in a function that can be solved with uniroot?

2011-11-14 Thread Gerrit Draisma
Hallo, I am trying to define expectation as an integral and use uniroot to find the distribution parameter for a given expectation. However I fail to understand how to define properly the functions involved and pass the parameters correctly. Can anyone help me out? Thanks, Gerrit Draisma.

Re: [R] arrow egdes and lty

2011-11-14 Thread Ted Harding
On 14-Nov-11 09:57:52, Matthias Gondan wrote: Dear R developers, I want to draw an arrow in a figure with lty=2. The lty argument also affects the edge of the arrow, which is unfortunate. Feature or bug? Is there some way to draw an arrow with intact edge, still with lty=2? Example

Re: [R] arrow egdes and lty

2011-11-14 Thread Dénes TÓTH
Hi, Dear R developers, I want to draw an arrow in a figure with lty=2. The lty argument also affects the edge of the arrow, which is unfortunate. Feature or bug? Is there some way to draw an arrow with intact edge, still with lty=2? AFAIK there is no such option in the arrow function,

[R] How to compute eigenvectors and eigenvalues?

2011-11-14 Thread Arnau Mir
Hello. Consider the following matrix: mp - matrix(c(0,1/4,1/4,3/4,0,1/4,1/4,3/4,1/2),3,3,byrow=T) mp [,1] [,2] [,3] [1,] 0.00 0.25 0.25 [2,] 0.75 0.00 0.25 [3,] 0.25 0.75 0.50 The eigenvectors of the previous matrix are 1, 0.25 and 0.25 and it is not a diagonalizable matrix. When you

[R] [R-pkgs] LaF 0.3: fast access to large ASCII files

2011-11-14 Thread Jan van der Laan
The LaF package provides methods for fast access to large ASCII files. Currently the following file formats are supported: * comma separated format (csv) and other separated formats and * fixed width format. It is assumed that the files are too large to fit into memory, although the package

Re: [R] arrow egdes and lty

2011-11-14 Thread Martin Maechler
Ted Harding ted.hard...@wlandres.net on Mon, 14 Nov 2011 10:39:35 + writes: On 14-Nov-11 09:57:52, Matthias Gondan wrote: Dear R developers, I want to draw an arrow in a figure with lty=2. The lty argument also affects the edge of the arrow, which is

[R] [R-pkgs] amap new version (multidimensional analysis)

2011-11-14 Thread Antoine
Dear R users, Thanks to a new contributor, Luigi Cerulo, amap provides 2 more metrics, and another agglomeration linkage for distance computation, and hierarchical clustering. The new centroid linkage method implemented in the cluster3 software tool

[R] aov output question

2011-11-14 Thread Giovanni Azua
Hello, I currently get anova results out of the aov function (see below) I use the model.tables and I believe it gives me back the model parameters of the fit (betas), however I don't see the intercept (beta_0) and don't understand what the rep output means and there is no description in the

Re: [R] Fit continuous distribution to truncated empirical values

2011-11-14 Thread Michele Mazzucco
Hello David, thanks for your answer. I have done as you told me, however the fit is very poor, much worse than that obtained from using the whole dataset (without upper bound). Any idea? Thanks, Michele On Nov 4, 2011, at 8:56 PM, David Winsemius wrote: On Nov 3, 2011, at 7:54 AM, Michele

[R] correlations between columns for each row

2011-11-14 Thread Rob Griffin
Hello fellow R-users, I’ve been mulling this problem over for some time now and have decided it is something I have to deal with but can’t, so here goes: I have a dataset (called maindata, it is 271 columns *13890 rows so I wont post the entire thing here, I’ll just explain the situation!)

Re: [R] How to compute eigenvectors and eigenvalues?

2011-11-14 Thread Martin Maechler
Consider the following matrix: mp - matrix(c(0,1/4,1/4,3/4,0,1/4,1/4,3/4,1/2),3,3,byrow=T) mp [,1] [,2] [,3] [1,] 0.00 0.25 0.25 [2,] 0.75 0.00 0.25 [3,] 0.25 0.75 0.50 The eigenvectors of the previous matrix are 1, 0.25 and 0.25 and it is not a diagonalizable matrix.

Re: [R] State space model

2011-11-14 Thread Kristian Lind
I found an old thread on R-Sig-Finance with the same problem and a possible solution https://stat.ethz.ch/pipermail/r-sig-finance/2007q2/001362.html I've used with success a few times but it seems a bit slow. If anyone has a better way of modelling state-dependent volatility using one of the

Re: [R] Help with text separation

2011-11-14 Thread Sarah Goslee
Hi, On Mon, Nov 14, 2011 at 4:20 AM, Michael Griffiths griffi...@upstreamsystems.com wrote: Good morning R list, My apologies if this has *already* answered elsewhere, but I have not found the answer that I am looking for. I have a character string, i.e. form-c('~ A + B + C + C / D + E +

[R] Fwd: How to compute eigenvectors and eigenvalues?

2011-11-14 Thread Arnau Mir
Inicio del mensaje reenviado: De: Arnau Mir arnau@uib.es Fecha: 14 de noviembre de 2011 13:24:31 GMT+01:00 Para: Martin Maechler maech...@stat.math.ethz.ch Asunto: Re: [R] How to compute eigenvectors and eigenvalues? Sorry, but I can't explain very well. The matrix 4*mp is:

Re: [R] How to compute eigenvectors and eigenvalues?

2011-11-14 Thread John Fox
Dear Arnau, In this and a subsequent message, you seem to incorrectly infer that the two equal eigenvalues of the matrix imply that it's singular. The rank of the matrix is equal to the number of *nonzero* eigenvalues, here 3, and so the matrix is nonsingular. That two eigenvalues are equal

Re: [R] help in fitted values in lm function

2011-11-14 Thread arunkumar1111
Yes there are few NA in the Data -- View this message in context: http://r.789695.n4.nabble.com/help-in-fitted-values-in-lm-function-tp4038642p4039207.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] What is the CADF test criterion=BIC report?

2011-11-14 Thread Claudio Lupi
In order for the information criteria to be able to select the model, all the models have to be estimated on the same sample. Therefore, all the models are estimated and compared using the same sample used for the model containing the largest number of lags. You can find this and other details in

[R] parralellization without clustering (snow)

2011-11-14 Thread fantomas
Hi, I'm running R in supercomputer where clusters already are configurered, i.e. number of procesors are predefined and I cannot change it. Can I still use package like snow? I'm worrying that command like makeCluster won't be very 'healthy'. Or its ok to use it? Thanks in advance, Tomas --

Re: [R] Enquiry about 2nd-order interactions survival analysis

2011-11-14 Thread Terry Therneau
David's answers were correct. You are looking deep into the code when there is no reason to to so. 1. h(t|(X=x,Z=z)) = exp(Beta0 + XZBeta1) Most statisticians will tell you that this is an unwise model. The reason is that if you replace X with X+1 the fit changes, which is almost never

Re: [R] how to include integrate in a function that can be solved with uniroot?

2011-11-14 Thread R. Michael Weylandt
Try this: EV - function(lamb){ fnc - function(x) x * dexp(x, lamb) integrate(fnc, 0, Inf)$value } Your problem is that there's nothing to translate th to lambda in your code for E. Michael On Mon, Nov 14, 2011 at 5:32 AM, Gerrit Draisma gdrai...@xs4all.nl wrote: Hallo, I am trying

Re: [R] Help with text separation

2011-11-14 Thread Michael Griffiths
Thank you Sarah, Your reply was very helpful. I have the added difficulty that I am not only dealing with single A-Z characters, but quite often have the following situation: form-c('~Sentence+LEGAL+Intro+Intro/Intro1+Intro*LEGAL+benefit+benefit/benefit1+product+action+mean+CTA*help') and

[R] Installing binaries from R-Forge

2011-11-14 Thread Millo Giovanni
Hello. I just installed R 2.14.0 and then did install.packages(splm, repos=http://R-Forge.R-project.org;) in order to replicate your problem. It worked almost fine. The only problem I had was with some missing packages: being a fresh install, all suggested and required packages had to be

Re: [R] how to include integrate in a function that can be solved with uniroot?

2011-11-14 Thread R. Michael Weylandt
You need to explicitly pass th to your function with the ... argument of integrate. E - function(th){ integrate(function(x,th) x*g(x, th), 0, Inf, th)$value } Also, it's value, not Value, which might be producing errors of another sort. Michael On Mon, Nov 14, 2011 at 9:16 AM, Gerrit

Re: [R] Running totals

2011-11-14 Thread Joshua Wiley
Glad it worked! The one gotcha is that it does not handle missing values, so for example: cumsum(c(1, 2, 3, NA, 4)) [1] 1 3 6 NA NA both the NA, and everything after it become NA (missing). If you find yourself working with tables and frequencies and the like, you may also like (if you

Re: [R] Help with text separation

2011-11-14 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 14.11.2011 14:54:05: Thank you Sarah, Your reply was very helpful. I have the added difficulty that I am not only dealing with single A-Z characters, but quite often have the following situation:

Re: [R] Upgrade R?

2011-11-14 Thread Cem Girit
Hello Kevin, Thank you. I will delete the folder and run an application called CCleaner (free). That will remove all the broken registry entries. There should be a problem free update path for R installation. As you rightfully mentioned the R- manual is not clear about package

[R] lme4:glmer with nested data

2011-11-14 Thread hijita
Dear all, I have the following dataset with results from an experiment with individual bats that performed two tasks related to prey capture under different conditions: X variables: indiv - 5 individual bats used in the experiment; all of which performed both tasks task - 2 tasks that each

[R] Understand Ncells and Vcells, from gc()

2011-11-14 Thread Lafaye de Micheaux
Dear all, I am working on a 64 bits Linux system. I issue the following R commands: rm(list=ls()) # To remove all objects in the workspace. gc() # To free memory. used (Mb) gc trigger (Mb) max used (Mb) Ncells 124250 6.7 35 18.7 35 18.7 Vcells 124547 1.0 786432 6.0 476934 3.7 gc()

Re: [R] Help with text separation

2011-11-14 Thread Sarah Goslee
Hi, On Mon, Nov 14, 2011 at 8:54 AM, Michael Griffiths griffi...@upstreamsystems.com wrote: Thank you Sarah, Your reply was very helpful. I have the added difficulty that I am not only dealing with single A-Z characters, but quite often have the following situation:

Re: [R] help in fitted values in lm function

2011-11-14 Thread William Dunlap
If you want fitted() to return NAs in the positions where there were NA's in data, use na.action=na.exclude in your call to lm(). E.g., z - data.frame(y=1:5, x=c(1,NA,3,3,5)) fitted(lm(y~x, data=z)) 1345 1.25 3.25 3.25 5.25 fitted(lm(y~x, data=z,

Re: [R] lme4:glmer with nested data

2011-11-14 Thread Bert Gunter
1. Post this on the R-sig-mixed-models list, not here. 2. (The following advice should be treated cautiously): Forget it! With only 5 bats, you have too little information to estimate variance components. Treat the bats as fixed effects and fit via lm (or glm if some of your responses are not

Re: [R] help in fitted values in lm function

2011-11-14 Thread Timothy Bates
This caught me learning R, and no doubt thousands of others. When would one ever want the results of fitted() or residuals() to NOT match the data frame rows which went into the model? Certainly making shrinking the results the default is not what 99% of user will want if they need to access

Re: [R] Fit continuous distribution to truncated empirical values

2011-11-14 Thread David Winsemius
On Nov 14, 2011, at 6:11 AM, Michele Mazzucco wrote: Hello David, thanks for your answer. I have done as you told me, however the fit is very poor, much worse than that obtained from using the whole dataset (without upper bound). Any idea? Counter questions in the absence of data: ???

[R] max min values within dataframe

2011-11-14 Thread B Laura
dear R-team I need to find the min, max values for each patient from dataset and keep the output of it as a dataframe with the following columns - Patient nr - Region (remains same per patient) - Min score - Max score Patient Region Score Time 11 X19 28 21

Re: [R] Upgrade R?

2011-11-14 Thread Kevin Burton
I am also using statConn so I will let you know if I hear anything new. -Original Message- From: Cem Girit [mailto:gi...@comcast.net] Sent: Monday, November 14, 2011 8:52 AM To: 'Kevin Burton' Cc: r-help@r-project.org Subject: RE: [R] Upgrade R? Hello Kevin, Thank you. I will

Re: [R] max min values within dataframe

2011-11-14 Thread Sarah Goslee
Hi Laura, This looks suspiciously like homework. Nonetheless, you may wish to check out ?cbind. Sarah On Mon, Nov 14, 2011 at 11:10 AM, B Laura gm.spam2...@gmail.com wrote: dear R-team I need to find the min, max values for each patient from dataset and keep the output of it as a dataframe

[R] rugarch data format?

2011-11-14 Thread Kevin Burton
I am sorry to ask this group but the maintainer of this package did not leave an email address. Has anyone used or is using the 'rugarch' package with time-series data (ts)? I try to fit a GARCH model to my data using the following: gf - ugarchfit(data=l[[MEN]]$series, spec=spec) and

Re: [R] Fit continuous distribution to truncated empirical values

2011-11-14 Thread Michele Mazzucco
David, here is the smallest dataset # Bid Price SurvivalCensored 0.030.029 1 1 0.030.029 11 1 0.030.029 10 1 0.030.029 9 1 0.030.029 8 1 0.030.029 7 1 0.030.029 6 1 0.030.029 5 1 0.03

Re: [R] Fit continuous distribution to truncated empirical values

2011-11-14 Thread Bert Gunter
A non-helpful reply on a language issue. Truncated data are quite different than censored data and require different methodologies to analyze. You -- and many others in their postings -- have appeared to confuse the two here. -- Bert On Mon, Nov 14, 2011 at 8:20 AM, Michele Mazzucco

Re: [R] max min values within dataframe

2011-11-14 Thread Joshua Wiley
Hi Laura, You were close. Just use range() instead of min/max: ## your data (read in and then pasted the output of dput() to make it easy) dat - structure(list(Patient = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L,

[R] Very simple loop

2011-11-14 Thread Davg
I'm very new to R and am trying to create my first loop. I have: x -c(0:200) A - dpois(x,exp(4.5355343)) B - dpois(x,exp(4.5355343 + 0.0118638)) C - dpois(x,exp(4.5355343 -0.0234615)) D - dpois(x,exp(4.5355343 + 0.0316557)) E - dpois(x,exp(4.5355343 + 0.0004716)) F - dpois(x,exp(4.5355343 +

[R] size of pdf/eps output

2011-11-14 Thread Johannes Radinger
Hello, I am using a grid.layout for combining multiple ggplot-plots. So far I am doing it this way to get a pdf/eps: pdf(/path/to/my/file.pdf) #or postscript(/path/to/my/file.eps) grid.newpage() pushViewport(viewport(layout = grid.layout(nrow=2, ncol=2, widths =

Re: [R] Very simple loop

2011-11-14 Thread Sarah Goslee
Hi, On Mon, Nov 14, 2011 at 10:59 AM, Davg davidgrim...@hotmail.com wrote: I'm very new to R and am trying to create my first loop. I have: x -c(0:200) A - dpois(x,exp(4.5355343)) B - dpois(x,exp(4.5355343 + 0.0118638)) C - dpois(x,exp(4.5355343  -0.0234615)) D - dpois(x,exp(4.5355343 +

Re: [R] Very simple loop

2011-11-14 Thread jim holtman
x -c(0:200) A - dpois(x,exp(4.5355343)) B - dpois(x,exp(4.5355343 + 0.0118638)) C - dpois(x,exp(4.5355343 -0.0234615)) D - dpois(x,exp(4.5355343 + 0.0316557)) E - dpois(x,exp(4.5355343 + 0.0004716)) F - dpois(x,exp(4.5355343 + 0.056437)) G - dpois(x,exp(4.5355343 + 0.1225822)) total - A + B + C +

Re: [R] Very simple loop

2011-11-14 Thread Joshua Wiley
x -c(0:200) dat - data.frame( A = dpois(x,exp(4.5355343)), B = dpois(x,exp(4.5355343 + 0.0118638)), C = dpois(x,exp(4.5355343 -0.0234615)), D = dpois(x,exp(4.5355343 + 0.0316557)), E = dpois(x,exp(4.5355343 + 0.0004716)), F = dpois(x,exp(4.5355343 + 0.056437)), G =

Re: [R] Very simple loop

2011-11-14 Thread R. Michael Weylandt
But the awesome thing is you don't need a for loop at all thanks to the magic of R's vectorization! This will do it (and much faster than an R level loop would): x = 0:200 # Note that you don't need a c() since you aren't concatenating 0:200 with anything A - dpois(x,exp(4.5355343)) B -

Re: [R] max min values within dataframe

2011-11-14 Thread R. Michael Weylandt
I took a stab at this using ddply() from the plyr package. How's this look to you? x- textConnection(Col Patient Region Score Time 11 X19 28 21 X20 126 31 X22 100 41 X25 191 52 Y121 62 Y

[R] unable to get R CMD to work as expected on a 64 bit windows machine

2011-11-14 Thread Martyn Byng
Hi, I've just downloaded and installed R 2.14.0 using the windows binary on a 64bit windows machine running windows 7. Rterm / RGui work as expected, as does R CMD --help and R CMD BATCH --help however R CMD check --help returns no information and I seem to be unable to check a package.

Re: [R] unable to get R CMD to work as expected on a 64 bit windows machine

2011-11-14 Thread Joshua Wiley
Hi Martyn, My guess is that you need to add the directory where R is located to your Windows PATH variable. It sounds like Windows just doesn't know where to find R. HTH, Josh On Mon, Nov 14, 2011 at 8:48 AM, Martyn Byng martyn.b...@nag.co.uk wrote: Hi, I've just downloaded and installed R

Re: [R] Help with text separation

2011-11-14 Thread David Winsemius
On Nov 14, 2011, at 4:20 AM, Michael Griffiths wrote: Good morning R list, My apologies if this has *already* answered elsewhere, but I have not found the answer that I am looking for. I have a character string, i.e. form-c('~ A + B + C + C / D + E + E / F + G + H + I + J + K + L * M')

Re: [R] unable to get R CMD to work as expected on a 64 bit windows machine

2011-11-14 Thread Martyn Byng
Hi Josh, Thanks for that, which directory needs to be in the path? There is a file called R.exe in C:\Program Files\R\R-2.14.0\bin C:\Program Files\R\R-2.14.0\bin\x64 and C:\Program Files\R\R-2.14.0\bin\i386 I currently have C:\Program Files\R\R-2.14.0\bin\x64 in the path (which is, I'm

Re: [R] Fit continuous distribution to truncated empirical values

2011-11-14 Thread Michele Mazzucco
Bert, I think there is a misunderstanding here. Some data is censored, but I want to fit the data with a distribution in the interval [0,24] only. Also, please note that I have other datasets having values larger than 1000. Cheers, Michele On 14 Nov 2011, at 18:28, Bert Gunter wrote: A

Re: [R] Very simple loop

2011-11-14 Thread Emilio López
Dear David, You do not need a loop. The vectors are equaly sized, so sum them and then plot the vector with the sums: total - A+B+C+D+E+F+G plot (total, type=l) Regards, Emilio 2011/11/14 Davg davidgrim...@hotmail.com I'm very new to R and am trying to create my first loop. I have: x

Re: [R] R v2.13.2 - Cannot find Rcmd on path?

2011-11-14 Thread Henrik Bengtsson
FYI, you can use tools such as Path Manager 1.1.1 (GPL) on Windows: http://www.softpedia.com/get/System/System-Miscellaneous/Path-Manager.shtml to list, modify (add, remove, reorder, remove duplicates, normalize) your PATH environment variable. For each directory it identifies in PATH it will

Re: [R] unable to get R CMD to work as expected on a 64 bit windows machine

2011-11-14 Thread Henrik Bengtsson
See if Rcmd check --help works. I've always been use that form (I'm on Win7 64-bit). /Henrik On Mon, Nov 14, 2011 at 9:06 AM, Martyn Byng martyn.b...@nag.co.uk wrote: Hi Josh, Thanks for that, which directory needs to be in the path? There is a file called R.exe in C:\Program

[R] Plot 2 different fields with image.plot()

2011-11-14 Thread Chris82
Dear R users, Is it possible to plot 2 different fields with image.plot(). For example at first a digitale elevation model and overlying another data field, where NA values are transparent, so that the digitale elevation model is still visble at this areas. Maybe there is another plotting

Re: [R] unable to get R CMD to work as expected on a 64 bit windows machine

2011-11-14 Thread Joshua Wiley
Hi Martyn, I would not expect you to need directories besides Rversion\bin\x64. That is all I normally have in my path...perhaps because I do a complete install? I do not really know how or why it works, so I do not have any great insight---just my experience. Perhaps someone else will chime in

Re: [R] Plot 2 different fields with image.plot()

2011-11-14 Thread David Winsemius
On Nov 14, 2011, at 1:16 PM, Chris82 wrote: Dear R users, Is it possible to plot 2 different fields with image.plot(). There is an add parameter described on the helop page. Have you tried? For example at first a digitale elevation model and overlying another data field, where NA values

Re: [R] unable to get R CMD to work as expected on a 64 bit windows machine

2011-11-14 Thread Martyn Byng
Hi, Thanks for the help. I have now sorted out the issue. Somehow the text C:\Progra~1\R\R-2.14.0\bin\x64\R had got added to the end of an environment variable called comspec. Removing the extraneous text solved the problem - so the only mystery now is how I managed to paste the text into

Re: [R] Very simple loop

2011-11-14 Thread Davg
Thank you all! It's working perfectly. I will have a look for an online guide. -- View this message in context: http://r.789695.n4.nabble.com/Very-simple-loop-tp4039895p4040291.html Sent from the R help mailing list archive at Nabble.com. __

[R] Binary ARMA

2011-11-14 Thread Napon H.
http://r.789695.n4.nabble.com/file/n4040429/model.jpg Hi All I need some help about construct MLE logit for Binary Autogressive Moving Average model. Please see the model in the PDF attach file. This is what i did. y-c(0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1) # y is

[R] about R instalation

2011-11-14 Thread Francisca Soares dos Santos
Hello, I would like to get help on the instalation of R. I have too few free space in my pc hard disk. So I wonder if it is possible to install R on an external removable hard drive. Can it be done? How should I proceed? Thank you for your help. best regards, Francisca A. S. dos Santos Bronner

[R] string to list()

2011-11-14 Thread Kevin Burton
I can get an array of strings for the data that I want using 'paste()' as follows: paste('ma', 1:am$arma[2], '=', coef(am)[1:am$arma[2] + am$arma[1]], sep='') This results in a vector of strings like: [1] ma1=1.17760133668255 ma2=0.649795570407939 ma3=0.329456750858276 What I

Re: [R] about R instalation

2011-11-14 Thread R. Michael Weylandt
I haven't personally used it, but I think this might work: http://sourceforge.net/projects/rportable/ Michael 2011/11/14 Francisca Soares dos Santos fsoaresan...@gmail.com: Hello, I would like to get help on the instalation of R. I have too few free space in my pc hard disk. So I wonder if

Re: [R] Very simple loop

2011-11-14 Thread R. Michael Weylandt
The one included in the standard R installation -- which can be accessed by typing help.start() at your prompt -- is quite good for beginners (and very conveniently located). If you tell us a bit more about yourself, we can help direct you to others as well: specifically, 1) Prior programming

Re: [R] string to list()

2011-11-14 Thread Bert Gunter
Do it in 2 steps: z - as.list( coef(am)[1:am$arma[2] + am$arma[1]]) names(z) - paste(ma,seq_along(z), sep=) -- Bert On Mon, Nov 14, 2011 at 10:40 AM, Kevin Burton rkevinbur...@charter.netwrote: I can get an array of strings for the data that I want using 'paste()' as follows: paste('ma',

[R] Power analysis and sample size calculation for nonlinear regression

2011-11-14 Thread Johannes W. Dietrich
Is there a library that provides power calculation and sample size estimation for nonlinear regression? The task is easy for linear regression with the pwr package, but I can't find a method for nonlinear regression (estimated with the nls package). -- -- -- -- -- -- -- -- -- -- -- -- --

Re: [R] about R instalation

2011-11-14 Thread John C Frain
See R Windows FAQ 2.6 On Monday, 14 November 2011, R. Michael Weylandt michael.weyla...@gmail.com wrote: I haven't personally used it, but I think this might work: http://sourceforge.net/projects/rportable/ Michael 2011/11/14 Francisca Soares dos Santos fsoaresan...@gmail.com: Hello, I

Re: [R] R v2.13.2 - Cannot find Rcmd on path?

2011-11-14 Thread Jixiang Wu
Path manager has a nice feature. Thanks. While I can see that rcmd is in the path setting, it is still not recognized as an internal command. That is something really confuses me. Jixiang Wu On Mon, Nov 14, 2011 at 11:30 AM, Henrik Bengtsson h...@biostat.ucsf.eduwrote: FYI, you can use

[R] Problem with edit()

2011-11-14 Thread Jeff Freedman
Since installing R 2.14.0 on my Mac (a Mac Pro running 10.6.8) an issue has arisen when using the vi editor in conjunction with the edit() command. More specifically, commented lines disappear from edited functions when using [functionname.R] - edit(). That is, if you have created a function

[R] reliability analysis

2011-11-14 Thread Supreet kaur
hello all R experts, how do I calculate the reliability between the two groups using the ICCs? -- Sincerely, Supreet kaur, Biomedical research engineer, Nationwide Childrens Hospital, Columbus, OH (614)355-3509 [[alternative HTML version deleted]]

Re: [R] rearrange set of items randomly

2011-11-14 Thread Greg Snow
If you don't want to go with the simple method mentioned by David and Ted, or you just want some more theory, you can check out: http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle and implement that. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare

[R] Adding units to levelplot's colorkey

2011-11-14 Thread Carlisle Thacker
How to add units (e.g. cm) to the color key of a lattice levelplot? The plots looks fantastic, but it would be nice to indicate somewhere near the end of the color key that the values associated with its colors are in centimeters or some other physical units. The only thing I find is the

Re: [R] Power analysis and sample size calculation for nonlinear regression

2011-11-14 Thread Bert Gunter
May I suggest you consult your local statistician. For reasons that (s)he can answer, your request makes little sense. Hint: Nonlinear regression is much different than linear regression: The design matrix -- and hence the variance of estimators -- is a function of the parameters being estimated.

Re: [R] max min values within dataframe

2011-11-14 Thread Dennis Murphy
Groupwise data summarization is a very common task, and it is worth learning the various ways to do it in R. Josh showed you one way to use aggregate() from the base package and Michael showed you one way of using the plyr package to do the same; another way would be ddply(df, .(Patient, Region),

Re: [R] Problem with edit()

2011-11-14 Thread Jeff Newmiller
There is a difference between parsed functions and .R files. What you see when you type the name of a function alone on the R command line is a text representation of the parsed function that is ready to run in RAM. That has none of the comments or whitespace from the function as you wrote it.

Re: [R] Upgrade R?

2011-11-14 Thread Gene Leynes
I have had similar problems. I have several installations of R and now I have no control over which one opens when I try opening a RData file. The RGUI is registered more than once, but they all have the exact same appearance in the choose programs menu. It's become particularly annoying now

[R] JSS Special Volumes for 2011

2011-11-14 Thread Jan de Leeuw
So far in 2011 JSS has published 4 (four !) special volumes. If you have additional suggestions for special volumes, let us know. Also, submit your JSS-adapted package vignettes. If you like what you see, friend us at http://www.facebook.com/jstatsoft Tabelow and Whitcher, Guest Editors

  1   2   >