Re: [R] plotting multiple variables

2013-10-28 Thread Jim Lemon
On 10/28/2013 04:53 PM, Hansol Yu wrote: When my data has 50 rows, 100 columns and class column. How can I plot this data and show classes? Do I have to draw 100 lines? Hi Hansol, I doubt that anyone on the R help list really knows the answer to your question unless your lecturer is one of

Re: [R] dunnett test questions

2013-10-28 Thread Achim Zeileis
On Sun, 27 Oct 2013, Imran Akbar wrote: Hi, I've got a data set with a control group and a number of experimental groups, that have unequal sample sizes, and am measuring the number of people in each that respond yes or no. I'd like to use a dunnett test in R, where the syntax is supposed

[R] Different information between correlation and frequency of a seasonal time series

2013-10-28 Thread Stefano Sofia
Dear R users, I have a seasonal rainfall time series x. acf(x) shows correlation at lags 4, 8 and 12, but frequency(x) is 1. I would have expected frequency equal to 4. Moreover, acf(diff(aso,4,1)) shows a correlation only at lag 4, while acf(diff(aso,4,2)) shows a correlation at lags 4 and 8

Re: [R] add a color band

2013-10-28 Thread Alaios
Hi Jim and thanks for your answer... I might be too tired with my new born or just exhausted. I am sharing for everyone a small data snipset that you can load https://www.dropbox.com/s/fh8jhwujgunmtrb/DataToPlotAsImage.Rdata load(DataToPlotAsImage.Rdata) require(plotrix) browser() test-data

Re: [R] Code Book from SPSS Data

2013-10-28 Thread Gesmann, Markus
Peter, There is a function called codebook as part of the memisc package that probably does what you want. See also the package vignette: http://cran.r-project.org/web/packages/memisc/vignettes/anes48.pdf library(memisc) fn - NILT12w2.por dat - spss.portable.file(fn) codebook(dat) names(dat)

[R] coxph: how to define interaction terms?

2013-10-28 Thread rm
I’m trying to set up Cox Proptional Hazard model with interactions between time and the covariates (which are categorical). The problem that I face is that how to define the interactions, i.e. “x+cutStart:x”, properly. The code below illustrates the problem. R gives the error message ” X matrix

[R] Package for PAV and MPAV algorithms

