Re: [R] Question concerning anova()

2012-08-22 Thread Bin.You
Hi, I am doing Bayesian Calibration for a model which has 24 parameters using MCMC. I get a sample of 100,000 points from the posterior pdf. Let's say, It is a dataframe named as BC_output, with 24 parameters (V1,V2,V24) I would like to show the Maximum a Posteriori (MAP)parameter value

[R] Question: Random generation from the Zero-truncated Negative Binomial dist.

2012-08-16 Thread Andrius Budnikas
Dear All, I would be very grateful if someone could answer the following question: I am trying to randomly generate values from the zero-truncated negative binomial distribution. I already found rposnegbin in the package VGAM. However, I need a detailed code since I am trying to export it to

[R] question about A2R

2012-08-16 Thread Guido Leoni
Dear List I'm trying to install a package not present in cran named A2R ( http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=79) After running the demo script I retrieve the following error: cannot change value of locked binding for '._a2r_counter' Please could someone give to me a

Re: [R] question about A2R

2012-08-16 Thread David L Carlson
of Anthropology Texas AM University College Station, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Guido Leoni Sent: Thursday, August 16, 2012 6:41 PM To: r-h...@stat.math.ethz.ch Subject: [R] question about

[R] question about windows Rgui.exe startup

2012-08-10 Thread Ryan Rene
Hi all, I had a specific question about the loading of objects into R. I apologize in advance if I have overlooked anything in the manual but as far as I can tell I have yet to find a solution to my problem. I am on a Windows platform. So what I am trying to do is have R read in a binary

Re: [R] question about windows Rgui.exe startup

2012-08-10 Thread Bert Gunter
Read ?Startup _carefully_ (it's pretty dense!). Does the .First file on the search path give you the functionality you seek? -- Bert On Fri, Aug 10, 2012 at 12:34 PM, Ryan Rene ren...@hotmail.com wrote: Hi all, I had a specific question about the loading of objects into R. I apologize in

Re: [R] Question about R and multiple CPU's

2012-08-09 Thread R. Michael Weylandt
On Wed, Aug 8, 2012 at 6:18 PM, Eberle, Anthony ae...@allstate.com wrote: I have a question about multiple cores and CPU's for running R. I've been running various tests on different types of hardware and operating systems (64 bit, 32 bit, Solaris, Linux, Windows, RV.10, .12, .15, .15.1.)

[R] Question about R and multiple CPU's

2012-08-08 Thread Eberle, Anthony
I have a question about multiple cores and CPU's for running R. I've been running various tests on different types of hardware and operating systems (64 bit, 32 bit, Solaris, Linux, Windows, RV.10, .12, .15, .15.1.) Generally speaking, it seems that for a single user and process that R prefers

Re: [R] Question regarding behaviour of package {plspm}

2012-08-03 Thread ArthurDentDK
Hey Arne I don't know about the rounding, but you shouldn't be concerned with the calculation of Q^2. In the line where a value is assigned to RSS, the value is assigned to h+1 as shown here: RSS[h + 1, ] = colSums((Y.old - t.new %*% t(c.new))^2) i.e. the programmer is messing

[R] question on zoo package

2012-08-02 Thread ch chor
Hi all, I have made a lot of attempts with ts package and arima model for forecasting. Now I am looking on zoo package. I follow Gabor's steps from another post on leap years https://stat.ethz.ch/pipermail/r-help/2011-February/269069.html and I am confused in that step: # put dates (without

[R] Question regarding behaviour of package {plspm}

2012-07-31 Thread Arne Erpenbach
Hello everyone, the sources of package{plspm} give me some headaches. rounding: Firstly, rounding is used on different occasions where I would not suspect it. For an example, please have a look at the sources of plsreg1{plspm}. I wonder why to perform rounding within the function, and not when

[R] question

2012-07-21 Thread Mehrab Nodehi
hello can you explain to me about package shapes in R software? especially about order procGPA? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] question about heatmap.2, controlling the visual heights of two dendrograms

2012-07-21 Thread Lan Sky
Hi, I have a question for gplots function heatmap.2. In this function, is there any way to control/know the heights of two dendrograms, such as how many pixels or how many percentage of the whole image the dendrogram have? I need to know the coordinates of northwest corner of real heatmap in the

Re: [R] question

2012-07-21 Thread Sarah Goslee
On Saturday, July 21, 2012, Mehrab Nodehi wrote: hello can you explain to me about package shapes in R software? especially about order procGPA? Not unless you read the posting guide and formulate a more specific question. Sarah -- Sarah Goslee http://www.stringpage.com

