[R] How numerical data is stored inside ts time series objects

2015-04-20 Thread Paul
I'm getting familiar with the stl function in the stats packcage by trying it on an example from Brockwell Davis's 2002 Introduction to Times Series and Forcasting. Specifically, I'm using a subset of his red wine sales data. It's a detour from the stl material at

Re: [R] How numerical data is stored inside ts time series objects

2015-04-20 Thread William Dunlap
Use the str() function to see the internal structure of most objects. In your case it would show something like: Data - data.frame(theData=round(sin(1:38),1)) x - ts(Data[[1]], frequency=12) # or Data[,1] y - ts(Data, frequency=12) str(x) Time-Series [1:38] from 1 to 4.08: 0.8 0.9 0.1 -0.8

Re: [R] feature selection

2015-04-20 Thread Rolf Turner
On 21/04/15 05:19, ismail hakkı sonalcan wrote: Hi, I want to make feature selection. Could you help me. Thanks. This posting should win some sort of prize for inanity. cheers, Rolf Turner -- Rolf Turner Technical Editor ANZJS Department of Statistics University of Auckland Phone:

Re: [R] high density plots using lattice dotplot()

2015-04-20 Thread Duncan Mackay
Hi Luigi Strips take up space so if you are willing to not have strip and put the strip values within the plot area then xyplot(y ~ x|cond.factor, data = ..., as.table = T, groups = ..., layout = ..., drop.unused = T,

Re: [R] Metafor - rma.mv function - variance components

2015-04-20 Thread Lists
Carlijn Wibbelink wibbelt...@hotmail.com wrote : Dear Carlijn I think that if you set sigma2 to a vector of length 2 it will be possible. Hi all, I have a question about metafor and the rma.mv function. I have fitted a multivariate model (effect sizes are nested within studies) and I've

Re: [R] xtractomatic package

2015-04-20 Thread Michael Sumner
Wow, thank you! This is a very important contribution to our research community. Cheers, Mike On Sun, 19 Apr 2015 02:58 Roy Mendelssohn - NOAA Federal roy.mendelss...@noaa.gov wrote: xtractomatic R package for accessing environmental data xtractomatic is an R package developed to subset

Re: [R] suggestion of regex pattern

2015-04-20 Thread Fernando Gama
Ok, I'll try to do this... Thanks :D 2015-04-18 18:55 GMT-03:00 Boris Steipe boris.ste...@utoronto.ca: Re-reading your question and taking a wild guess, perhaps you are looking for parse() and eval() ... xyz - data.frame( a=c(1,2), b=c(3,4)) xyz a b 1 1 3 2 2 4 expp -

[R] Fwd: REngine hangs when called within java code

2015-04-20 Thread aruni karunarathne
Dear All, I fixed my issue. String newargs1[] = {--no-save}; Rengine r1 = Rengine.getMainEngine(); if (r1 == null) { r1 = new Rengine(newargs1, false, null); } i added/modified the above part when setting up the rengine. Somehow, now it works. may be that in

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

Re: [R] erv.inv NOT FOUND

2015-04-20 Thread Prof Brian Ripley
On 20/04/2015 13:15, CHIRIBOGA Xavier wrote: Dear members, in this case Error: could not find function erf.inv Anyone knows the package? See ?pnorm for a definition of erfinv, which also exists in package pracma. 'erf.inv' is not in any of the packages I have installed (which includes all

Re: [R] library(xlsx) fails with an error: Error: package ‘rJava’ could not be loaded

2015-04-20 Thread Miloš Žarković
Do you have 64-bit Java installed? Regards Miloš On Saturday, April 18, 2015, John Sorkin jsor...@grecc.umaryland.edu wrote: Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am having difficulty loading and installing the xlsx package. The loading occurred without any problem, however the

Re: [R] ABOUT STATS FORUM

2015-04-20 Thread Boris Steipe
Cross Validated at http://stats.stackexchange.com/ B. On Apr 19, 2015, at 10:37 AM, CHIRIBOGA Xavier xavier.chirib...@unine.ch wrote: Dear members, Since this is not a Forum for Stats questions...does anyone can recomend me a good forum to post questions about statistics?

Re: [R] RODBC did not found

2015-04-20 Thread John McKown
On Mon, Apr 20, 2015 at 5:59 AM, CHIRIBOGA Xavier xavier.chirib...@unine.ch wrote: Dear members, What can I do if I get this message: ? library(RODBC) Error in library(RODBC) : aucun package nommé ‘RODBC’ n'est trouvé Thanks in advcance, Xavier ​If I understand the message correctly,

[R] erv.inv NOT FOUND

2015-04-20 Thread CHIRIBOGA Xavier
Dear members, in this case Error: could not find function erf.inv Anyone knows the package? Thanks a lot! Xavier __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] library(xlsx) fails with an error: Error: package ‘rJava’ could not be loaded

2015-04-20 Thread Rainer Hurling
Hi John, Am 18.04.2015 um 22:07 schrieb John Sorkin: Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am having difficulty loading and installing the xlsx package. The loading occurred without any problem, however the library command library(xlsx) produced an error related to rJava. I tried

Re: [R] basic q re: parsing functions, declaration order

2015-04-20 Thread J Robertson-Burns
On 18/04/2015 18:14, Gowder, Paul wrote: Hi there, So I’m doing some serious coding in R for the first time—writing a strategic simulation to run for a few (or many) thousand iterations,* and doing so in proper functional programming form, [...] write.table(results,

[R] error using by, Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default

2015-04-20 Thread John Sorkin
I am receiving an error message from the by function that I don't understand: Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default My code follows: summary(ipd) group valuestime subjects weaned disp

Re: [R-es] Como leer una BD con una estructura inadecuada

2015-04-20 Thread Carlos Ortega
Hola Eric, He probado el nuevo paquete de Hadley Wickham para leer ficheros, como alternativa al read.table() y parece que funciona: library(readr) datIn - read_table(cdb.txt) head(datIn) ID Number Name Fed Sex Tit WTit OTit SRtng SGm SK RRtng RGm Rk BRtng BGm BK

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread William Dunlap
Look more at help(rep) and help(seq): n - 7 rep(seq_len(n), each=4) [1] 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 Bill Dunlap TIBCO Software wdunlap tibco.com On Sun, Apr 19, 2015 at 6:44 AM, John Sorkin jsor...@grecc.umaryland.edu wrote: Windows 7 64-bit R 3.1.3

[R] Predict in glmnet for cox family

2015-04-20 Thread jitvis
Dear All, I am in some difficulty with predicting 'expected time of survival' for each observation for a glmnet cox family with LASSO. I have two dataset 5 * 450 (obs * Var) and 8000 * 450 (obs * var), I considered first one as train and second one as test. I got the predict output and I

[R] Two stage cluster in R(two step in spss), which package implement it ?

2015-04-20 Thread PO SU
Dear, expeRts,   I am confused in finding an implementation of two stage cluster in R(which is two step cluster in spss), i do some searching, but still can not find it. Has someone happen to know it ? -- PO SU mail: desolato...@163.com Majored in Statistics from SJTU

[R] list server problem?

2015-04-20 Thread Ivan Calandra
Dear all, I use Thunderbird 31.6.0 on Mac OS 10.6.8 to download my e-mails. Since this morning, Thunderbird downloads several times the same e-mails from the list, some even being from yesterday. It occurs only with e-mails from the R-help and not with my other professional and private

Re: [R-es] Como leer una BD con una estructura inadecuada

2015-04-20 Thread Javier Marcuzzi
Estimado Eric ¿Cuál es el que necesita? Mire la página que usted dice, pero los archivos no son de 70 mb o 180 mb. Hay otras opciones pero se me ocurrió pasarlo a mysql o sqlite y enviarle los datos en sql. Aunque si logra usar xml, o como leí utilizando más especificaciónes con read.fwf el

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread Rmh
rep(1:n, each=4) Sent from my iPhone On Apr 19, 2015, at 09:44, John Sorkin jsor...@grecc.umaryland.edu wrote: Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1,

[R] ABOUT STATS FORUM

2015-04-20 Thread CHIRIBOGA Xavier
Dear members, Since this is not a Forum for Stats questions...does anyone can recomend me a good forum to post questions about statistics? Thank you for info, Xavier __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread Sven E. Templer
In '?rep' find out about the 'each' argument. Also there is the function 'gl' which creates a factor and offers a shorter syntax for your problem. If n equals 5 use one of: rep(seq(5), each = 4) gl(5,4) On 19 April 2015 at 15:44, John Sorkin jsor...@grecc.umaryland.edu wrote: Windows 7 64-bit

Re: [R-es] Como leer una BD con una estructura inadecuada

2015-04-20 Thread Javier Marcuzzi
Eric y Carlos No recibí la sugerencia de Carlos, me gustaría poder leerla porque personalmente prefiero json o xml sobre csv, porque tiene un cuidado mayor sobre los datos aunque incrementa el tamaño del archivo. Javier Marcuzzi El 19 de abril de 2015, 21:27, Eric ericconchamu...@gmail.com

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

[R] RODBC package not found (in English)

2015-04-20 Thread CHIRIBOGA Xavier
Dear members, What can I do if I get this message: ? library(RODBC) Error in library(RODBC) : any package called ‘RODBC’ was found Thanks in advcance, Xavier __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] RODBC package not found (in English)

2015-04-20 Thread Duncan Murdoch
On 20/04/2015 7:01 AM, CHIRIBOGA Xavier wrote: Dear members, What can I do if I get this message: ? library(RODBC) Error in library(RODBC) : any package called ‘RODBC’ was found That means that you haven't installed it. You need to run install.packages(RODBC) first. Depending

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

[R] R code/package for calculation of Wasserstein distance between two densities

2015-04-20 Thread Ranjan Maitra
Dear friends, Before reinventing the wheel, I was wondering if anyone can point me to code for calculating the Wasserstein distance between two densities. I am particularly interested in mixture densities (in functional form). I know that we have the earthmovers distance in R via the emdist

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread Jeff Newmiller
You are not generating lists, you are generating vectors. Try rep( seq.int( n ), each= 4 ) --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread Ben Tupper
On Apr 19, 2015, at 9:44 AM, John Sorkin jsor...@grecc.umaryland.edu wrote: Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n

[R] misbehavior with extract_numeric() from tidyr

2015-04-20 Thread arnaud gaboury
R 3.2.0 on Linux library(tidyr) playerStats - c(LVL 10, 5,671,448 AP l6,000,000 AP, Unique Portals Visited 1,038, XM Collected 15,327,123 XM, Hacks 14,268, Resonators Deployed 11,126, Links Created 1,744, Control Fields Created 294, Mind Units Captured 2,995,484

[R] clusterR (fun=aggregate) error number of items to replace is not a multiple of replacement length

2015-04-20 Thread nevil amos
I am getting the above error with clusterR and aggregate: works fine without parralell: library(raster) r-raster(matrix(data = sample(c(1:10,NA),1,replace=T),100,100),xmn=0, xmx=1000,ymn=0,ymx=1000) beginCluster()

Re: [R] Handling NA values in a if statement

2015-04-20 Thread Luigi Marongiu
Dear David and Mark, thank you for your reply. I have implemented the suggestions you have made in the following: x - c(-Inf, Inf,NA,5.9,6.08,5281391136138.75, 4.35,4.79, 9474097322.96,3.64,16.42,-12211.11,4.37, -1097.79,4.78,

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread Gerrit Eichner
Hi, John, doesn't n - your number lapply( 1:n, rep, each = 4) do what you need? Hth -- Gerrit On Sat, 18 Apr 2015, John Sorkin wrote: Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of

Re: [R] select portion of text file using R

2015-04-20 Thread Duncan Murdoch
On 20/04/2015 3:28 AM, Luigi Marongiu wrote: Dear all, I have a flat file (tab delimited) derived from an excel file which is subdivided in different parts: a first part is reporting metadata, then there is a first spreadsheet indicated by [ ], then the actual data and the second spreadsheet

Re: [R] misbehavior with extract_numeric() from tidyr

2015-04-20 Thread arnaud gaboury
On Mon, Apr 20, 2015 at 12:09 PM, Jim Lemon drjimle...@gmail.com wrote: Hi arnaud, At a guess, it is the two hyphens that are present in those strings. I think that the function you are using interprets them as subtraction operators and since the string following the hyphen would produce NA,

Re: [R] error using by, Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default

2015-04-20 Thread Rolf Turner
On 20/04/15 01:44, John Sorkin wrote: I am receiving an error message from the by function that I don't understand: Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default My code follows: summary(ipd) group values

Re: [R] clusterR (fun=aggregate) error number of items to replace is not a multiple of replacement length

2015-04-20 Thread nevil amos
Apoligies. did not read help properly it states: Among other functions, it does _not_ work with ... (dis)aggregate On Mon, Apr 20, 2015 at 4:54 PM, nevil amos nevil.a...@gmail.com wrote: I am getting the above error with clusterR and aggregate: works fine without parralell:

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread Boris Steipe
That would be the each argument to rep()... n - 5 rep(1:n, each=4) [1] 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 5 Cheers, B. On Apr 19, 2015, at 9:44 AM, John Sorkin jsor...@grecc.umaryland.edu wrote: Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread SOUVIK BANDYOPADHYAY
Hi, You can use the apply group of functions n-5 k-4 unlist(lapply(1:n,rep, each=k)) # For vector output: sapply(1:n,rep, each=k) # For a matrix output Hope this helps Souvik On Sun, Apr 19, 2015 at 7:14 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Windows 7 64-bit R 3.1.3 RStudio

Re: [R] RODBC package not found (in English)

2015-04-20 Thread guillaume chaumet
Dear Xavier, Perhaps, you should read the faq: http://cran.r-project.org/doc/FAQ/R-FAQ.html And also un livre en français sur R* : R pour les débutants *par Emmanuel Paradis ou *Introduction à R par *Julien Barnier install.packages(RODBC) Un dernier petit mot : Méfiez vous! La patience des

Re: [R] RODBC package not found (in English)

2015-04-20 Thread Ista Zahn
Install it with install.packages(RODBC) Best, Ista On Apr 20, 2015 7:02 AM, CHIRIBOGA Xavier xavier.chirib...@unine.ch wrote: Dear members, What can I do if I get this message: ? library(RODBC) Error in library(RODBC) : any package called ‘RODBC’ was found Thanks in advcance,

[R] high density plots using lattice dotplot()

2015-04-20 Thread Luigi Marongiu
Dear all, I am trying to plot the results of a PCR experiments that involves 384 individual plots. Admittedly the space for the plots will be tiny, but I just nedd some icon to have a feeling of the layout of the experiment and a quick comparison of the plots. I believe that lattice would be the

Re: [R-es] Como leer una BD con una estructura inadecuada

2015-04-20 Thread Carlos Ortega
Se me olvidó incluir el detalle de la referencia donde se anunciaba la disponibilidad de este nuevo paquete: http://blog.rstudio.org/2015/04/09/readr-0-1-0/ Saludos, Carlos Ortega www.qualityexcellence.es El 20 de abril de 2015, 11:40, Carlos Ortega c...@qualityexcellence.es escribió: Hola

Re: [R] misbehavior with extract_numeric() from tidyr

2015-04-20 Thread Jim Lemon
Hi arnaud, At a guess, it is the two hyphens that are present in those strings. I think that the function you are using interprets them as subtraction operators and since the string following the hyphen would produce NA, the result would be NA. Jim On Mon, Apr 20, 2015 at 7:46 PM, arnaud

[R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread John Sorkin
Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for clarity.) I can generate the list as

[R] error using by, Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default

2015-04-20 Thread John Sorkin
I am receiving an error message from the by function that I don't understand: Error in tapply(response, list(x.factor, trace.factor), fun) : argument trace.factor is missing, with no default My code follows: summary(ipd) group valuestime subjects weaned disp

Re: [R] misbehavior with extract_numeric() from tidyr

2015-04-20 Thread arnaud gaboury
On Mon, Apr 20, 2015 at 9:10 AM, arnaud gaboury arnaud.gabo...@gmail.com wrote: R 3.2.0 on Linux library(tidyr) playerStats - c(LVL 10, 5,671,448 AP l6,000,000 AP, Unique Portals Visited 1,038, XM Collected 15,327,123 XM, Hacks 14,268, Resonators Deployed

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread Michael Dewey
On 19/04/2015 15:34, John Sorkin wrote: Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am trying to generate a list of length 4n which consists of the integers 1 to n repeated in groups of four, i.e. 1,1,1,1, 2,2,2,2, 3,3,3,3, . . . . , n,n,n,n (The spaces in the list are added only for

[R] select portion of text file using R

2015-04-20 Thread Luigi Marongiu
Dear all, I have a flat file (tab delimited) derived from an excel file which is subdivided in different parts: a first part is reporting metadata, then there is a first spreadsheet indicated by [ ], then the actual data and the second spreadsheet with the same format [ ] and then the data. How

[R] RODBC did not found

2015-04-20 Thread CHIRIBOGA Xavier
Dear members, What can I do if I get this message: ? library(RODBC) Error in library(RODBC) : aucun package nommé ‘RODBC’ n'est trouvé Thanks in advcance, Xavier __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] Smart detection of wrap width?

2015-04-20 Thread MacQueen, Don
At this point, and since we are in an X windows context, I think it might be easier to use the window manager's features and write a little macro or something that will send my setwid() command to the active window, then assign it to a simple keystroke. Then: resize the window; hit the keystroke,

Re: [R] Smart detection of wrap width?

2015-04-20 Thread MacQueen, Don
I'm glad it's helpful! Defining it and then invoking it in ~/.Rprofile would work, but then you will need to be careful about managing both ./.Rprofile and ~/.Rprofile files. If you have one of the former, then the latter does not get sourced at startup (see ?Startup). Of course, you can put

[R] color handling in `barplot' inconsistent betwen `beside=FALSE' and `beside=TRUE'

2015-04-20 Thread j. van den hoff
hi, consider the following example: 8- x - matrix(1:6, 3, 2) layout(1:2) barplot(x, beside = TRUE, col = 1:6) barplot(x, beside = FALSE, col = 1:6) 8- it seems, it is not possible to make `beside=FAlSE' plots behave the

Re: [R] Need online version of R help pages

2015-04-20 Thread John McKown
On Mon, Apr 20, 2015 at 9:43 AM, Paul paul.domas...@gmail.com wrote: Acknowledged, Michael. I appreciate the pointer to the info. For at least a short while, however, this is my only access to R, so I am using this environment to ramp up on times series and R as much a possible. I think it

Re: [R] Smart detection of wrap width?

2015-04-20 Thread Paul Domaskis
On Mon, Apr 20, 2015 at 10:59 AM, MacQueen, Don macque...@llnl.gov wrote: I'm glad it's helpful! Defining it and then invoking it in ~/.Rprofile would work, but then you will need to be careful about managing both ./.Rprofile and ~/.Rprofile files. If you have one of the former, then the

Re: [R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread Marc Schwartz
On Apr 20, 2015, at 8:59 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! Please point me in the right direction. I need to match 2 strings, but focusing ONLY on characters, ignoring all special characters and punctuation signs, including (), , etc.. For

Re: [R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread Dimitri Liakhovitski
I think I found a partial answer: str_replace_all(x, [[:punct:]], ) On Mon, Apr 20, 2015 at 9:59 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! Please point me in the right direction. I need to match 2 strings, but focusing ONLY on characters, ignoring all special

Re: [R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread John McKown
On Mon, Apr 20, 2015 at 8:59 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! Please point me in the right direction. I need to match 2 strings, but focusing ONLY on characters, ignoring all special characters and punctuation signs, including (), , etc.. For example:

Re: [R] Need online version of R help pages

2015-04-20 Thread Paul
Acknowledged, Michael. I appreciate the pointer to the info. For at least a short while, however, this is my only access to R, so I am using this environment to ramp up on times series and R as much a possible. I think it should suffice for that purpose, and the real analysis can occur in a

Re: [R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread Duncan Murdoch
On 20/04/2015 9:59 AM, Dimitri Liakhovitski wrote: Hello! Please point me in the right direction. I need to match 2 strings, but focusing ONLY on characters, ignoring all special characters and punctuation signs, including (), , etc.. For example: I want the following to return: TRUE

Re: [R] library(xlsx) fails with an error: Error: package ‘rJava’ could not be loaded

2015-04-20 Thread Hadley Wickham
You might want to try readxl instead, as it doesn't have any external dependencies. Hadley On Sat, Apr 18, 2015 at 3:07 PM, John Sorkin jsor...@grecc.umaryland.edu wrote: Windows 7 64-bit R 3.1.3 RStudio 0.98.1103 I am having difficulty loading and installing the xlsx package. The loading

[R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread Dimitri Liakhovitski
Hello! Please point me in the right direction. I need to match 2 strings, but focusing ONLY on characters, ignoring all special characters and punctuation signs, including (), , etc.. For example: I want the following to return: TRUE What a nice day today! - Story of happiness: Part 2. ==

Re: [R] list server problem?

2015-04-20 Thread Martin Maechler
Dear all, I use Thunderbird 31.6.0 on Mac OS 10.6.8 to download my e-mails. Since this morning, Thunderbird downloads several times the same e-mails from the list, some even being from yesterday. It occurs only with e-mails from the R-help and not with my other professional and private

Re: [R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread Sven E. Templer
Hi Dimitri, str_replace_all is not in the base libraries, you could use 'gsub' as well, for example: a = What a nice day today! - Story of happiness: Part 2. b = What a nice day today: Story of happiness (Part 2) sa = gsub([^A-Za-z0-9], , a) sb = gsub([^A-Za-z0-9], , b) a==b # [1] FALSE sa==sb #

Re: [R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread Charles Determan
You can use the [:alnum:] regex class with gsub. str1 - What a nice day today! - Story of happiness: Part 2. str2 - What a nice day today: Story of happiness (Part 2) gsub([^[:alnum:]], , str1) == gsub([^[:alnum:]], , str2) [1] TRUE The same can be done with the stringr package if you really

Re: [R] Smart detection of wrap width?

2015-04-20 Thread Paul
Paul Domaskis paul.domaskis at gmail.com writes: Yes, I found the width option in the help pages, but I was wondering if there was automatic setting of the wrapping according to the current window width. Your function works exactly as I wished. I'll probably get smarter with time (I hope)

Re: [R] lag1.plot {astsa} vs. lag.plot {stats}

2015-04-20 Thread Paul
Roy Mendelssohn - NOAA Federal roy.mendelssohn at noaa.gov writes: | Not certain which plot you are looking at, but my guess is the | answer is contained somewhere here: | http://www.stat.pitt.edu/stoffer/tsa3/Rissues.htm in particular | perhaps issues 4-5. On Apr 20, 2015, Paul Domaskis

Re: [R] Problem with col

2015-04-20 Thread John Kane
-Original Message- From: soniaam...@gmail.com Sent: Mon, 20 Apr 2015 18:56:19 +0200 To: sarah.gos...@gmail.com Subject: Re: [R] Problem with col --- clip-- When I type data , I obtain all the numeric values and the headears I added (Consommation,Cylindre,Puissance,Poids) No

Re: [R] lag1.plot {astsa} vs. lag.plot {stats}

2015-04-20 Thread Roy Mendelssohn - NOAA Federal
snip By the way, the tsa3 issues page that you reference above...it's indicates the problems with existing time series functions as the reason for developing corrected functsion in astsa/tsa3. But the actual documentation for these corrected functions are extremely sparse. Is there

Re: [R] Problem with col

2015-04-20 Thread Sonia Amin
Thank you very much John I understand the problem. 2015-04-20 19:38 GMT+02:00 John Kane jrkrid...@inbox.com: -Original Message- From: soniaam...@gmail.com Sent: Mon, 20 Apr 2015 18:56:19 +0200 To: sarah.gos...@gmail.com Subject: Re: [R] Problem with col --- clip--

Re: [R] Problem with col

2015-04-20 Thread Sonia Amin
Thank you very much Sarah 2015-04-20 19:05 GMT+02:00 Sarah Goslee sarah.gos...@gmail.com: On Mon, Apr 20, 2015 at 12:56 PM, Sonia Amin soniaam...@gmail.com wrote: Sorry Sarah for my basic question: what does a column was read as factor mean? A factor is one of the basic types of data in

Re: [R] Need online version of R help pages

2015-04-20 Thread Henrik Bengtsson
I don't want to rub it in more, but whatever dark forces are upon you, they'd have a hard time preventing you from installing R to your user account, which requires minimal privileges(*). Just wanted to make sure you're aware of your options /Henrik (*) The R Windows installer detects and

Re: [R] Problem with col

2015-04-20 Thread Sonia Amin
Sorry Sarah for my basic question: what does a column was read as factor mean? When I type data , I obtain all the numeric values and the headears I added (Consommation,Cylindre,Puissance,Poids) Thanks 2015-04-20 18:40 GMT+02:00 Sarah Goslee sarah.gos...@gmail.com: What is the problem?

Re: [R] Need online version of R help pages

2015-04-20 Thread Paul
Henrik Bengtsson henrik.bengtsson at ucsf.edu writes: I don't want to rub it in more, but whatever dark forces are upon you, they'd have a hard time preventing you from installing R to your user account, which requires minimal privileges(*). Just wanted to make sure you're aware of your

Re: [R] lag1.plot {astsa} vs. lag.plot {stats}

2015-04-20 Thread Paul
On Apr 17, 2015, at 7:30 PM, Paul Domaskis paul.domaskis at gmail.com wrote: I'm following http://www.stat.pitt.edu/stoffer/tsa3/R_toot.htm to ramp up on both time series and R. About 40% of the way down, the tutorial uses lag1.plot from astsa and lag.plot from stats. The positioning of the

Re: [R] groupedData HELP!

2015-04-20 Thread peter dalgaard
On 20 Apr 2015, at 17:50 , CHIRIBOGA Xavier xavier.chirib...@unine.ch wrote: Dear members, what to do when this appears ? Error: could not find function groupedData This should be a good start: RSiteSearch(groupedData) Thanks a lot, Xavier

[R] Problem with col

2015-04-20 Thread Sonia Amin
Dear All, I have written the following lines: data-read.table(C:\\Users\\intel\\Documents\\SIIID\\datamultiplereg.txt,header = FALSE, sep = ) colnames(data)-c(Consommation,Cylindre,Puissance,Poids) result.model1-lm(Consommation~Cylindre+Puissance+Poids, data=data) summary(result.model1) I

Re: [R] Problem with col

2015-04-20 Thread Sarah Goslee
What is the problem? One or more of your columns was read as factor, as str(data) would show you. To avoid this, you can add stringsAsFactors=FALSE to the read.table command, but if you expect your data to be entirely numeric then there's something wrong with it that you need to hunt down.

Re: [R] Problem with col

2015-04-20 Thread Sarah Goslee
On Mon, Apr 20, 2015 at 12:56 PM, Sonia Amin soniaam...@gmail.com wrote: Sorry Sarah for my basic question: what does a column was read as factor mean? A factor is one of the basic types of data in R, and in statistics generally, eg M/F or red/white/blue - a predetermined set of categories

Re: [R] color handling in `barplot' inconsistent betwen `beside=FALSE' and `beside=TRUE'

2015-04-20 Thread Marc Schwartz
On Apr 20, 2015, at 10:01 AM, j. van den hoff veedeeh...@googlemail.com wrote: hi, consider the following example: 8- x - matrix(1:6, 3, 2) layout(1:2) barplot(x, beside = TRUE, col = 1:6) barplot(x, beside = FALSE, col = 1:6)

Re: [R] color handling in `barplot' inconsistent betwen `beside=FALSE' and `beside=TRUE'

2015-04-20 Thread j. van den hoff
On Mon, 20 Apr 2015 18:10:10 +0200, Marc Schwartz marc_schwa...@me.com wrote: On Apr 20, 2015, at 10:01 AM, j. van den hoff veedeeh...@googlemail.com wrote: hi, consider the following example: 8- x - matrix(1:6, 3, 2) layout(1:2) barplot(x, beside =

Re: [R] regexpr - ignore all special characters and punctuation in a string

2015-04-20 Thread Dimitri Liakhovitski
Thanks a lot, everybody for excellent suggestions! On Mon, Apr 20, 2015 at 10:15 AM, Charles Determan cdeterma...@gmail.com wrote: You can use the [:alnum:] regex class with gsub. str1 - What a nice day today! - Story of happiness: Part 2. str2 - What a nice day today: Story of happiness

Re: [R] Need online version of R help pages

2015-04-20 Thread Paul
John McKown john.archie.mckown at gmail.com writes: On Mon, Apr 20, 2015 at 9:43 AM, Paul Paul.Domaskis at gmail.com wrote: http://www.tutorialspoint.com/execute_r_online.php John, I appreciate the pointer. I wish the post quoted below had made it to the mailing list, as I could have saved

[R] groupedData HELP!

2015-04-20 Thread CHIRIBOGA Xavier
Dear members, what to do when this appears ? Error: could not find function groupedData Thanks a lot, Xavier __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R-es] Integración de R y C#

2015-04-20 Thread Pedro Herrero Petisco
Muchas gracias Javier. Sí, ya he encontrado el hilo y fuiste tú con este enlace: http://www.gisandchips.org/2009/09/21/integracion-de-r-en-aplicaciones-de-escritorio-r-rcom-y-c/ La verdad es que en un primer vistazo no he entendido demasiado del link que has pasado de rdotnet, pero supongo que es

Re: [R] misbehavior with extract_numeric() from tidyr

2015-04-20 Thread William Dunlap
The hyphen without a following digit confuses tidyr::extract_numeric(). E.g., extract_numeric(23 ft-lbs) Warning message: In extract_numeric(23 ft-lbs) : NAs introduced by coercion [1] NA extract_numeric(23 ft*lbs) [1] 23 Contact the BugReports address for the package

[R-es] Como leer una BD con una estructura inadecuada

2015-04-20 Thread Patricio Fuenmayor Viteri
Hola Eric.Le detallo que es lo que yo hago en estos casos.Identificar el tipo de archivo, es decir, que separadores de columnas tiene ?, que tipo de datos debe tener cada variable?, etc.Si el archivo es muy grande y un editor de texto (como Note++) no lo puede abrir por temas de memoria, puede

Re: [R] misbehavior with extract_numeric() from tidyr

2015-04-20 Thread arnaud gaboury
On Mon, Apr 20, 2015 at 6:09 PM, William Dunlap wdun...@tibco.com wrote: The hyphen without a following digit confuses tidyr::extract_numeric(). E.g., extract_numeric(23 ft-lbs) Warning message: In extract_numeric(23 ft-lbs) : NAs introduced by coercion [1] NA

[R] feature selection

2015-04-20 Thread ismail hakkı sonalcan
Hi, I want to make feature selection. Could you help me. Thanks. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] R code/package for calculation of Wasserstein distance between two densities

2015-04-20 Thread Dennis Murphy
Hi Ranjan: Try this: library(sos) findFn(Wasserstein) It appears there are three packages that might be relevant: HistDAWass, transport and TDA. HTH, Dennis On Sat, Apr 18, 2015 at 8:06 PM, Ranjan Maitra maitra.mbox.igno...@inbox.com wrote: Dear friends, Before reinventing the wheel, I was

Re: [R] misbehavior with extract_numeric() from tidyr

2015-04-20 Thread Hadley Wickham
On Mon, Apr 20, 2015 at 1:57 PM, arnaud gaboury arnaud.gabo...@gmail.com wrote: On Mon, Apr 20, 2015 at 6:09 PM, William Dunlap wdun...@tibco.com wrote: The hyphen without a following digit confuses tidyr::extract_numeric(). E.g., extract_numeric(23 ft-lbs) Warning message: In

Re: [R-es] Integración de R y C#

2015-04-20 Thread Javier Marcuzzi
Estimado Pedro Hay una cosa buena, o práctica, desde visual studio puede usar nuget, este instala lo que necesita, ej código fuente de la parte de R y C# es el link que le envié. Javier El 20 de abril de 2015, 12:56, Pedro Herrero Petisco pedroherreropeti...@gmail.com escribió: Muchas

Re: [R] problem with CSV and R

2015-04-20 Thread Nino David Jordan
I get the same error message when I try to edit a data frame on the basis of a .csv file. -- View this message in context: http://r.789695.n4.nabble.com/problem-with-CSV-and-R-tp4680979p4706148.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] feature selection

2015-04-20 Thread Charles Determan
Although I am sure many here would be happy to help you your question is far too vague. There are many methods for feature selection. You should review the literature and see what would work best for you or consult a statistician. Once you have selected a method and began an initial attempt at

Re: [R] (no subject)

2015-04-20 Thread Paul
Roy Mendelssohn - NOAA Federal roy.mendelssohn at noaa.gov writes: | By the way, the tsa3 issues page that you reference above...it's | indicates the problems with existing time series functions as the | reason for developing corrected functsion in astsa/tsa3. But the | actual documentation for

  1   2   >