2013-10-28 Thread Babak Bastan
Hi experts, Is there any packag for PAV and MPAV algorithms (Pattern Anomaly Value) [[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

Re: [R] plotting multiple variables

2013-10-28 Thread Duncan Mackay
Hi Hansol, If you know the lattice system library(lattice) library(latticeExtra) useOuterStrips( xyplot(y ~ x|class, data = dat, ...) ) See also ? combineLimits Otherwise mfrow(10,10) and loop your data to plot This is about as far as I can go - I have the same comment as Jim Regards

Re: [R] Problem with coordinates when trying to draw lines into a raster (image) file

2013-10-28 Thread Adams, Jean
Rick, I see a couple errors in my code ... you will need to attach the MASS package for the eqscplot() function and that function's first arguments should be any coordinates, I use (1, 1) library(jpeg) library(MASS) # download image from internet for use in example #

Re: [R] bug in dummy.coef?

2013-10-28 Thread Martin Maechler
Rolf Turner r.tur...@auckland.ac.nz on Sat, 26 Oct 2013 09:34:14 +1300 writes: On 10/25/13 19:24, Alexandra Kuznetsova wrote: Thank you for the reply! I need to use it in the package for constructing the contrast matrices. Really? Renaming a variable like y2 -

Re: [R] Revo R for Arima Implementation

2013-10-28 Thread Anindita Chattopadhyay
Hi Rolf, Thanks for the response. I have re-phrased the problem. Hope this will help. We're working on a project where our model tries to predict the value of bookings as a time series of past bookings as well as some external flags. The data was found to be stationary using the Dicky-Fuller

[R] pie graphs in log scale axis

2013-10-28 Thread Ortiz, John
Dear list users, I'm doing a plot integrating Grid output with Base Graphics output (gridBase, Murrell 2012). My goal is to produce a xy plot where each point is represented by a pie. I could get it using the attach code, but now I want to change the X axis to log scale. when I introduce

[R] How to extract residuals from multiple regressions from a loop

2013-10-28 Thread Ben Ammar
Dear all I've got the following problem, I want to extract the residuals from regression loops. The problem here is that some columns include NA's at the beginning and end (i.e. each time series of stocks starts at different points in time and ends at different points in

Re: [R] R-help Digest, Vol 128, Issue 30

2013-10-28 Thread Lorenz, David
Pavlos, There are several ways to evaluate how well new data fit an old regression.Part of the answer depends on what you are concerned about. For example, if you are concerned about bias, you can test whether the mean of the new data is within the expected range of the mean of that many new

Re: [R] coxph: how to define interaction terms?

2013-10-28 Thread rm
The output is as follows. My question is how to include only the interaction terms where x is equal to Maintained. (x has two possible values Maintained and Nonmaintained.) -- View this message in context:

[R] Optimization failed in fitdistr (Weibull distribution)

2013-10-28 Thread kmmoon100
Hello everyone, This is Kangmin. I am trying to produce shape and scale of my wind data. My data is based on wind speed frequency with 1km/hr increment. data is described below. Windspeed (km/h)Frequency 1 351 2 147 3 317 4 378 5 527 6 667 7 865 8

Re: [R] Problems with lme random slope+intercept model

2013-10-28 Thread anord
Dear Ben, Thank you, I agree. I have forwarded this to the r-sig-mixed-models list. Best, Andreas -- View this message in context: http://r.789695.n4.nabble.com/Problems-with-lme-random-slope-intercept-model-tp4679104p4679168.html Sent from the R help mailing list archive at Nabble.com.

[R] Optimization fail error from fitdistr (Weibull distribution)

2013-10-28 Thread kmmoon100
Hello everyone, This is Kangmin. I am trying to produce shape and scale of my wind data. My data is based on wind speed frequency with 1km/hr increment. data is described below. Windspeed (km/h)Frequency 1 351 2 147 3 317 4 378 5 527 6 667 7 865 8 970 9 987 10 907 11 905 12

Re: [R] indicating significant differences in boxplots

2013-10-28 Thread Johannes Radinger
Hi, I'd like to follow up an older discussion on adding significance stars to boxplots. ( http://r.789695.n4.nabble.com/indicating-significant-differences-in-boxplots-td862335.html ) As suggested by Jim Lemon, there is following solution for a single boxplot: boxplot(count ~ spray, data =

[R] Countour for netCDF-like meshes

2013-10-28 Thread Julio Sergio Santana
Hi, A model gives me as output a netCDF file which I read with ncdf package. The output consists of three similar matrices: one contains the variable value, and the other two, the longitude and latitude coordinates. I need to do a contour graph with such information, however, the R contour

Re: [R] Optimization failed in fitdistr (Weibull distribution)

2013-10-28 Thread Rui Barradas
Hello, I can't reproduce your error: windfreq - c(1351L, 2147L, 3317L, 4378L, 5527L, 6667L, 7865L, 8970L, 9987L, 10907L, 11905L, 12642L, 131000L, 14983L, 15847L, 16842L, 17757L, 18698L, 19632L, 20626L, 21599L, 22529L, 23325L, 24391L, 25356L, 26267L, 27230L, 28223L, 29190L, 30142L, 31124L,

Re: [R] Optimization failed in fitdistr (Weibull distribution)

2013-10-28 Thread Berend Hasselman
On 28-10-2013, at 16:07, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, I can't reproduce your error: windfreq - c(1351L, 2147L, 3317L, 4378L, 5527L, 6667L, 7865L, 8970L, 9987L, 10907L, 11905L, 12642L, 131000L, 14983L, 15847L, 16842L, 17757L, 18698L, 19632L, 20626L, 21599L, 22529L,

Re: [R] How to extract residuals from multiple regressions from a loop

2013-10-28 Thread William Dunlap
Can you trim down your example to a size where you can show us the data (using dump() or dput()) and the commands you used so one can just copy it from your mail and paste it into R to reproduce the problem? I don't see your problem when I made up data similar to what you described: timeseries

[R] linear line in x, y plot

2013-10-28 Thread Ahmed Attia
Hi I have a question about drawing a linear line in x, y plot. I usually use the following code, but for this time the x values are to small (-0.08 to -0.02) I wrote the following code, but r does not draw the line. However, it does not give an error when it takes the code. reg1- lm(CWSI~NWI,

[R] Error:Data is not atomic

2013-10-28 Thread Babak Bastan
Hi experts, I want to user haar wavelet transform. If I am using this simple command, it works nice: k-c(1,2,3,4,5,6,7,8) ywd-wd(k,filter.number=1,family=DaubExPhase) but if the K is a list like this: *[[1]]* *[1] 401* * * *[[2]]* *[1] 481* * * *[[3]]* *[1] 480* * * *[[4]]* *[1] 482* * *

Re: [R] How to extract residuals from multiple regressions from a loop

2013-10-28 Thread Adams, Jean
Ben, It helps us help you if you provide a simple example with code that anyone can run. When I created a simplified version of you situation, the NAs in the response variable yielded NAs in the residuals just as the help for na.exclude indicates. ?na.exclude Can you replicate the problem (and

Re: [R] Revo R for Arima Implementation

2013-10-28 Thread Jeff Newmiller
You still don't seem to get the hint that support that is SPECIFIC to Revolution R is off- topic on this mailing list. Since you have identified your subject so clearly, we can only safely respond that we cannot answer you. If you change your mind and decide to ask what can be done in R (which

[R] Fwd: Undeliverable mail

2013-10-28 Thread hill0093 University of Minnesota
-- Forwarded message -- From: postmas...@vs-m.tc.umn.edu Date: Mon, Oct 28, 2013 at 10:53 AM Subject: Undeliverable mail To: hill0...@umn.edu Cc: postmas...@vs-m.tc.umn.edu Your message was not delivered to the following recipients: r-h...@r-proj.org: No such host

Re: [R] Code Book from SPSS Data

2013-10-28 Thread Frank Harrell
Not certain about .por but this works with ordinary SPSS files: require(Hmisc) dat - spss.get(...) # gets variable labels, etc. contents(dat) html(contents(dat), ...) The last command produces a hyperlinked data dictionary, e.g., for each variable the number of levels is given and you click

[R] Error: Data is not atomic

2013-10-28 Thread Baro
Hi experts, I want to user haar wavelet transform. If I am using this simple command, it works nice: k-c(1,2,3,4,5,6,7,8) ywd-wd(k,filter.number=1,family=DaubExPhase) but if the K is a list like this: *[[1]]* *[1] 401* * * *[[2]]* *[1] 481* * * *[[3]]* *[1] 480* * * *[[4]]* *[1] 482* * *

Re: [R] linear line in x, y plot

2013-10-28 Thread Adams, Jean
A few problems ... This statement doesn't make sense. seq(-0.08, -0.02, len = -0.02) Perhaps you meant seq(-0.08, -0.02, by = 0.02) The xlim= and ylim= are arguments to higher level plot functions, like plot(), and won't work for functions lines() or abline(). Are you trying to limit the range

Re: [R] Error: Data is not atomic

2013-10-28 Thread Berend Hasselman
On 28-10-2013, at 17:01, Baro babak...@gmail.com wrote: Hi experts, I want to user haar wavelet transform. If I am using this simple command, it works nice: k-c(1,2,3,4,5,6,7,8) ywd-wd(k,filter.number=1,family=DaubExPhase) but if the K is a list like this: *[[1]]* *[1] 401* * *

Re: [R] Error: Data is not atomic

2013-10-28 Thread Berend Hasselman
On 28-10-2013, at 17:16, Baro babak...@gmail.com wrote: thank you so much. I will write my questions as you mentioned Final advice. Please reply to the list only. Everybody can then see your reply and respond if necessary. Forwarded to the list. Berend

[R] speed of makeCluster (package parallel)

2013-10-28 Thread Arnaud Mosnier
Hi all, I am quite new in the world of parallelization and I wonder if there is a way to increase the speed of creation of a parallel socket cluster. The time spend to include threads increase exponentially with the number of thread considered and I use of computer with two 8 cores CPU and thus

[R] Automatically Remove Aliased Terms from a Model

2013-10-28 Thread Thaler,Thorn,LAUSANNE,Applied Mathematics
Dear all, I am trying to implement a function which removes aliased terms from a model. The challenge I am facing is that with alias I get the aliased coefficients of the model, which I have to translate into the terms from the model formula. What I have tried so far:

Re: [R] linear line in x, y plot

2013-10-28 Thread David Winsemius
On Oct 28, 2013, at 8:30 AM, Ahmed Attia wrote: Hi I have a question about drawing a linear line in x, y plot. I usually use the following code, but for this time the x values are to small (-0.08 to -0.02) That is not the problem. I wrote the following code, but r does not draw the line.

Re: [R] speed of makeCluster (package parallel)

2013-10-28 Thread Simon Zehnder
See library(help = parallel”) On 28 Oct 2013, at 17:19, Arnaud Mosnier a.mosn...@gmail.com wrote: Hi all, I am quite new in the world of parallelization and I wonder if there is a way to increase the speed of creation of a parallel socket cluster. The time spend to include threads

Re: [R] pie graphs in log scale axis

2013-10-28 Thread David Winsemius
On Oct 28, 2013, at 6:40 AM, Ortiz, John wrote: Dear list users, I'm doing a plot integrating Grid output with Base Graphics output (gridBase, Murrell 2012). My goal is to produce a xy plot where each point is represented by a pie. I could get it using the attach code, but now I

Re: [R] speed of makeCluster (package parallel)

2013-10-28 Thread Arnaud Mosnier
Thanks Simon, I already read the parallel vignette but I did not found what I wanted. May be you can be more specific on a part of the document that can provide me hints ! Arnaud 2013/10/28 Simon Zehnder szehn...@uni-bonn.de See library(help = parallel”) On 28 Oct 2013, at 17:19, Arnaud

Re: [R] speed of makeCluster (package parallel)

2013-10-28 Thread Simon Zehnder
First, use only the number of cores as a number of thread - i.e. I would not use hyper threading, etc.. Each core has its own caches and it is always fortunate if a process has enough memory; hyper threads use all the same cache on the core they are running on. detectCores() gives me for

Re: [R] speed of makeCluster (package parallel)

2013-10-28 Thread Prof Brian Ripley
On 28/10/2013 16:19, Arnaud Mosnier wrote: Hi all, I am quite new in the world of parallelization and I wonder if there is a way to increase the speed of creation of a parallel socket cluster. The time spend to include threads increase exponentially with the number of It increases linearly in

Re: [R] for loop help, repeat a function multiple times

2013-10-28 Thread arun
Hi, You may try: x - 1:5  set.seed(49)  mat1 - do.call(rbind,lapply(1:1000,function(y) sample(x,3))) #or mat2 - matrix(0,ncol=3,nrow=1000) set.seed(49)  for(i in seq_len(nrow(mat2))) mat2[i,] - sample(x,3) all.equal(mat1,mat2) #[1] TRUE #or set.seed(49) mat3 - t(replicate(1000,sample(x,3)))  

Re: [R] Split a data.frame

2013-10-28 Thread Christofer Bogaso
Hi Arun, Sorry for late reply. I would like to thank you for your pointer. This is what I wanted. Thanks for your help. Thanks and regards, On Sun, Oct 27, 2013 at 10:33 PM, arun smartpink...@yahoo.com wrote: Hi, DF$Col2 # [1] a e b b a b c e b a c c e e a c d c c e #Levels: a b c d e

[R] Create Time Lists with a for loop

2013-10-28 Thread Alaios
Dear all, in my code I have written the following list TimeFramesShort -list(c(strptime(2011-10-12 10:59:00,%Y-%m-%d %H:%M:%S),strptime(2011-10-13 11:02:00,%Y-%m-%d %H:%M:%S))  # rest items were truncated I was wondering if could somehow  take the first element of the list and

[R] high cross-validation errors ( xerror ) in regression tree?

2013-10-28 Thread Lin, Tin-Chi
Hi All, This is my first time to seek help from the R-forum (and also conduct a formal data-mining analysis). I searched the archive a bit but didn't get responses that could totally address my question. Any comments would be highly appreciated. I am using the rpart function to analyze

[R] Chess Playing Software Written in R

2013-10-28 Thread Rob Bernard
Have there been attempts to build a chess engine in R? If so, is it available anywhere? I recognize that R really isn’t the right language for a chess engine, but I was more curious if it had been attempted. Thank you. Rob Bernard -- -- Robert N. Bernard

[R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread Shantanu MULLICK
Hello Everyone, I want to perform a 1-D optimization by using the optimize() function. I want to find the maximum value of a logistic function. The optimize() function gives the wrong result. My code: f= function (k) { T_s = 20 result = (2- 2/(1+ exp(-2*T_s*k))) return(result) } optimize(f, c(0,

[R] make system() output invisible on mac

2013-10-28 Thread John Denton
Hi, I'm trying to figure out a way to make the output of a call to system() invisible on the R mac GUI. Is there a mac equivalent for the calls invisible=TRUE, show.output.on.console=FALSE, intern=TRUE for the mac environment? Thanks. ~John __

[R] gmmBoost creating huge 500+ gb vectors

2013-10-28 Thread Luke Miner
I'm trying to run bGLMM on a large dataset and it is failing after trying to create huge vectors with the error: Error: cannot allocate vector of size 553.7 Gb The dataset that I'm using is fairly large, around 1.5 million observations. The command is as follows: boost1 - bGLMM(A~ B + C, rnd =

Re: [R] speed of makeCluster (package parallel)

2013-10-28 Thread Arnaud Mosnier
Thanks a lot Simon, that's useful. I will take a look at this process-pinning things. Arnaud 2013/10/28 Simon Zehnder szehn...@uni-bonn.de First, use only the number of cores as a number of thread - i.e. I would not use hyper threading, etc.. Each core has its own caches and it is always

Re: [R] indicating significant differences in boxplots

2013-10-28 Thread Jim Lemon
On 10/29/2013 01:51 AM, Johannes Radinger wrote: Hi, I'd like to follow up an older discussion on adding significance stars to boxplots. ( http://r.789695.n4.nabble.com/indicating-significant-differences-in-boxplots-td862335.html ) As suggested by Jim Lemon, there is following solution for a

Re: [R] linear line in x, y plot

2013-10-28 Thread Jim Lemon
On 10/29/2013 02:30 AM, Ahmed Attia wrote: Hi I have a question about drawing a linear line in x, y plot. I usually use the following code, but for this time the x values are to small (-0.08 to -0.02) I wrote the following code, but r does not draw the line. However, it does not give an error

[R] fitdistr: was Heteroscedasity...

2013-10-28 Thread Collin Lynch
Hello again, first off thank you for your suggestion Mr. Rigby, I'll take a look at the GAMLSS package. I have a (slightly) related followup question regarding the 'fitdistr' function. I was examining my data, a sample of which is attached, using this function and I am confused about the

Re: [R] Chess Playing Software Written in R

2013-10-28 Thread Jeff Newmiller
Please avail yourself of search tools before posting here, and reference why they did not answer your question. RSiteSearch( chess ) --- Jeff NewmillerThe . . Go Live...

Re: [R] Create Time Lists with a for loop

2013-10-28 Thread Rui Barradas
Hello, Instead of string manipulation you should think of POSIXt objects. And maybe ?seq.POSIXt will help. first - strptime(2011-10-12 10:59:00,%Y-%m-%d %H:%M:%S) last - strptime(2011-10-12 11:13:00,%Y-%m-%d %H:%M:%S) seq(first, last, by = 5 min) Hope this helps, Rui Barradas Em

Re: [R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread Rui Barradas
Hello, This seems like a bug, removing 'maximum = TRUE' has no effect except that the returned value says it's a minimum, not a maximum. Rui Barradas Em 28-10-2013 17:00, Shantanu MULLICK escreveu: Hello Everyone, I want to perform a 1-D optimization by using the optimize() function. I

Re: [R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread Rolf Turner
This could be described as a bug, perhaps. Or it could be described as an indication that numerical optimization is inevitably tricky. Notice that if you narrow down your search interval from [0,5] to [0,0.5] you get the right answer: optimize(f, c(0, 0.5), maximum= TRUE,tol=1e-10) $maximum

Re: [R] Revo R for Arima Implementation

2013-10-28 Thread Rolf Turner
Your question still makes no sense at all to me. You provide no example code and no data. You do not specify, in any comprehensible way, what model you are trying to fit. And as Jeff Newmiller said, if you are concerned with Revo R why are you posting to r-help? Please get your act

Re: [R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread William Dunlap
Note that f(x) returns exactly zero for all x above 1, hence its estimated derivative is 0 everywhere in that region. You are asking optimize to find the non-zero part of a function which is 0 in more than 80% of its domain. You can put a trace on f() to see where optimize() looks: trace(f,

Re: [R] pie graphs in log scale axis

2013-10-28 Thread jwd
On Mon, 28 Oct 2013 13:40:51 + Ortiz, John ort...@si.edu wrote: Dear list users, I'm doing a plot integrating Grid output with Base Graphics output (gridBase, Murrell 2012). My goal is to produce a xy plot where each point is represented by a pie. I could get it using the attach

Re: [R] pie graphs in log scale axis

2013-10-28 Thread jwd
On Mon, 28 Oct 2013 15:03:36 -0700 jwd j...@surewest.net wrote: On Mon, 28 Oct 2013 13:40:51 + Ortiz, John ort...@si.edu wrote: ... It is not clear what you want. Why is there an 'x = log' term in plot()? If you want to plot log(x) try using: Got that backward typing, should be log

Re: [R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread William Dunlap
One can do better yet by using the logspace_add(logx, logy) function available in the C API to R, but there is currently not an R-language interface to that (or logspace_subtract(logx,logy)). They calculate log(exp(logx) +- exp(logy)) with minimal roundoff error. You could probably

Re: [R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread Shantanu MULLICK
Hello, Thanks a lot for the replies. I tried to use the optim function in R, and chose the L-BFGS-B method of optimization. Now the result is very sensitive to the starting values. I use the same function, but I give the line of code I use for optim. optim(0.25, f, method= L-BFGS-B, lower = 0,

[R] need some help with this example

2013-10-28 Thread Glenn Schultz
I have a class Details that contains information needed by FirstSet to do some calculations then a super class that returns Details and FirstSet.  The problem seems to be in FirstSet where I use the function getAnumber(id).   setClass(Details,          representation(            ID =

Re: [R] Optimization failed in fitdistr (Weibull distribution)

2013-10-28 Thread kmmoon100
Hi Berend, Thank you for your reply. How can I use dput function for this type of data? I looked up the description of the function but I still can't understand how to use it for solving my error. Regards, Kangmin. -- View this message in context:

Re: [R] Optimization failed in fitdistr (Weibull distribution)

2013-10-28 Thread Berend Hasselman
On 29-10-2013, at 00:35, kmmoon100 k.m...@student.unimelb.edu.au wrote: Hi Berend, Thank you for your reply. How can I use dput function for this type of data? I looked up the description of the function but I still can't understand how to use it for solving my error. You don't use