[R] question

2012-07-03 Thread Sajeeka Nanayakkara
I have already fitted several models using R code; arima(rates,c(p,d,q))  As I heard, best model produce the smallest AIC value, but maximum likelihood estimation procedure optimizer should converge. How to check whether maximum likelihood estimation procedure optimizer has converged or not?

Re: [R] question

2012-07-03 Thread Rui Barradas
Hello, Inline. Em 03-07-2012 09:22, Sajeeka Nanayakkara escreveu: I have already fitted several models using R code; arima(rates,c(p,d,q)) As I heard, best model produce the smallest AIC value, but maximum likelihood estimation procedure optimizer should converge. How to check whether maximum

Re: [R] question about formatting Dates

2012-06-27 Thread Patrick Connolly
On Tue, 26-Jun-2012 at 10:54PM -0500, Erin Hodgess wrote: | Dear R People: | | I have dates as factors in the following: | | poudel.df$DATE | [1] 1/2/2011 1/4/2011 1/4/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 | [8] 1/9/2011 1/10/2011 | Levels: 1/10/2011 1/2/2011 1/4/2011 1/6/2011

Re: [R] question about formatting Dates

2012-06-27 Thread Rui Barradas
Hello, I'm afraid you're wrong, this has nothing to do with leading zeros. Just see: x - c(1/2/2011, 1/4/2011, 1/4/2011, 1/4/2011, 1/6/2011, 1/7/2011, 1/8/2011, 1/9/2011, 1/10/2011) as.Date(x, %m/%d/%Y) y - factor(x) str(y) as.Date(as.character(y), %m/%d/%Y) Note that the

Re: [R] question about formatting Dates

2012-06-27 Thread David L Carlson
77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Erin Hodgess Sent: Tuesday, June 26, 2012 10:54 PM To: R help Subject: [R] question about formatting Dates Dear R People: I have dates as factors in the following

Re: [R] question about formatting Dates

2012-06-27 Thread arun
A.K. - Original Message - From: Erin Hodgess erinm.hodg...@gmail.com To: R help r-h...@stat.math.ethz.ch Cc: Sent: Tuesday, June 26, 2012 11:54 PM Subject: [R] question about formatting Dates Dear R People: I have dates as factors in the following: poudel.df$DATE [1] 1/2/2011  1/4

[R] question about formatting Dates

2012-06-26 Thread Erin Hodgess
Dear R People: I have dates as factors in the following: poudel.df$DATE [1] 1/2/2011 1/4/2011 1/4/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 [8] 1/9/2011 1/10/2011 Levels: 1/10/2011 1/2/2011 1/4/2011 1/6/2011 1/7/2011 1/8/2011 1/9/2011 I want them to be regular dates which can be sorted,

Re: [R] question about formatting Dates

2012-06-26 Thread R. Michael Weylandt
On Tue, Jun 26, 2012 at 10:54 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: Dear R People: I have dates as factors in the following: poudel.df$DATE [1] 1/2/2011  1/4/2011  1/4/2011  1/4/2011  1/6/2011  1/7/2011  1/8/2011 [8] 1/9/2011  1/10/2011 Levels: 1/10/2011 1/2/2011 1/4/2011

Re: [R] Question on EBImage package

2012-06-21 Thread Martin Morgan
Hi -- EBImage is a Bioconductor package so better to ask there http://bioconductor.org/help/mailing-list/ and to cc the packageDescription(EBImage)$Maintainer Martin On 06/20/2012 02:57 PM, Steven Winter wrote: I am having trouble using the resize function (in the package EBImage) with

Re: [R] Question on EBImage package

2012-06-21 Thread Gregoire Pau
This is a bug, which I just fixed in EBImage 3.13.1. As Martin suggested, please post EBImage-related questions on the Bioconductor mailing list. Greg On 06/20/2012 02:57 PM, Steven Winter wrote: I am having trouble using the resize function (in the package EBImage) with matrices containing

[R] Question on EBImage package

2012-06-20 Thread Steven Winter
I am having trouble using the resize function (in the package EBImage) with matrices containing double values. Let's say I have a matrix 'b' with these values:   a = c(1.25,1.555,1.245,1.265,1.656,1.235,1.848,1.959,1.548,1.245454,1.989,1.24) b = matrix(a,4,3) b   [,1]  [,2] [,3]

