Re: [R] how to exclude certain keywords in strings

2018-10-11 Thread Jeff Newmiller
I cannot imagine you looked very hard... this kind of question pops up all the time on this mailing list. Read the help fur the sub() function... you want to search for something and replace it with an empty string (""). You should also know by now to post plain text on this mailing list. On

Re: [R] how to exclude certain keywords in strings

2018-10-11 Thread lily li
I just figured this out, which seems to be a simple question. I just used gsub("_temp.csv","","StationName1_temp.csv"). > Hi R users, > > I don't know how to extract certain words in strings. For example, if I > have strings like the formats "StationName1_temp.csv", > "StationName2_temp.csv",

[R] how to exclude certain keywords in strings

2018-10-11 Thread lily li
Hi R users, I don't know how to extract certain words in strings. For example, if I have strings like the formats "StationName1_temp.csv", "StationName2_temp.csv", etc. How to get strings like these "StationName1", "StationName2", etc? That is to say, I want to exclude the keywords "_temp.csv",

Re: [R] Finding unique terms

2018-10-11 Thread Jim Lemon
Yes, I thought that as well and had worked out this but didn't send it: add_Pscores<-function(x) { return(sum(unlist(x),na.rm=TRUE)) } by(rzdf[,c("PO1M", "PO1T", "PO2M", "PO2T")],rzdf$STUDENT_ID,FUN=add_Pscores) rzdf$STUDENT_ID: AA15285 [1] 724.8

Re: [R] Finding unique terms

2018-10-11 Thread Jeff Newmiller
You said "add up"... so you did not mean to say that? Denes computed the mean... On October 11, 2018 3:56:23 PM PDT, roslinazairimah zakaria wrote: >Hi Denes, > >It works perfectly as I want! > >Thanks a lot. > >On Fri, Oct 12, 2018 at 6:29 AM Dénes Tóth >wrote: > >> >> >> On 10/12/2018 12:12

Re: [R] Finding unique terms

