Re: [R] R / JMP interface

2014-05-07 Thread Meyners, Michael
Not sure about JMP 11, but remember that JMP 10 did not run with R version >= 3.0.0 It depends a bit on the changes that come with new R versions; with JMP 10, several versions of the 2.x series were compatible even though JMP officially only supported earlier versions. I had hoped that with JM

Re: [R] can we add raw data to data frame

2014-05-07 Thread Jeff Newmiller
I think R is doing exactly what you told it to do. Since you don't seem to be satisfied, perhaps you need to explain what it is you want by giving us an example of what you think you should end up with. You may have tried to do so, but you failed to read and follow the Posting Guide (which warns

[R] timedep in frailtypack

2014-05-07 Thread lydia
Hello everyone, I have been trying to use the timedep(predictor) capability of the frailtypack package in order to include time-varying covariates in a frailty model. The following is an example of the code I use: sha.time <- frailtyPenal(Surv(time,event)~cluster(id)+timedep(age) ,Frailty=TRU

[R] can we add raw data to data frame

2014-05-07 Thread Sandip Nandi
Hi , I want to add a serialized data to a data frame . The representation does not look good. > x<- c(1,2) > serialize(x,NULL) [1] 58 0a 00 00 00 02 00 03 00 02 00 02 03 00 00 00 00 0e 00 00 00 02 3f f0 00 [26] 00 00 00 00 00 40 00 00 00 00 00 00 00 > y<-serialize(x,NULL) > z=-1 > m<- data.frame(

[R] MRF smoothers in MGCV - specifying neighbours

2014-05-07 Thread Mark Payne
Hi, Does anyone have an example of a Markov Random Field smoother (MRF) in MGCV where they have specified the neighbourhood directly, rather than supplying polygons? Does anyone understand how the rules should be? Based on the columb example, I have setup my data set and neighbourhood like so: >

Re: [R] plotting lines on old graph after par(new=TRUE)

2014-05-07 Thread Jim Lemon
Hi Dustin, Similar to what Boris suggested, try scaling the values and not resetting the plot limits: scaleBreak = function(x,y,axis=2,breakpos=1,ymult=0.45,...){ figure out which Y values are above the breakpos y_above<-y[y>breakpos] x_above<-x[y>breakpos] y_below<-y[y<=bre

Re: [R] minor tick marks on boxplot log scale

2014-05-07 Thread David Stevens
On closer inspection, change n=5 to n=10 in major.ticks <- pretty(lims,n=5) Then, I get 10^0, 10^1, etc. with all the minors. Is this what you want? David On 5/7/2014 10:32 AM, Shane Carey wrote: Hey, Im using the function below to create minor tick marks on log scale. It only plots every se

Re: [R] minor tick marks on boxplot log scale

2014-05-07 Thread David Stevens
Shane I ran your code with debugging and found this for minor ticks [1]> minor.ticks [1] 1.00 1.301030 1.477121 1.602060 1.698970 1.778151 1.845098 1.903090 1.954243 3.00 3.301030 [12] 3.477121 3.602060 3.698970 3.778151 3.845098 3.903090 3.954243 5.00 5.301030 5.477121 5.602060 [

Re: [R] as.character(quote(x$y) ) = "$" "x" "y" not "x$y"?

2014-05-07 Thread Spencer Graves
Thanks for the quick replies from Richard Heiberger, Greg Show & Bert Gunter. Might it make sense to create as.character.call as an alias for deparse? A few years ago, I wrote several functions like "predict.fd" as aliases for functions with less memorable names like "eva

[R] overdispersed zero inflated continuous data

2014-05-07 Thread Jenushka
I'm a beginning R user. The data: Volume of nectar in flowers under 4 different treatments, nested for individual (measures were taken mutliple times from different flowers of the same individual- never the same flower). Specs: 54% of the data = 0. Variance=3.89. Mean=1.03. Sample size per trea

Re: [R] as.character(quote(x$y) ) = "$" "x" "y" not "x$y"?

2014-05-07 Thread Bert Gunter
... and > str(quote(x$y)) language x$y > as.list(quote(x$y)) [[1]] `$` [[2]] x [[3]] y ## may be instructive. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." H. Gi

Re: [R] Installation problem

2014-05-07 Thread peter dalgaard
Google suggests that that error message is usually associated with cell phone browsers, so what exactly are you doing (all steps, including browser info)? I doubt that this an issue with R as such, more likely you have a general issue with large downloads. - Peter D On 07 May 2014, at 19:37 ,

Re: [R] as.character(quote(x$y) ) = "$" "x" "y" not "x$y"?

2014-05-07 Thread Greg Snow
> deparse(quote(x$y)) [1] "x$y" It looks like deparse does what you want here. On Wed, May 7, 2014 at 3:23 PM, Spencer Graves wrote: > Hello, All: > > > Is there a simple utility someplace to convert "quote(x$y)" to "x$y"? > > > I ask, because as.character(quote(x$y)) is a character

Re: [R] as.character(quote(x$y) ) = "$" "x" "y" not "x$y"?

2014-05-07 Thread Richard M. Heiberger
> deparse(quote(x$y)) [1] "x$y" On Wed, May 7, 2014 at 5:23 PM, Spencer Graves wrote: > Hello, All: > > > Is there a simple utility someplace to convert "quote(x$y)" to "x$y"? > > > I ask, because as.character(quote(x$y)) is a character vector of > length 3 = "$" "x" "y". I want to

[R] as.character(quote(x$y) ) = "$" "x" "y" not "x$y"?

2014-05-07 Thread Spencer Graves
Hello, All: Is there a simple utility someplace to convert "quote(x$y)" to "x$y"? I ask, because as.character(quote(x$y)) is a character vector of length 3 = "$" "x" "y". I want to convert this to "x$y" for a diagnostic message. class(quote(x$y)) = "call", which sugg

Re: [R] R / JMP interface

2014-05-07 Thread Samuel J Gardner
https://communities.sas.com/message/199936 see link. Looks like R 3.1 may not yet be supported with JMP 11. _ From: Robert Douglas Kinley Sent: Wednesday, May 07, 2014 12:18 PM To: r-help@r-project.org Cc: Samuel J Gardner Subject: R / JMP interface

[R] FW: Installation problem

2014-05-07 Thread Stephanie Sangalang
Dear R-Help volunteers, I received this error message when I tried to install R on my laptop: "The page is too large to send back." The laptop has Windows 8, x64, enough memory space, and open access (I have administrative rights). I have installed SPSS and SQL but have never installed R. I tri

[R] Revolutions blog: April roundup

2014-05-07 Thread David Smith
Revolution Analytics staff write about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R from t

Re: [R] plotting lines on old graph after par(new=TRUE)

2014-05-07 Thread Boris Steipe
Since points() and lines() plot on the scale of the last plot, you could plot your "first" graph after the "second" one, or if there is a particular reason why you plot them in the order you do, add a third, empty graph with the scale of the first one as the last plot. B. On 2014-05-07, at

[R] plotting lines on old graph after par(new=TRUE)

2014-05-07 Thread Dustin Fife
Hi, In my work, I often investigate relationships between highly skewed data. Example: set.seed(111) require(MASS) d = data.frame(mvrnorm(1000, mu=c(0,0), Sigma=matrix(c(1,.6,.6,1), nrow=2))) names(d) = c("x","y") ## Skew Y d$y = d$y^4 plot(d$x, d$y) lines(lowess(d$x, d$y), lwd=2, col="blue") Un

Re: [R] R / JMP interface

2014-05-07 Thread Duncan Murdoch
On 07/05/2014 12:18 PM, Robert Douglas Kinley wrote: hi useRs I am trying-out the facility to call R code from JMP. details: R 3.1.0 , JMP 11.1.1 , Windows 7 enterprise , all 64 bit. The test-script from the JMP help pages falls over at the first line :- R Init(); giving the error-message :-

Re: [R] Plotting a Regression holding some exogeneous constant.

2014-05-07 Thread Greg Snow
The Predict.Plot function in the TeachingDemos package can do this for you. Or you can just calculate the intercept for the call to abline by plugging in the mean for all the other variables and do the arithmetic then pass the intercept and slope by hand to the abline function. Or you can create

Re: [R] R / JMP interface

2014-05-07 Thread Frede Aakmann Tøgersen
Wov, so SAS/JMP has an interface to R. I'm amazed and it looks like SAS is taking the "competition" from R seriously. I'll check it out. Frede Sendt fra Samsung mobil Oprindelig meddelelse Fra: Robert Douglas Kinley Dato:07/05/2014 18.19 (GMT+01:00) Til: r-help@r-project.or

Re: [R] Seeking well-commented versions of mgcv source code

2014-05-07 Thread Simon Wood
I'm looking for well-commented versions of various functions comprising mgcv, Commented versions are available e.g. in mgcv_*.*-**.tar.gz from CRAN (unzip and look in mgcv/R). Well commented versions is another matter... best, Simon -- Simon Wood, Mathematical Science, University of Bath BA2

[R] minor tick marks on boxplot log scale

2014-05-07 Thread Shane Carey
Hey, Im using the function below to create minor tick marks on log scale. It only plots every second marker, i.e. 10^0, 10^2 and so on. How do I get it to plot at every interval? Thanks minor.ticks.axis <- function(ax,n,t.ratio=0.5,mn,mx,...){ lims <- par("usr") if(ax %in%c(1,3)) lims <- lim

[R] R / JMP interface

2014-05-07 Thread Robert Douglas Kinley
hi useRs I am trying-out the facility to call R code from JMP. details: R 3.1.0 , JMP 11.1.1 , Windows 7 enterprise , all 64 bit. The test-script from the JMP help pages falls over at the first line :- R Init(); giving the error-message :- The installed version of R cannot be used. The entry

Re: [R] Outlier Detection with k-Means

2014-05-07 Thread Boris Steipe
Oops. > (ii) Your distance calculation is not the cartesian distance. That would be: > sqrt(rowSums(iris2[1,]^2 - centers[1,]^2)). Strike that. Need more coffee :-O > On 2014-05-07, at 4:34 AM, marioger wrote: > >> Hi, >> >> i am hoping you can help me with my problem. I am trying to

Re: [R] Summary to data frame in R!!

2014-05-07 Thread Marc Schwartz
On May 7, 2014, at 5:15 AM, Abhinaba Roy wrote: > Hi R-helpers, > > sumx <- summary(mtcars[,c("mpg","disp")]) >> sumx > mpg disp > Min. :10.40 Min. : 71.1 > 1st Qu.:15.43 1st Qu.:120.8 > Median :19.20 Median :196.3 > Mean :20.09 Mean :230.7 > 3rd Qu.:22.80 3rd

Re: [R] Outlier Detection with k-Means

2014-05-07 Thread Boris Steipe
Three comments: (i)If you calculate distances like this, you are weighting all columns equally by absolute numbers. Depending on your application, you might want to normalize the columns first (and before clustering). (ii) Your distance calculation is not the cartesian distance

Re: [R] Outlier Detection with k-Means

2014-05-07 Thread William Dunlap
Try replacing your order() call with the following 2 lines meanClusterRadius <- ave(distances, kmeans.result$cluster, FUN = mean) outliers <- order(distances/meanClusterRadius, decreasing = T)[1:5] ave(x,group,FUN=fun) applies FUN to the subsets of x defined by the group argument(s) and pu

Re: [R] conversion error from numeric to factor in raster: Error in 1:ncol(r) : argument of length 0, r command: as.factor()

2014-05-07 Thread Stefan Schmidt
Hello, thanks a lot for the fast response and the hint! Actually, it helped to already integrate as.factor in the generation of the raster. This is also working for uploading or diverse other raster functionalities like projection, e.g. as.factor(raster("C:\\...\\r.tiff")) or as.factor(projec

[R] Outlier Detection with k-Means

2014-05-07 Thread marioger
Hi, i am hoping you can help me with my problem. I am trying to detect outliers with use of the kmeans algorithm. First I perform the algorithm and choose those object as possible outliers which have a big distance to their cluster center. Instead of using the absolute distance I want to use the r

[R] Summary to data frame in R!!

2014-05-07 Thread Abhinaba Roy
Hi R-helpers, sumx <- summary(mtcars[,c("mpg","disp")]) > sumx mpg disp Min. :10.40 Min. : 71.1 1st Qu.:15.43 1st Qu.:120.8 Median :19.20 Median :196.3 Mean :20.09 Mean :230.7 3rd Qu.:22.80 3rd Qu.:326.0 Max. :33.90 Max. :472.0 I want a dataframe as

Re: [R] How to match text string ith spaces

2014-05-07 Thread Alejo C.S.
Ok, an extra blank space at the end was the problem. I missed it. Cheers, 2014-05-07 9:05 GMT-03:00 Alejo C.S. : > Hi all, I have a data frame with names that in some cases have blank > spaces: > > > TABLE$place > [1] La Blanqueada La Blanqueada La Blanqueada La Blanqueada La > Blanquead

[R] How to match text string ith spaces

2014-05-07 Thread Alejo C.S.
Hi all, I have a data frame with names that in some cases have blank spaces: > TABLE$place [1] La Blanqueada La Blanqueada La Blanqueada La Blanqueada La Blanqueada [6] La Blanqueada La Blanqueada Sargento Ponce Sargento Ponce La Blanqueada [11] La Blanqueada Sargento Ponce La Blanqueada

[R] how to change the order of subgroups in forest plot using meta

2014-05-07 Thread petretta
Dear all, I use R 3.0.2 for Windows 7. I performed a sub-groups meta-analysis of the prevalence (single proportion)reported in 14 different studies using the package “meta” (April 19, 2014). I have two groups. I use the line commands: res <-metaprop(case,n,sm="PFT", comb.fixed=FALSE, comb.rando

Re: [R] Mix of plain and italic text in ggplot categorical x-axis

2014-05-07 Thread Tom Walker
Brilliant - thanks very much for your help! Tom On 6 May 2014 23:08, David Winsemius wrote: > > On May 6, 2014, at 2:51 PM, Tom Walker wrote: > >> Hi, >> >> I need to generate bar charts where the x-axis is a factor that >> includes a mixture of species names (in italic) and control treatments >

Re: [R] metaMDS in vegan: zero stress

2014-05-07 Thread Jari Oksanen
Mia Bengtsson gmail.com> writes: > > Dear R and vegan package users, > > I have been experiencing problems with the metaMDS function when working on a dataset (euk) consisting of 9 > "sites" (RNA extracts of 9 biofilms samples) and 340 "species" (microbial taxa based on rRNA sequences). > The p