[R] Question about sampling

2012-06-14 Thread Guido Leoni
Dear list I wish to extract from a population genotypized for 10 SNP a subsample of the same population of size n with similar allele frequencies. Essentially i have a matrix of 200 rows (df) like this Name,Condition,rs1385699_X,rs6625163_X,rs962458_X,Rs4658627_1, sample01,Case,1,1,1,-1

Re: [R] Question about sampling

2012-06-14 Thread R. Michael Weylandt
sample() takes a prob = argument which lets you supply weights, which need not sum to one so, if I understand you, you could just pass TRUEs and FALSEs for those rows you want. If I'm wrong about that last bit, I'm still pretty confident sample(prob = ) is the way to go. Best, Michael On Thu,

Re: [R] Question about sampling

2012-06-14 Thread Guido Leoni
Sorry I'm not sure that prob is suitable for my purposes(but i'm quite newbie with R). If I correctly understand prob allows to set a weight for each row in the original dataset in order to include the rows on the basis of their weights). ... I'm not sure to correctly understanding ;-) In my case

Re: [R] Question about sampling

2012-06-14 Thread R. Michael Weylandt
I think you're right -- prob probably isn't quite what you need (at least, directly): constrained sampling like this is a little trickier -- I'll leave this to someone who knows more than me. Michael On Thu, Jun 14, 2012 at 9:07 AM, Guido Leoni guido.le...@gmail.com wrote: Sorry I'm not sure

Re: [R] Question about sampling

2012-06-14 Thread Guido Leoni
Just for make the archives more complete and simplifing the life of the following readers. I think to have solved my problem using the caret packages. In this package there is a function named createData Partition that after defining a column of interest in a data.frame allows to split a dataset

Re: [R] question about creating data frame