2018-10-11 Thread roslinazairimah zakaria
Hi Denes, It works perfectly as I want! Thanks a lot. On Fri, Oct 12, 2018 at 6:29 AM Dénes Tóth wrote: > > > On 10/12/2018 12:12 AM, roslinazairimah zakaria wrote: > > Dear r-users, > > > > I have this data: > > > > structure(list(STUDENT_ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, > > 2L, 2L,

Re: [R-es] Transponer data frame.

2018-10-11 Thread juan manuel dias
muchas gracias! El jue., 11 oct. 2018 a las 16:03, José Trujillo Carmona () escribió: > Mediante unstack y reordenando columnas con <- [, ...] > > > NV<-c(1240,1240,1240,1240,1241,1241,1241,1241) > > > >

Re: [R] Finding unique terms

2018-10-11 Thread Dénes Tóth
On 10/12/2018 12:12 AM, roslinazairimah zakaria wrote: Dear r-users, I have this data: structure(list(STUDENT_ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L), .Label = c("AA15285", "AA15286"), class = "factor"), COURSE_CODE = structure(c(1L, 2L, 5L, 6L, 7L, 8L, 2L, 3L,

[R] Finding unique terms

2018-10-11 Thread roslinazairimah zakaria
Dear r-users, I have this data: structure(list(STUDENT_ID = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L), .Label = c("AA15285", "AA15286"), class = "factor"), COURSE_CODE = structure(c(1L, 2L, 5L, 6L, 7L, 8L, 2L, 3L, 4L, 5L, 6L), .Label = c("BAA1113", "BAA1322", "BAA2113",

Re: [R-es] Transponer data frame.

2018-10-11 Thread Carlos Ortega
Hola, Esta es otra alternativa: > Lines <- " + Numero_vuelo Nacionalidad Pax + 1240 Argentina 2341 + 1240 Uruguaya 4432 + 1240 Paraguaya 67000 + 1240 Brasilera 1234 + 1241 Argentina 7344 + 1241 Uruguaya 543000 + 1241 Paraguaya 3000

Re: [R-es] Transponer data frame.

2018-10-11 Thread José Trujillo Carmona
Mediante unstack y reordenando columnas con <- [, ...] > NV<-c(1240,1240,1240,1240,1241,1241,1241,1241) > Nc<-c("Argentina","Uruguaya","Paraguaya","Brasilera","Argentina","Uruguaya","Paraguaya","Brasilera") > Pax<-c(2341,4432,67000,1234,7344,543000,3000,234000) >

Re: [R] Package updates for new versions

2018-10-11 Thread William Dunlap via R-help
bug.report(package="thePackage") will look through the DESCRIPTION file to figure out a good way to report concerns about a package. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Oct 11, 2018 at 10:41 AM, Jeff Newmiller wrote: > I recommend reading the DESCRIPTION file or the CRAN web

Re: [R-es] Transponer data frame.

2018-10-11 Thread juan manuel dias
Muchas gracias. El jue., 11 de oct. de 2018 12:43 p.m., Isidro Hidalgo Arellano < ihida...@jccm.es> escribió: > Buenas tardes: > > Lo que necesitas lo puedes hacer con la función “reshape”, del paquete > “stats”. > > Tienes los datos en la forma “long” y necesitas pasarlos a “wide”. > > Un

Re: [R-es] Transponer data frame.

2018-10-11 Thread juan manuel dias
Muchas gracias. El jue., 11 de oct. de 2018 12:46 p.m., Javier Nieto escribió: > Hola > > > Desconozco lo que estés haciendo pero en general, no es una buena práctica > trabajar de eso modo a menos que sea para visualización en un documento. Lo > recomendable es trabajar con la información como

Re: [R] Package updates for new versions

2018-10-11 Thread Jeff Newmiller
I recommend reading the DESCRIPTION file or the CRAN web page for the package if it is on n CRAN, e.g. [1]. While every package on CRAN is supposed to have an email for contact, many developers do prefer alternate communication approaches. Github is NOT used universally though. [1]

Re: [R] Package updates for new versions

2018-10-11 Thread Rich Shepard
On Thu, 11 Oct 2018, Bert Gunter wrote: ?maintainer Bert, I found maintainer names from the package entry in the local CRAN repo. I suspect that the above does not work well with non-installed packages. Am I wrong? Regards, Rich __

Re: [R] Package updates for new versions

2018-10-11 Thread Rich Shepard
On Thu, 11 Oct 2018, Amit Mittal wrote: You can contact them as Marc suggested by opening an account at bit (bitbucket/Atlassian) or git (github) Most prefer strongly to have a primary at git before going to Atlassian other code checkers so you can discover the package team there esp if any

Re: [R] Package updates for new versions

2018-10-11 Thread Amit Mittal
Most developers like to be unavailable on email without genuine queries, one or the other we tell you to come thru git On Thu 11 Oct, 2018, 22:26 Bert Gunter, wrote: > ?maintainer > > in R accesses the package description file to provide maintainer info. No > need to fool around with git or

Re: [R] Package updates for new versions

2018-10-11 Thread Bert Gunter
?maintainer in R accesses the package description file to provide maintainer info. No need to fool around with git or other software development repositories. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley

Re: [R] Package updates for new versions

2018-10-11 Thread Amit Mittal
You can contact them as Marc suggested by opening an account at bit (bitbucket/Atlassian) or git (github) Most prefer strongly to have a primary at git before going to Atlassian other code checkers so you can discover the package team there esp if any future development is in the pipes. Don't

Re: [R] Package updates for new versions

2018-10-11 Thread Rich Shepard
On Thu, 11 Oct 2018, Marc Schwartz wrote: Your best bet is to directly contact the package maintainers, as they would be the definitive source for timeline information on package updates. Marc, Thank you, I will contact them. Being unfamiliar with standard practice I asked first. Best

Re: [R-es] Problemas Librería ggplot y grid en version de R 3.5.1

2018-10-11 Thread Carlos Ortega
Hola, El paquete que tienes que instalar es "ggplot*2*". Y la función que quieres usar de "grid.arrange" está realmente en el paquete "*gridExtra"*. Los dos paquetes (incluso grid) están disponibles para 3.5.1. Gracias, Carlos Ortega www.qualityexcellence.es El jue., 11 oct. 2018 a las 17:16,

Re: [R] Package updates for new versions

2018-10-11 Thread Marc Schwartz via R-help
> On Oct 11, 2018, at 11:40 AM, Rich Shepard wrote: > > This is a question to better my understanding of the relationship between > core R versions and packages that work with them. It's not a complaint or > criticism. > > Installed here is R-3.5.1. There are two packages that allow

Re: [R-es] Transponer data frame.

2018-10-11 Thread Javier Nieto
Hola Desconozco lo que estés haciendo pero en general, no es una buena práctica trabajar de eso modo a menos que sea para visualización en un documento. Lo recomendable es trabajar con la información como la tienes y no la transformes de esa forma. Si aun así decides hacerlo prueba la función

Re: [R-es] Transponer data frame.

2018-10-11 Thread Isidro Hidalgo Arellano
Buenas tardes: Lo que necesitas lo puedes hacer con la función “reshape”, del paquete “stats”. Tienes los datos en la forma “long” y necesitas pasarlos a “wide”. Un saludo Isidro Hidalgo Arellano Observatorio del Mercado de Trabajo Consejería de Economía, Empresas y Empleo

[R] Package updates for new versions

2018-10-11 Thread Rich Shepard
This is a question to better my understanding of the relationship between core R versions and packages that work with them. It's not a complaint or criticism. Installed here is R-3.5.1. There are two packages that allow integration of R and GRASS that are not yet available for 3.5.1: rpy2

[R-es] Problemas Librería ggplot y grid en version de R 3.5.1

2018-10-11 Thread juan manuel dias
Hola, Estoy corriendo un código y en la versión de R 3.5.1 no me permite continuar: *grid.arrange(g1,g2,g3,g4,nrow = 2)* *```* *Error in grid.arrange(g1, g2, g3, g4, nrow = 2) : * * could not* find function "grid.arrange" *Warning in install.packages :* * package ‘grid’ is not available (for R

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
On Thu, Oct 11, 2018 at 10:23 AM Yihui Xie wrote: > > In case Jeff's point was not clear enough: the *.nb.html file is very > similar to *.ipynb and it is very different with other output formats > that R Markdown generates. A .nb.html file is generated alongside .Rmd > when you preview an R

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Yihui Xie
In case Jeff's point was not clear enough: the *.nb.html file is very similar to *.ipynb and it is very different with other output formats that R Markdown generates. A .nb.html file is generated alongside .Rmd when you preview an R Markdown notebook, and it contains both the R Markdown source

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
On Thu, Oct 11, 2018 at 10:15 AM Yihui Xie wrote: > > I just have one comment on the multi-language support in R Markdown > (inline below): > > On Thu, Oct 11, 2018 at 6:19 AM Ista Zahn wrote: > > > > Hi Spencer, > > > > On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves > > wrote: > > > > > >

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Yihui Xie
I just have one comment on the multi-language support in R Markdown (inline below): On Thu, Oct 11, 2018 at 6:19 AM Ista Zahn wrote: > > Hi Spencer, > > On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves > wrote: > > > > Hello: > > > > > >What are the differences between Jupyter notebooks

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
On Thu, Oct 11, 2018 at 10:03 AM Jeff Newmiller wrote: > > Ista, you do not seem to be aware of the > .nb.html format, which is way easier to share with a non-uswr than an ipynb > file yet allows the same in-progress kinds of results to be shared and the > source can be extracted easily using a

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Jeff Newmiller
Ista, you do not seem to be aware of the .nb.html format, which is way easier to share with a non-uswr than an ipynb file yet allows the same in-progress kinds of results to be shared and the source can be extracted easily using a web browser (no server needed). There is some controversy about

Re: [R] Genuine relative paths with R

2018-10-11 Thread Michael Friendly
Olivier: Readers of R-Help generally are patient and try to be helpful. Numerous solutions to your initial query were proposed, but for some reason you either reject them or take the discussion down some different rabbit hole of claims about R vs. other software environments, to which kind

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
On Thu, Oct 11, 2018 at 8:36 AM Duncan Murdoch wrote: > > On 11/10/2018 7:18 AM, Ista Zahn wrote: > > Hi Spencer, > > > > On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves > > wrote: > >> > >> Hello: > >> > >> > >> What are the differences between Jupyter notebooks and RMarkdown > >>

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Hadley Wickham
I'd highly recommend Yihui's extensive write up: https://yihui.name/en/2018/09/notebook-war/ Hadley On Thu, Oct 11, 2018 at 4:08 AM Spencer Graves wrote: > > Hello: > > >What are the differences between Jupyter notebooks and RMarkdown > vignettes? > > >I'm trying to do real time

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Duncan Murdoch
On 11/10/2018 7:18 AM, Ista Zahn wrote: Hi Spencer, On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves wrote: Hello: What are the differences between Jupyter notebooks and RMarkdown vignettes? Here are some of the main differences I'm aware of: Rmarkdown files include code and

Re: [R] Reorder file names read by list.files function

2018-10-11 Thread Ek Esawi
Thank you all. Bill's original idea worked well. I did not realize that i had to paste the full dir name to the correctly ordered file. Once that was done it did work well. I will try REUI's idea and i think Jeff's idea of rearranging the output after extracting the tables might work and i will

Re: [R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Ista Zahn
Hi Spencer, On Thu, Oct 11, 2018 at 5:08 AM Spencer Graves wrote: > > Hello: > > >What are the differences between Jupyter notebooks and RMarkdown > vignettes? Here are some of the main differences I'm aware of: Rmarkdown files include code and prose. The results produced by the code

Re: [R] Genuine relative paths with R

2018-10-11 Thread Duncan Murdoch
On 10/10/2018 8:08 PM, Olivier GIVAUDAN wrote: I think Gabor (at least) already suggested this solution. But the problem is: how do you source this file containing this 'foo' function without writing its absolute path? You only need its relative path to source it. Duncan Murdoch It's a

[R] RMarkdown vignettes v. Jupyter notebooks?

2018-10-11 Thread Spencer Graves
Hello:   What are the differences between Jupyter notebooks and RMarkdown vignettes?   I'm trying to do real time monitoring of the broadcast quality of a radio station, and it seems to me that it may be easier to do that in Python than in R.[1]  This led me to a recent post to

Re: [R] Genuine relative paths with R

2018-10-11 Thread Fritsch, Katharina (NNL)
Hiya, I have lost track of half the discussion so forgive me if that suggestion has been made before, but would it be suitable to wrap your code in a shiny app and disseminate it this way? Kind regards, Katharina. -- Dr Katharina Fritsch B.Sc. M.Sc. MRSC Chemical Modeller, Chemical and Process