Re: [R] spped up a function

2013-07-10 Thread PIKAL Petr
Hi Santiago Keep conversation in list. Others can have better ideas. I am still messing the reasoning Merge seems to me the solution but I am lost in your resoning what to keep and what to discard from resulting object. After merge I have this result - structure(list(Ring = structure(c(1L,

[R] Replacing part of delimited string with R's regex

2013-07-10 Thread Gundala Viswanath
I have the following list of strings: name - c(hsa-miR-555p,hsa-miR-519b-3p,hsa-let-7a) What I want to do is for each of the above strings replace the text after second delimiter with zzz. Yielding: hsa-miR-zzz hsa-miR-zzz hsa-let-zzz What's the way to do it? [[alternative HTML

Re: [R] Replacing part of delimited string with R's regex

2013-07-10 Thread David Winsemius
On Jul 10, 2013, at 12:02 AM, Gundala Viswanath wrote: I have the following list of strings: name - c(hsa-miR-555p,hsa-miR-519b-3p,hsa-let-7a) What I want to do is for each of the above strings replace the text after second delimiter with zzz. Yielding: hsa-miR-zzz hsa-miR-zzz

Re: [R] Filter Dataframe for Alarm for particular column(s).

2013-07-10 Thread R_Antony
Hi Arun, Thanks for the solution it really works !. But how can we avoid even lappy() and sappy(). Actually any way to do with ts() ? Thanks, Antony. From: arun kirshna [via R] [mailto:ml-node+s789695n467097...@n4.nabble.com] Sent: Saturday, July 06, 2013 12:54 AM To: Akkara,

[R] Announcing TIBCO Enterprise Runtime for R

2013-07-10 Thread Louis Bajuk-Yorgan
In honor of the kickoff of useR 2013 today, I'm proud to announce the availability of TIBCO Enterprise Runtime for R (or TERR for short), our new enterprise-grade, high-performance statistical engine, fully compatible with the R language. For more information on TERR, and a link to download

Re: [R] Kriging Package Cryptic Error Message

2013-07-10 Thread S Ellison
Try initial fitting with fewer lags; I get a fit to your data with lags=3. S Ellison -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Diego Ubuntu Sent: 06 July 2013 16:09 To: r-help@r-project.org Subject: [R] Kriging

Re: [R] find 2D corelation coefficient

2013-07-10 Thread smriti Sebastian
Plz c this link http://www.mathworks.in/help/images/ref/corr2.html On Tue, Jul 9, 2013 at 3:43 PM, smriti Sebastian smriti.sebast...@gmail.com wrote: Two dimensional corelation coefficient-2D corelation between (x,y) and (x1,y1) where x and x1 are same. On Tue, Jul 9, 2013 at 2:27 PM,

[R] Handling large R objects and limitation by RAM

2013-07-10 Thread siddharth arun
I’m doing some text analytic in R and facing some issue on which I need help. As a part of the algorithm I’ve to generate the *svd matrix* (dimension reduction) for a large binary matrix (parent). I’m using the svd function for that. The size (memory occupied) of the svd tends to get very large

Re: [R] Replacing part of delimited string with R's regex

2013-07-10 Thread arun
Hi You could use:  gsub(([[:alnum:]]+-)([[:alnum:]]+-)(.*),\\1\\2zzz,name) #[1] hsa-miR-zzz hsa-miR-zzz hsa-let-zzz A.K. - Original Message - From: Gundala Viswanath gunda...@gmail.com To: r-h...@stat.math.ethz.ch r-h...@stat.math.ethz.ch Cc: Sent: Wednesday, July 10, 2013 3:02 AM

Re: [R] find 2D corelation coefficient

2013-07-10 Thread peter dalgaard
On Jul 10, 2013, at 13:13 , smriti Sebastian wrote: Plz c this link http://www.mathworks.in/help/images/ref/corr2.html That's for comparing images. Are your data images? On Tue, Jul 9, 2013 at 3:43 PM, smriti Sebastian smriti.sebast...@gmail.com wrote: Two dimensional corelation

Re: [R] Kruskal.test

2013-07-10 Thread arun
Hi, Please dput() your example dataset. dat1- read.table(text=a   a   a   a    a    b   b    b    c    c   c    c 2  4    5   2    7    2   2    6    3    7   9    3 3  3   4   1 6    8   1    3    5    2    6    3,sep=,header=FALSE,stringsAsFactors=FALSE) library(reshape)  

[R] find a function for a random curve

2013-07-10 Thread Xiaoyu Lu
Hi, I want to find a functional form for my data. I have tried smoothing and obtained a kinda perfect fit. However, I can only draw it but cannot call it. I am wondering that is there a way that I can store the fit as a function and apply it when needed. e.g. tranformation etc. Many thanks!

[R] Canonical Correlation Analysis for three fields

2013-07-10 Thread fsantos
Dear R community, I was wondering if it is possible to adapt the CCA methodology for three set of variables. Could you give me some suggestions? Regards, Francisco __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] find a function for a random curve

2013-07-10 Thread S Ellison
I want to find a functional form for my data. I have tried smoothing and obtained a kinda perfect fit. However, I can only draw it but cannot call it. You'll need to apply the smoothing function to the data separately, store that and plot the curve (?) fom that. You can plot a line for many

[R] Bivariate Tolerance Region

2013-07-10 Thread Anamika Chaudhuri
Hi: I apologize for posting in the R listserv. But I am trying to do the following in R. I am trying to construct Bivariate 95% Approximate Confidence interval for the mean vector p=(p1,p2) similar to what we have in the univariate case. [image: \hat p \pm z_{1 - \frac{1}{2}\alpha}

[R] PCA and gglot2

2013-07-10 Thread ashz
Hi, I was trying as well as looking for an answer without success (a bit strange since it should be an easy problem) and therefore I will appreciate you help: My simple script is: # Loadings data of 5 columns and 100 rows of data data1-read.csv(C:/…/MyPCA.csv) pairs(data1[,1:4]) pca1 -

[R] Error message

2013-07-10 Thread Emanuele Belli
Hello, I'm an italian student, I've got some problems using R: After calculating a dbinom() function, my help.start() started not to work. If I type on the console Help.start, it says me starting httpd help server ...Errore in stats::runif(10) : .Random.seed is not an integer vector but of

Re: [R] Error message

2013-07-10 Thread Prof Brian Ripley
On 10/07/2013 15:04, Emanuele Belli wrote: Hello, I'm an italian student, I've got some problems using R: After calculating a dbinom() function, my help.start() started not to work. If I type on the console Help.start, it says me starting httpd help server ...Errore in stats::runif(10) :

Re: [R] fitting log function: errors using nls and nlxb

2013-07-10 Thread Prof J C Nash (U30A)
This reply only addresses the NaN in Jacobian matter. I believe it is a result of getting a perfect fit (0 sum of squares). I have amended the r-forge version of nlmrt package in routines nlfb and nlxb and did not get the error running Elizabeth's example. This only answers the software issue,

Re: [R] PCA and gglot2

2013-07-10 Thread John Kane
It looks like you can if I understand properly. Try this dat1 - data.frame(dat1$scores) dat1$items - rownames(data1) ggplot(dat1, aes(Comp.1, Comp.2, colour = items)) + geom_point() + theme(legend.position=none) John Kane Kingston ON Canada -Original Message- From:

[R] Sparse matrix no longer sparse (Matrix Package)

2013-07-10 Thread Doran, Harold
I have a large function computing an iterative algorithm for fitting mixed linear models. Almost all code relies on functions from the Matrix package. I've come across an issue that I do not believe previously occurred in earlier versions of R or Matrix. I have a large, sparse matrix, A as

Re: [R] PCA and gglot2

2013-07-10 Thread S Ellison
The biplot present the data points as numbers. How can I present the data point in color (depends on their group-column 5). I was thinking about doing it using ggplot2 but I can not succeed. Any idea how to do it? Perhaps the post at

[R] Recherche de fonction

2013-07-10 Thread Raphaëlle Carraud
Bonjour, Je souhaite résoudre le couple d'équation différentielles suivant : 0 = -dA + dB + 2*dC - 2*r1 - 2*r5 0 = dA + dD + r1 + r4 0 = K2 - C/B^2 0 = K3 - D/(A*B) 0 = r5 + 2*r4 - dE 0 = r5 -dI 0 = -r5 - r4 - dG 0 = -r1/2 - dH en ayant connaissance des valeurs

[R] output ggplot2 graph from asp.net?

2013-07-10 Thread yu ge
Hello there, I want to output ggplot2 graphs(b/c they are pretty) in ASP.NET(C#). Any one has success or is it feasible to do? Online said R.net is a choice but said it's not available for R graph. Any suggestions? [[alternative HTML version deleted]]

[R] Appropriate forum for announcing R package updates

2013-07-10 Thread Frank Harrell
I have been confused about the appropriate e-mail address to use to make announcements to r-help for major package update. In the past I've submitted to r-packa...@lists.r-project.org without seeing the announcement appear on r-help. Thanks for any guidance. Frank -- Frank E Harrell Jr

Re: [R] Sparse matrix no longer sparse (Matrix Package)

2013-07-10 Thread Doran, Harold
I have zero'd in on what appears to be the issue. This seems to be a bug in Matrix, but I am not sure yet. I am attaching files that would allow others to replicate this with my toy data. Notice the elements of D1 in the attached data are all integers. It is a sparse, diagonal matrix.

Re: [R] Recherche de fonction

2013-07-10 Thread Berend Hasselman
On 10-07-2013, at 16:21, Raphaëlle Carraud raphaelle.carr...@oc-metalchem.com wrote: Bonjour, Je souhaite résoudre le couple d'équation différentielles suivant : 0 = -dA + dB + 2*dC - 2*r1 - 2*r5 0 = dA + dD + r1 + r4 0 = K2 - C/B^2 0 = K3 - D/(A*B) 0 = r5 + 2*r4 -

Re: [R] Appropriate forum for announcing R package updates

2013-07-10 Thread Frank Harrell
Thank you Marc Frank Marc Schwartz-3 wrote On Jul 10, 2013, at 1:29 PM, Frank Harrell lt; f.harrell@ gt; wrote: I have been confused about the appropriate e-mail address to use to make announcements to r-help for major package update. In the past I've submitted to

[R] replacement functions for subsets

2013-07-10 Thread Harry Mamaysky
I know how to define replacement functions in R (i.e. ‘foo-‘ - function(x,value) x-value, etc.), but how do you define replacement functions that operate on subsets of arrays (i.e. how do you pass an index into foo)? For example, why does the following use of “rownames” work? aa -

Re: [R] Appropriate forum for announcing R package updates

2013-07-10 Thread Marc Schwartz
On Jul 10, 2013, at 1:29 PM, Frank Harrell f.harr...@vanderbilt.edu wrote: I have been confused about the appropriate e-mail address to use to make announcements to r-help for major package update. In the past I've submitted to r-packa...@lists.r-project.org without seeing the announcement

Re: [R] PCA and gglot2

2013-07-10 Thread ashz
Hi, Thanks. Fig 4 in the link you provided is what I am looking for. I still do not know how to implement my data1 and pca1 in the script you provided as I think it is only a part of a full script. data1-read.csv(C:/…/MyPCA.csv) pca1 - princomp(data1[,1:4], score=TRUE, cor=TRUE) Am I right,

Re: [R] Recherche de fonction

2013-07-10 Thread Berend Hasselman
On 10-07-2013, at 20:42, Berend Hasselman b...@xs4all.nl wrote: On 10-07-2013, at 16:21, Raphaëlle Carraud raphaelle.carr...@oc-metalchem.com wrote: Bonjour, Je souhaite résoudre le couple d'équation différentielles suivant : 0 = -dA + dB + 2*dC - 2*r1 - 2*r5 0 = dA + dD + r1

Re: [R] replacement functions for subsets

2013-07-10 Thread David Winsemius
On Jul 10, 2013, at 11:47 AM, Harry Mamaysky wrote: I know how to define replacement functions in R (i.e. ‘foo-‘ - function(x,value) x-value, etc.), but how do you define replacement functions that operate on subsets of arrays (i.e. how do you pass an index into foo)? For example, why

[R] how to adjust the x axis range based on y axis data

2013-07-10 Thread Kara Przeczek
I am using R studio version 0.97.336. I am trying to produce multiple figures based on a large data set (98010 rows). I am creating a plot for each TITLE (related to a variable/station combination). #Create a plot for each Title. Save all plots as jpegs in folder named SkeenaQfigs for(i in

Re: [R] Filter Dataframe for Alarm for particular column(s).

2013-07-10 Thread arun
Hi, You could try ?data.table() to further increase the speed: #Same example: dt2- data.table(MyDFNew) system.time(resNew- dt2[,lapply(.SD,function(x) {x1-which(c(0,diff(x))0);x1[length(x1)==0]-0;x1})][1] )  # user  system elapsed  # 0.144   0.004   0.148 resNew #   TNH BIX #1:   7   2

Re: [R] PCA and gglot2

2013-07-10 Thread John Kane
'Sorry I made a mistake . I was using some data of my own and didn't make some key changes to the script to match your variables. dat1 - data.frame(pca1 $scores) # creates the data.frame dat1$items - rownames(data1pca1 ) # adds item names ggplot(dat1, aes(Comp.1, Comp.2, colour = items))

Re: [R] replacement functions for subsets

2013-07-10 Thread Harry Mamaysky
As I understand it rownames(aa) returns a copy of an attribute of aa. So changing the value of this vector should make the change to the copy of the row.names attribute. I would then have to set the original row.names equal to this copy to effect the change. So my question is why

Re: [R] PCA and gglot2

2013-07-10 Thread stephen sefick
how about ggbiplot package on github? On Wed, Jul 10, 2013 at 2:13 PM, John Kane jrkrid...@inbox.com wrote: 'Sorry I made a mistake . I was using some data of my own and didn't make some key changes to the script to match your variables. dat1 - data.frame(pca1 $scores) # creates the

Re: [R] PCA and gglot2

2013-07-10 Thread stephen sefick
how about ggbiplot package on github? On Wed, Jul 10, 2013 at 2:13 PM, John Kane jrkrid...@inbox.com wrote: 'Sorry I made a mistake . I was using some data of my own and didn't make some key changes to the script to match your variables. dat1 - data.frame(pca1 $scores) # creates the

Re: [R] replacement functions for subsets

2013-07-10 Thread David Winsemius
On Jul 10, 2013, at 12:17 PM, Harry Mamaysky wrote: As I understand it rownames(aa) returns a copy of an attribute of aa. So changing the value of this vector should make the change to the copy of the row.names attribute. I would then have to set the original row.names equal to this copy

[R] FOAS and Use R! 2014

2013-07-10 Thread Jan de Leeuw
FOAS promotes open access publishing (without costs to the reader and author), open source software (GPL licensed), and reproducibility of published results. Currently the only project we financially support is the -- Journal of Statistical Software http://www.jstatsoft.org, but we have a

Re: [R] replacement functions for subsets

2013-07-10 Thread Bert Gunter
I think the OP may perhaps want to define a method for [- . e.g. try: methods([-) If this is not it ... ?? Cheers, Bert On Wed, Jul 10, 2013 at 12:51 PM, David Winsemius dwinsem...@comcast.net wrote: On Jul 10, 2013, at 12:17 PM, Harry Mamaysky wrote: As I understand it rownames(aa)

Re: [R] replacement functions for subsets

2013-07-10 Thread Harry Mamaysky
So how would I get the following to work? aa-1 aa [1] 1 'foo-' - function(x,value) x-value foo(aa)-1:10 aa [1] 1 2 3 4 5 6 7 8 9 10 # This doesn't work: foo(aa)[4:5] - c(101,102) Error in foo(aa)[4:5] - c(101, 102) : could not find function foo # What I would like to see is: aa

[R] alternative of package parallel for R 3.0

2013-07-10 Thread Jie
Dear All, I would like to use parApply in parallel to do parallel computing. But after I updated to the new version of R, I got the message like Warning message: package ‘parallel’ is not available (for R version 3.0.0) Any people has the same issue? I know there are some other packages but

Re: [R] alternative of package parallel for R 3.0

2013-07-10 Thread Marc Schwartz
On Jul 10, 2013, at 3:29 PM, Jie jimmycl...@gmail.com wrote: Dear All, I would like to use parApply in parallel to do parallel computing. But after I updated to the new version of R, I got the message like Warning message: package ‘parallel’ is not available (for R version 3.0.0) Any

Re: [R] replacement functions for subsets

2013-07-10 Thread William Dunlap
If you define a function 'foo-' to replace a part of an object you need to have a corresponding function 'foo' that extracts that same part. If 'foo' does not exist or if 'foo' extracts something other than what 'foo-' alters, then nested replacements will not work. The expression bar(foo(x))

Re: [R] create new matrix from user-defined function

2013-07-10 Thread arun
Hi, You could try:   mat1-matrix(dat3[rowSums(dat3[,2:3])!=dat3[,4],1],ncol=1,dimnames=list(NULL,MW_EEsDue_ERRORS))  mat1 # MW_EEsDue_ERRORS #[1,] 1882 #[2,] 1884 #[3,] 1885 A.K. #Let's say I have the following data set: dat3 = data.frame(A_CaseID =

Re: [R] PCA and gglot2

2013-07-10 Thread ashz
Dear John, Thanks for the help. I did some minor modifications to your script as I had some problems: ... pca = PCA(data[,1:4], scale.unit=T, graph=F) dat1 - data.frame(pca$scores) # creates the data.frame dat1$items - rownames(data$group) # adds item names ggplot(dat1,

Re: [R] PCA and gglot2

2013-07-10 Thread ashz
Hi, Thanks to ssefick for the ggbiplot tip. It works fine so I submit a general script thats works for future users. library(ggbiplot) data-read.csv(C:/…/MyPCA.csv) data1-data[,1:4] my.pca - prcomp(data1, scale. = TRUE) my.class- data$Group g - ggbiplot(my.pca, obs.scale = 1, var.scale =

[R] create new matrix from user-defined function

2013-07-10 Thread bcrombie
#Let's say I have the following data set: dat3 = data.frame(A_CaseID = c(1881, 1882, 1883, 1884, 1885), B_MW_EEsDue1 = c(2, 2, 1, 4, 6), C_MW_EEsDue2 = c(5, 5, 4, 1, 6), D_MW_EEsDueTotal = c(7, 9, 5, 6, 112)) dat3 # A_CaseID B_MW_EEsDue1

[R] permanova for multivariate repeat measures toxicology data set

2013-07-10 Thread Elizabeth Beck
Hello, I would like to use a permanova to analyze my repeated measures, multivariate data set using the package vegan (adonis function). I have several explanatory variables and many clinical biochemistry/hematological response variables (all continuous, non-normally distributed). My

Re: [R] create new matrix from user-defined function

2013-07-10 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of bcrombie Sent: Wednesday, July 10, 2013 12:19 PM To: r-help@r-project.org Subject: [R] create new matrix from user-defined function #Let's say I have the following data set:

Re: [R] find a function for a random curve

2013-07-10 Thread Rolf Turner
Your question is very vague, so it's hard to know what to suggest. Please note the exhortation that appears at the bottom of every r-help message: PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. It

Re: [R] Help with installing a .tar.gz package on windows

2013-07-10 Thread Lucy Leigh
Hi, I have had a look at the manual but it makes no sense to me. I have downloaded RTools, and the InnoSetup, but I don't understand how to use these to install my package? Am I meant to be writing commands in R itself, or in these other things I've downloaded? Lucy Erin Hodgess

Re: [R] Help with installing a .tar.gz package on windows

2013-07-10 Thread Jeff Newmiller
Lucy, you have stepped into something of a mess. Although you just want to install the package to use it, installing from source often (but not always) requires the ability to compile C, C++, or Fortran, and discussions about development really belong on the R-devel mailing list. The steps

Re: [R] Help with installing a .tar.gz package on windows

2013-07-10 Thread David Winsemius
On Jul 10, 2013, at 4:37 PM, Lucy Leigh wrote: Hi, I have had a look at the manual but it makes no sense to me. I have downloaded RTools, and the InnoSetup, but I don't understand how to use these to install my package? Am I meant to be writing commands in R itself, or in these other

[R] Problem building R-2.15.3 from source

2013-07-10 Thread Mark Dalphin
Hi, I have for many years build R from source for Linux. I have just run into my first problem with this in ... I don't know how long. uname -a Linux douglas 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux cat /etc/issue Debian GNU/Linux 7 \n \l The version of R is 2.15.3. I know it

Re: [R] Need hep for converting date data in POSIXct

2013-07-10 Thread arun
Hi, I guess the error message: vmask(lat,lon,time,vmax=25) Error en vmask(lat, lon, time, vmax = 25) : objeto 'lat' no encontrado says that you have not defined the object 'lat'. time-subset(Geo, select =date) time[,1]-  as.POSIXct(time[,1],format=%d/%m/%Y %H:%M) location-

Re: [R] replacement functions for subsets

2013-07-10 Thread Harry Mamaysky
Got it. Thank you for the explanation. And thanks to everyone for their help. On Wed, Jul 10, 2013 at 5:09 PM, William Dunlap wdun...@tibco.com wrote: If you define a function 'foo-' to replace a part of an object you need to have a corresponding function 'foo' that extracts that same part.

[R] Reserve word in could not be used it as a dimname?

2013-07-10 Thread jpm miao
Hi, I have a matrix whose columns are named as in and out. Then I coerce it to be a data.frame. However the system seems to forbid me from using the name in, but I am not aware of it until I call it by the dollar sign $. Is there something R should remind me but it does not? Is there any

Re: [R] Reserve word in could not be used it as a dimname?

2013-07-10 Thread Pascal Oettli
Hello, in is a reserved word. ?Reserved Hope this clarifies, Pascal 2013/7/11 jpm miao miao...@gmail.com Hi, I have a matrix whose columns are named as in and out. Then I coerce it to be a data.frame. However the system seems to forbid me from using the name in, but I am not aware

Re: [R] Reserve word in could not be used it as a dimname?

2013-07-10 Thread jpm miao
Just wonder why R does not remind me so when I use it as a dimname... 2013/7/11 Pascal Oettli kri...@ymail.com Hello, in is a reserved word. ?Reserved Hope this clarifies, Pascal 2013/7/11 jpm miao miao...@gmail.com Hi, I have a matrix whose columns are named as in and out.

Re: [R] Reserve word in could not be used it as a dimname?

2013-07-10 Thread Pascal Oettli
Hello, You can offer your help to develop a built-in function designed to internally check the use of reserved words. Or, citing the help page: Reserved words outside quotes are always parsed to be references to the objects linked to in the ‘Description’, and hence they are not allowed as

Re: [R] [SOLVED] Problem building R-2.15.3 from source

2013-07-10 Thread Mark Dalphin
I have found a solution to the repeated seg-faults below. If I set environment variables: setenv CFLAGS -O2 setenv FFLAGS -O2 rather than the default -O3, then R builds and checks successfully. A few more details about the Debian system on which I have been building: gcc (Debian

Re: [R] [SOLVED] Problem building R-2.15.3 from source

2013-07-10 Thread Pascal Oettli
Hello, Maybe the reason why: http://www.cran.r-project.org/doc/manuals/R-admin.html#Compilation-flags Regards, Pascal 2013/7/11 Mark Dalphin mark.dalp...@pacificedge.co.nz I have found a solution to the repeated seg-faults below. If I set environment variables: setenv CFLAGS -O2

[R] Word occurrence rate in a tweet

2013-07-10 Thread Bembi Prima
Hi all, Currently I am working on a code that will calculate word occurrence rate in a tweet. First, I have 'tweets' that contains all the tweet I grabbed and I make 'words' that contains all unique word in 'tweets'. After that I use sapply to calculate probability of a word appearing in

Re: [R] Help with installing a .tar.gz package on windows

2013-07-10 Thread Prof Brian Ripley
On 11/07/2013 01:22, David Winsemius wrote: On Jul 10, 2013, at 4:37 PM, Lucy Leigh wrote: Hi, I have had a look at the manual but it makes no sense to me. I have downloaded RTools, and the InnoSetup, but I don't understand how to use these to install my package? Am I meant to be writing