2012-06-14 Thread Mark Sharp
Below are two equivalent solutions. study_df - data.frame(course = c(rep('Mathematics', 80 + 15), rep('Physics', 32 + 24), rep('Biology', 18 + 29)), A = c(rep(1, 80), rep(0, 15),

[R] Question about persp3d label direction

2012-06-02 Thread 김태균
Hello, R experts I am a new user of rgl package. I want axis label to be parallel to the axis. However, I cannot find any options in package manual. Could you show me how to how to make label be parallel to crresponding axis. Especially, Z axis label, in case that it is long, protrudes out of the

[R] Question on meaning of '%+%', '%?%' (? = various single letter) in code

2012-06-01 Thread Mike Hilt
Hello. I’ve seen several uses of '%?%' in R code (with ? = a single letter or other characters used as the middle character in a 3 character string with '%' as the 1st and 3rd characters). I’ve also recently seen ‘%+%’ usage at: http://vita.had.co.nz/papers/ggplot2-wires.pdf on p. 7 of the

Re: [R] Question on meaning of '%+%', '%?%' (? = various single letter) in code

2012-06-01 Thread peter dalgaard
On Jun 1, 2012, at 00:30 , Mike Hilt wrote: Could someone help me out and let me know what ‘%?%’ (where ? = a single letter in a 3 character string with ‘%’ being the 1st and 3rd characters), and/or ‘%+%’ does in R code/function? They are just a vehicle for defining binary operators:

[R] Question about random Forest function in R

2012-05-29 Thread Kelly Cool
Hello,  I am trying to run the random Forest function on a data.frame using the following code.. myrf - randomForest (y=sample_data_metal, x=Train, importance=TRUE, proximity=TRUE) However, an error occurs saying, can not handle categorical predictors with more than 32 categories.  My

Re: [R] Question about random Forest function in R

2012-05-29 Thread Liaw, Andy
-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Kelly Cool Sent: Tuesday, May 29, 2012 10:47 AM To: r-help@r-project.org Subject: [R] Question about random Forest function in R Hello,  I am trying to run the random Forest function on a data.frame using the following

Re: [R] Question about random Forest function in R

2012-05-29 Thread Liu, Weifeng Aaron
-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Kelly Cool Sent: Tuesday, May 29, 2012 7:47 AM To: r-help@r-project.org Subject: [R] Question about random Forest function in R Hello,  I am trying to run the random Forest function on a data.frame using

[R] question how to add Standard Deviation as Whiskers in a simple plot

2012-05-28 Thread gianni lavaredo
Dear Researchers, sorry for this simple question. I have a point plot with mean values and i wish to plot line with Standard Deviation as Whiskers. I calculate the mean+sd and mean-sd, but i can not figure out the way to add the line. mydata -

Re: [R] question how to add Standard Deviation as Whiskers in a simple plot

2012-05-28 Thread David Winsemius
On May 28, 2012, at 9:55 AM, gianni lavaredo wrote: Dear Researchers, sorry for this simple question. I have a point plot with mean values and i wish to plot line with Standard Deviation as Whiskers. I calculate the mean+sd and mean-sd, but i can not figure out the way to add the line.

Re: [R] question how to add Standard Deviation as Whiskers in a simple plot

2012-05-28 Thread gianni lavaredo
The function i am looking is a bars from the mean points of the plot in boxplot style. I tryed several forum but I have no clear the way to create these bars. Gianni On Mon, May 28, 2012 at 7:13 PM, David Winsemius dwinsem...@comcast.netwrote: On May 28, 2012, at 9:55 AM, gianni lavaredo

Re: [R] question how to add Standard Deviation as Whiskers in a simple plot

2012-05-28 Thread Walmes Zeviani
This post are useful. http://myowelt.blogspot.com.br/2008/03/beautiful-error-bars-in-r.html http://mapas.mma.gov.br/i3geo/pacotes/rlib/win/gplots/html/plotCI.html Walmes. == Walmes Marques Zeviani LEG (Laboratório de

Re: [R] question how to add Standard Deviation as Whiskers in a simple plot

2012-05-28 Thread Rui Barradas
Hello, The function 'arrows' with angle=90 can do the job. mydata - data.frame(mean=c(0.42,0.41,0.41,0.43,0.45,0.43,0.43,0.42,0.44,0.45,0.45,0.45,0.46,0.43,0.42,0.37,0.44,0.46,0.46,0.39,0.40),

[R] Question about extracting certain rows from one column in a data.frame

2012-05-28 Thread Kelly Cool
I was wondering if there was a quick way to extract out certain rows from a data set in R?  I have a data.frame, LOG,  where in one column, sample_data_tx, there is a list of 62 different types of treatment. I've sub-selected the rows that contain the names, PLO and NOY to make a new vector

Re: [R] Question about extracting certain rows from one column in a data.frame

2012-05-28 Thread R. Michael Weylandt
On Mon, May 28, 2012 at 3:16 PM, Kelly Cool kellycoo...@yahoo.com wrote: I was wondering if there was a quick way to extract out certain rows from a data set in R? I have a data.frame, LOG,  where in one column, sample_data_tx, there is a list of 62 different types of treatment. I've

Re: [R] Question about extracting certain rows from one column in a data.frame

2012-05-28 Thread Jorge I Velez
Hi Kelly, Check ?subset in the R console. Here is a piece of code (untested): subset(LOG, sample_data %in% c(Noy, PLO)) HTH, Jorge.- On Mon, May 28, 2012 at 3:16 PM, Kelly Cool wrote: I was wondering if there was a quick way to extract out certain rows from a data set in R? I have a

[R] question about TryCatch and lapply

2012-05-25 Thread John Kerpel
Folks: I've replaced an outer for-loop with lapply and it works great. But, I can't seem to do the following type of exception handling: tryCatch(dlmMLE(x)$value==Inf,error = function(e) NULL) which basically says if the likelihood is Inf, throw an error. But what I want it to do is just go

Re: [R] question about TryCatch and lapply

2012-05-25 Thread jim holtman
Please show us the 'lapply' statement you are using. Here is a simple case of catching an error in an lapply and continuing: lapply(c(1,2,-3, 4), function(x){ + a - try(stopifnot(x 0)) # force an error + if (inherits(a, 'try-error')) return(NULL) + x + }) Error : x 0 is not TRUE

Re: [R] question about TryCatch and lapply

2012-05-25 Thread John Kerpel
Jim: That's the ticket! I'm actually using parLapply with a long, ugly function - so I was loath to post that mess. Many thanks - you saved my weekend. On Fri, May 25, 2012 at 2:23 PM, jim holtman jholt...@gmail.com wrote: Please show us the 'lapply' statement you are using. Here is a

Re: [R] question about TryCatch and lapply

2012-05-25 Thread Martin Morgan
On 5/25/2012 12:48 PM, John Kerpel wrote: Jim: That's the ticket! I'm actually using parLapply with a long, ugly function - so I was loath to post that mess. Many thanks - you saved my weekend. In the context of tryCatch in your question lst - list(1, 2, -3, 4) sapply(lst, function(x)

Re: [R] Question on if i am allowed to do something

2012-05-24 Thread Duncan Murdoch
Subject: Re: [R] Question on if i am allowed to do something On May 23, 2012, at 6:51 PM, Duncan Murdoch wrote: On 12-05-23 1:31 PM, Giannis Mamalikidis wrote: Hello all. I would like to know: provided that I absolutely state that R is not mine and I also include the R’s License which will be shown

Re: [R] Question on if i am allowed to do something

2012-05-24 Thread Marc Schwartz
in Electrical and Mechanical Engineering --- -Original Message- From: Marc Schwartz Sent: Thursday, May 24, 2012 3:58 AM To: Duncan Murdoch Cc: Giannis Mamalikidis ; r-help@r-project.org Subject: Re: [R] Question

Re: [R] Question on if i am allowed to do something

2012-05-24 Thread Giannis Mamalikidis
--- -Original Message- From: Marc Schwartz Sent: Thursday, May 24, 2012 3:58 AM To: Duncan Murdoch Cc: Giannis Mamalikidis ; r-help@r-project.org Subject: Re: [R] Question on if i am allowed to do something On May 23, 2012, at 6:51 PM, Duncan Murdoch wrote: On 12-05-23 1:31 PM, Giannis

Re: [R] Question on if i am allowed to do something

2012-05-24 Thread Giannis Mamalikidis
I see. It is decided then. As it might be possible that the license might be violated, I certainly will not include R in my programme. Thank you all for your help, you've been very helpful. --- Giannis Mamalikidis

[R] Question on if i am allowed to do something

2012-05-23 Thread Giannis Mamalikidis
Hello all. I would like to know: provided that I absolutely state that R is not mine and I also include the R’s License which will be shown so people know R and R’s license, (provided the above) am I allowed to include R’s folder (the folder that has its binaries) on my freeware program or

Re: [R] Question on if i am allowed to do something

2012-05-23 Thread Duncan Murdoch
On 12-05-23 1:31 PM, Giannis Mamalikidis wrote: Hello all. I would like to know: provided that I absolutely state that R is not mine and I also include the R’s License which will be shown so people know R and R’s license, (provided the above) am I allowed to include R’s folder (the folder that

Re: [R] Question on if i am allowed to do something

2012-05-23 Thread Marc Schwartz
On May 23, 2012, at 6:51 PM, Duncan Murdoch wrote: On 12-05-23 1:31 PM, Giannis Mamalikidis wrote: Hello all. I would like to know: provided that I absolutely state that R is not mine and I also include the R’s License which will be shown so people know R and R’s license, (provided the

[R] question about sign test

2012-05-20 Thread T Bal
Hi, I want to compute p value of sign test for sample size=15 from normal distr., sd=0.5, mean=1, alternative should be two sided. Is this code correct in this situation? binom.test(sum(rnorm(15,1,0.5)0),15,p=0.5,alternative=two)$p.value Or should I use another code (function) e.g. rbinom?

Re: [R] question about sign test

2012-05-20 Thread Joshua Wiley
Hi, That seems a reasonable enough approach to me. (p - pnorm(0, mean = 1, sd = .5)) is the probability of a value being less than or up to 0 from the distribution you specified. Using that, lets repeat your little test 1000 times using your code, and then using ribnom() where the probability

[R] question about creating data frame

2012-05-15 Thread T Bal
Hello, My data is study.txt: Not A A Mathematics 80 15 Physics 32 24 Biology 18 29 I want to transform this data into with column names 'course' and 'A': course A 1 Mathematics 1 2 Mathematics 1

[R] question about creating data frame

2012-05-15 Thread T Bal
Hello, My data is study.txt: A Not A Mathematics 80 15 Physics 32 24 Biology 18 29 I want to transform this data into with column names 'course' and 'A': course A 1 Mathematics 1 2 Mathematics

Re: [R] question about creating data frame

2012-05-15 Thread jim holtman
try this: x - read.table(text = 'Not A A + Mathematics 80 15 + Physics 32 24 + Biology 18 29', skip = 1, as.is = TRUE) # create the result result - do.call(rbind, lapply(1:nrow(x), function(.row){ + data.frame(course = x$V1[.row] + , A = c(rep(1, x$V2[.row]), rep(0, x$V3[.row]))

[R] question about transforming data into data frame object

2012-05-06 Thread E Atescelik
Hi,I had a question about transforming data into data frame object with two columns. I have data genal2.txt (see attachment) My data frame called genal2frame has to be in the form: genal2frame[1:6,] y mut 10.51056180.005 20.34283920.005 30.5490900

Re: [R] question about transforming data into data frame object

2012-05-06 Thread Jeff Newmiller
Not sure what your question was. Perhaps you could look up the reshape2 package and ask a more specific question? --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.us

Re: [R] question about transforming data into data frame object

2012-05-06 Thread David Winsemius
On May 6, 2012, at 3:56 PM, E Atescelik wrote: Hi,I had a question about transforming data into data frame object with two columns. I have data genal2.txt (see attachment) My data frame called genal2frame has to be in the form: genal2frame[1:6,] y mut 1

[R] Question about expand.grid function in R

2012-05-01 Thread Kelly Cool
Hi, I am extremely new to R, and was wondering if someone would be able to help me with a question regarding the expand.grid function. When I input expand.grid.rep - function(x, n=1) do.call(expand.grid, rep(list(x),n)) expand.grid.rep(c(a, b, c), 3) my output is as follows, Var1 Var2 Var3 1  

Re: [R] Question about expand.grid function in R

2012-05-01 Thread R. Michael Weylandt
I don't think you can do it within expand.grid() but something like this might work: rownames(x) - apply(x, 1, paste, collapse = ) Michael On Tue, May 1, 2012 at 5:05 AM, Kelly Cool kellycoo...@yahoo.com wrote: Hi, I am extremely new to R, and was wondering if someone would be able to help

Re: [R] question on jitter in plot.Predict in rms

2012-05-01 Thread Frank Harrell
Mike, Try plot(pref, ..., scat1d.opts=list(frac=0.025, lwd=0.3, nhistSpike=i)) where i = 1 to always use spike histograms (default is to use them if n = 2000) or i=1e7 to never use them and to always jitter instead. There are many other scat1d options you can pass through scat1d.opts. Frank

Re: [R] Question about expand.grid function in R

2012-05-01 Thread peter dalgaard
On May 1, 2012, at 15:36 , R. Michael Weylandt wrote: I don't think you can do it within expand.grid() but something like this might work: rownames(x) - apply(x, 1, paste, collapse = ) Also rownames(x) - do.call(paste, c(x, sep=)) or, in recent versions, rownames(x) - do.call(paste0,

[R] question on jitter in plot.Predict in rms

2012-04-30 Thread Mike Babyak
Dear colleagues, I have a question regarding controlling the jitter when plotting predictions in the rms package. Below I've simulated some data that reflect what I'm working with. The model predicts a continuous variable with an ordinal score, a two-level group, and a continuous covariate. Of

[R] question about lists

2012-04-19 Thread harry mamaysky
I am new to R, and I have been running into the following situation when I mistype a variable name in some code: list1 - list( a=1, b=2 ) list2 - list( a=1 ) list2$b - list1$c list2 $a [1] 1 I would think at the point where I am trying to reference a field called c -- that does not exist --

Re: [R] question about lists

2012-04-19 Thread Duncan Murdoch
On 12-04-19 3:11 PM, harry mamaysky wrote: I am new to R, and I have been running into the following situation when I mistype a variable name in some code: list1- list( a=1, b=2 ) list2- list( a=1 ) list2$b- list1$c list2 $a [1] 1 I would think at the point where I am trying to reference a

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-16 Thread Uwe Ligges
You may want to send the files as well as what you exactly typed in the shell in a private message. Uwe Ligges On 15.04.2012 20:09, Katharine Miller wrote: Yes. I have version 2.15.0 of Rtools as well. I went ahead and re-installed both R and Rtools just to make sure everything was OK. But

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-15 Thread Uwe Ligges
On 14.04.2012 21:53, Katharine Miller wrote: OK. So, I have 64 bit Windows 7 and I have installed R 2.15.0 Yes, and have you also installed version 2.15 of the Rtools? Uwe ligges Thanks 2012/4/14 Uwe Liggeslig...@statistik.tu-dortmund.de On 14.04.2012 19:01, Katharine Miller

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-15 Thread Katharine Miller
Yes. I have version 2.15.0 of Rtools as well. I went ahead and re-installed both R and Rtools just to make sure everything was OK. But that did not fix the problem. - Katharine 2012/4/15 Uwe Ligges lig...@statistik.tu-dortmund.de On 14.04.2012 21:53, Katharine Miller wrote: OK. So, I

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-14 Thread Uwe Ligges
On 14.04.2012 00:24, Katharine Miller wrote: Hi, I have some C++ code that I compiled into a dll for use in 32 bit R and would like to recompile for use in 64bit R. I thought it would be as easy as going to R-2.15.0\bib\x64 and running R CMD SHLIB mfregRF.c Is this Windows? 1. If so, is

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-14 Thread Katharine Miller
Hi, Sorry - I should have said that I was using Windows 7 on a 64 bit computer in my earlier post. I used the installer to install R, I did not do a build from source. I have read the installation instructions. Both R and Rtools are first in my path, but by toolchain do you mean that I need to

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-14 Thread Uwe Ligges
On 14.04.2012 19:01, Katharine Miller wrote: Hi, Sorry - I should have said that I was using Windows 7 on a 64 bit computer in my earlier post. Which Windows 7? 64-bit or 32-bit? I used the installer to install R, I did not do a build from source. I have read the installation

Re: [R] Question with R CMD SHLIB in 64 bit R

2012-04-14 Thread Katharine Miller
OK. So, I have 64 bit Windows 7 and I have installed R 2.15.0 Thanks 2012/4/14 Uwe Ligges lig...@statistik.tu-dortmund.de On 14.04.2012 19:01, Katharine Miller wrote: Hi, Sorry - I should have said that I was using Windows 7 on a 64 bit computer in my earlier post. Which Windows 7?

[R] Question with R CMD SHLIB in 64 bit R

2012-04-13 Thread Katharine Miller
Hi, I have some C++ code that I compiled into a dll for use in 32 bit R and would like to recompile for use in 64bit R. I thought it would be as easy as going to R-2.15.0\bib\x64 and running R CMD SHLIB mfregRF.c but that doesn't do anything. It doesn't give me any error messages, but it also

[R] Question on Counting Factors

2012-04-11 Thread Daniel Gabrieli
Hi, I hope this is not too trivial, but I've had this recurring problem and I think there is super easy solution, just not sure what it is. Please see short example below.  I would like to get the frequency (counts) of all the variables in a single column (that is easy), but I would also like to

Re: [R] Question on Counting Factors

2012-04-11 Thread David Winsemius
On Apr 11, 2012, at 9:21 AM, Daniel Gabrieli wrote: Hi, I hope this is not too trivial, but I've had this recurring problem and I think there is super easy solution, just not sure what it is. Please see short example below. I would like to get the frequency (counts) of all the variables in a

Re: [R] Question on Counting Factors

2012-04-11 Thread David Barron
This would do it in your example: levels(animals$V1) - c(cat,tiger,dog,fish) table(animals) cattigerdog fish 2 200 HTH David cat tiger dog fish 2 2 0 0 On 11 April 2012 14:21, Daniel Gabrieli daniel.gabri...@gmail.com wrote:

Re: [R] Question on Counting Factors

2012-04-11 Thread S Ellison
I would like to get the frequency (counts) of all the variables in a single column (that is easy), but I would also like to return the value 0 for the absence of variables defined in another column. If you use factor() on your columns and include all the animals in the factor levels, you

Re: [R] Question on Counting Factors - PS

2012-04-11 Thread S Ellison
-Original Message- This would do it in your example: levels(animals$V1) - c(cat,tiger,dog,fish) table(animals) cattigerdog fish 2 200 But be very wary of levels(animals$V2)- c(cat,tiger,dog,fish) table(animals$V2) cat tiger dog

[R] Question on harmonic (Fourier) analysis of sinusoidal time series

2012-04-09 Thread holden999
Hello, I will try to explain the problem, sorry if it will be a little long... I'm using R to analyze results of cyclic mechanical testing, like this: - apply quasi-sinusoidal load - measure quasi-sinusoidal vertical and horizontal deformations (quasi-sinusoidal load means that load should be

Re: [R] Question about randomForest

2012-04-04 Thread Liaw, Andy
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Saruman I dont see how this answered the original question of the poster. He was quite clear: the value of the predictions coming out of RF do not match what comes out of the predict function using

Re: [R] Question about randomForest

2012-04-03 Thread Saruman
I dont see how this answered the original question of the poster. He was quite clear: the value of the predictions coming out of RF do not match what comes out of the predict function using the same RF object and the same data. Therefore, what is predict() doing that is different from RF? Yes, RF

[R] question

2012-03-22 Thread Anjana Thampi
How do you run a regression in R? [[alternative HTML version deleted]] __ 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.html and provide

Re: [R] question

2012-03-22 Thread R. Michael Weylandt
By googling. On Thu, Mar 22, 2012 at 11:37 PM, Anjana Thampi thampi.anjana...@gmail.com wrote: How do you run a regression in R?        [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Question abou pROC package

2012-03-20 Thread hexiangxiang
How can I implement multiple testing with Bonferroni correction of ROC curve in R?? -- View this message in context: http://r.789695.n4.nabble.com/Question-abou-pROC-package-tp4488271p4488271.html Sent from the R help mailing list archive at Nabble.com.

[R] Question about hierarchical clustering

2012-02-29 Thread Guido Leoni
Dear List i'm performing hierarchical clustering analysis with ward method. My best clusters are choosen according to silhouette score... Now I'd like to select the most representative term in each cluster. Do you think that searching for medoids could be a good idea? Here is the code that I use

[R] Question about tables in bigtabulate

2012-02-29 Thread steven mosher
I have a large file backed big. matrix, with millions of rows and 20 columns. The columns contain data that I simply need to tabulate. There are a few dozen unique values. and I just want a frequency count Test code with a small big matrix. library(bigmemory) library(bigtabulate) test -

[R] question about user written function (newb question)

2012-02-26 Thread knavero
Quick newb question about R relating to the line of code below: rawCool = read.zoo(cooling.txt, FUN = as.chron, format = %m/%d/%Y %H:%M, sep = \t, aggregate = function(x) tail(x, 1)) I'm wondering what the specifics are for the argument where it has aggregate = function(x) tail(x, 1). I

Re: [R] question about user written function (newb question)

2012-02-26 Thread R. Michael Weylandt
Short answer to a very good question: one has to use function(x) tail(x, 1) syntax to avoid using the default tail(x, 6). There are some other ways to achieve the same thing, but I think this syntax is generally preferred for its clarity. Other question: yes I believe so. Michael On Sun, Feb

Re: [R] question about user written function (newb question)

2012-02-26 Thread Gabor Grothendieck
On Sun, Feb 26, 2012 at 9:06 AM, knavero knav...@gmail.com wrote: Quick newb question about R relating to the line of code below: rawCool = read.zoo(cooling.txt, FUN = as.chron, format = %m/%d/%Y %H:%M, sep = \t, aggregate = function(x) tail(x, 1)) I'm wondering what the specifics are for

[R] question on axis labels

2012-02-20 Thread Gerard Smits
Hi All, I'm trying to label my plot axis with times (HH:MM) that correspond to a numeric index (values 0:6) for my time variable. I'd like to plot 08:00, 12:00, and so on, instead of 0 through 6. I have used the following line of code: axis(1, 0:6, labels=c(08:00, 12:00, 16:00, 20:00,

Re: [R] question on axis labels

2012-02-20 Thread Sarah Goslee
This works for me: plot(0:6, runif(7), xaxt=n) axis(1, at=0:6, labels=c(08:00, 12:00, 16:00, 20:00, 24:00, 04:00, 08:00), cex=0.8) You need the xaxt=n in the plot statement, and the correct form is at=0:6 Sarah On Mon, Feb 20, 2012 at 6:39 PM, Gerard Smits g_sm...@verizon.net wrote: Hi

Re: [R] question on axis labels

2012-02-20 Thread Gerard Smits
Worked like a charm! Thanks for your help. Gerard On Feb 20, 2012, at 3:52 PM, Sarah Goslee wrote: This works for me: plot(0:6, runif(7), xaxt=n) axis(1, at=0:6, labels=c(08:00, 12:00, 16:00, 20:00, 24:00, 04:00, 08:00), cex=0.8) You need the xaxt=n in the plot statement, and the

Re: [R] question

2012-02-15 Thread R. Michael Weylandt
Sorry about that -- forgot the case where you might only have a certain entry once: try this, sapply(split(GS, rownames(GS)), function(x) colSums(as.matrix(x))) or sapply(split(GS, rownames(GS)), function(x) if(is.matrix(x)) colSums(x) else x) I'm not sure if there's a way to force split to

Re: [R] question

2012-02-15 Thread R. Michael Weylandt
Blah! Forget that first one -- the second one should be fine. (or at least, I don't see a problem with it immediately) sapply(split(GS, rownames(GS)), function(x) if(is.matrix(x)) colSums(x) else x) Michael On Wed, Feb 15, 2012 at 7:19 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote:

<    3   4   5   6   7   8   9   10   11   12   >