Re: [R] Dates and Times in R

2017-01-05 Thread PIKAL Petr
Hi It strongly reminds me following fortune library(fortunes) fortune("surgery") Along with Posting guide you should also look at chapter 7 of R intro manual. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of David > Winsemius > Sent:

Re: [R] Assignment 1 (function error)

2017-01-05 Thread Jim Lemon
Hi Malvika, What David means is that we don't do people's homework for them. Have a look at "An Introduction to R" that comes with the R distribution, particularly about sequences and vectorization. Jim On Fri, Jan 6, 2017 at 7:40 AM, Malvika Marathe wrote: > Can you please

Re: [R] About concatenating strings

2017-01-05 Thread Jim Lemon
Hi lily, maybe this is what you want: strings1<-c(1.2,1.31,1.4,1.51) strings2<-c(2.1,2.22,2.3,2.44) paste(formatC(strings1,digits=2,format="f"), formatC(strings2,digits=2,format="f"),sep="-") Jim On Fri, Jan 6, 2017 at 4:56 PM, lily li wrote: > Sorry for the emails. I

Re: [R] About concatenating strings

2017-01-05 Thread lily li
Sorry for the emails. I just checked and the problem is still there. Is there a proper way to reformat the decimal places, such as three or four decimal places? Thanks. If maintain four decimal places, the numbers are: 1.2000, 1.3100, 1.4000, etc. On Thu, Jan 5, 2017 at 10:46 PM, lily li

Re: [R] About concatenating strings

2017-01-05 Thread lily li
I found that the last column is the digits 2.00, so the problem is solved. On Thu, Jan 5, 2017 at 10:42 PM, lily li wrote: > Hi R users, > > I'm trying to concatenate two strings, while each string has numbers. > For example, strings1 = c(1.2, 1.31, 1.4, 1.51, etc),

[R] About concatenating strings

2017-01-05 Thread lily li
Hi R users, I'm trying to concatenate two strings, while each string has numbers. For example, strings1 = c(1.2, 1.31, 1.4, 1.51, etc), strings2= c(2.1, 2.22, 2.3, 2.44, etc). I want to have all decimals for the two strings, such as: strings1= c(1.20, 1.31, 1.40, 1.51, etc), string2 = c(2.10,

Re: [R] Assignment 1 (function error)

2017-01-05 Thread David Winsemius
You should read the Posting Guide. > On Jan 5, 2017, at 12:40 PM, Malvika Marathe wrote: > > Can you please help me with this assignment. I am having trouble with > inputting the ID. At the moment, the function will calculate 1-the ID number > you put in. I am not sure how

Re: [R] Dates and Times in R

2017-01-05 Thread David Winsemius
You should read the Posting Guide. > On Jan 5, 2017, at 10:56 AM, elif beyza çatalbaş > wrote: > > Dear Mrs/Mr > > I am a meteorological engineer and currently I am a master of science > student in atmospheric science at Istanbul Technical University. I have >

[R] Dates and Times in R

2017-01-05 Thread elif beyza çatalbaş
Dear Mrs/Mr I am a meteorological engineer and currently I am a master of science student in atmospheric science at Istanbul Technical University. I have data analysis and visualization lesson and I am analyzing data in R programming. I have to project in this lesson and I am working on wind

[R] Assignment 1 (function error)

2017-01-05 Thread Malvika Marathe
Can you please help me with this assignment. I am having trouble with inputting the ID. At the moment, the function will calculate 1-the ID number you put in. I am not sure how to make it so that you can put only one number in or a range of your choosing (a range that doesn’t start with 1)

Re: [R] Fw: Regex problem

2017-01-05 Thread Carl Sutton via R-help
Thank you gentlemen, thank you!   All worked as you said it would and my headers are now error free. And David, thanks for the reference material cite.  I will looking at that this weekend.  Carl Sutton On Thursday, January 5, 2017 12:12 PM, David Winsemius wrote:

[R-es] que tal comunidad, una pregunta del paquete data.table

2017-01-05 Thread eric
si se tiene un data.table (DT), supongamos de 100 filas por 3 columnas de datos numericos, como puedo hacer para obtener el correspondiente valor de la columna 1 si busco, por ejemplo, el maximo de la columna 2 agrupado por la columna 3 ? para buscar el maximo de la columna 2 escribo. DT[ ,

Re: [R] [FORGED] Re: Generating a Special Histogram

2017-01-05 Thread Duncan Murdoch
On 05/01/2017 5:21 PM, Rolf Turner wrote: On 06/01/17 10:31, Jim Lemon wrote: Hi Dan, This may help if your data is in the format below: waffle.mat<-matrix(c(rep(NA,14),137,135,rep(NA,6),144,149, rep(NA,3),150,152,159,157,154, NA,163,164,164,161,162,165,164,rep(NA,5),179,173,173,

Re: [R] [FORGED] Re: Generating a Special Histogram

2017-01-05 Thread Jim Lemon
A worthy challenge, Rolf: egdat <- c(137,135,144,149,150,152,159,157,154,163,164,164, 161,162,165,164,179,173,173,182,180,185,180,197,190) egcut<-cut(egdat,breaks=seq(120,210,by=10),right=FALSE) eglist<-vector("list",9) for(egindex in 1:9)

Re: [R] [FORGED] Re: Generating a Special Histogram

2017-01-05 Thread Rolf Turner
On 06/01/17 10:31, Jim Lemon wrote: Hi Dan, This may help if your data is in the format below: waffle.mat<-matrix(c(rep(NA,14),137,135,rep(NA,6),144,149, rep(NA,3),150,152,159,157,154, NA,163,164,164,161,162,165,164,rep(NA,5),179,173,173, rep(NA,4),182,180,185,180,

Re: [R] Generating a Special Histogram

2017-01-05 Thread Jim Lemon
Hi Dan, This may help if your data is in the format below: waffle.mat<-matrix(c(rep(NA,14),137,135,rep(NA,6),144,149, rep(NA,3),150,152,159,157,154, NA,163,164,164,161,162,165,164,rep(NA,5),179,173,173, rep(NA,4),182,180,185,180, rep(NA,6),197,190,rep(NA,8)),ncol=9)

Re: [R] IRkernel Installation Issues

2017-01-05 Thread David Winsemius
> On Jan 5, 2017, at 11:16 AM, Paul Bernal wrote: > > Hello everyone, > > I tried to get the IRkernel going doing the following: > > install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', > 'devtools', 'uuid', 'digest')) > > then taking care of proxy

Re: [R] Generating a Special Histogram

2017-01-05 Thread David L Carlson
Here's a different approach using barplot() to draw the boxes. The first line in the function sorts the values so that they are printed from lowest to highest on the histogram. If you want them in the original sequence, comment this line out. It also assumes you want intervals of 10:

Re: [R] rJava

2017-01-05 Thread tolga . uzuner
Many thanks and will post accordingly. Tolga > On Jan 5, 2017, at 3:08 PM, Jeff Newmiller wrote: > > I would guess that you don't have the Java runtime installed, or that the > wordsize (32 or 64 bit) runtime you have installed is not compatible with the > wordsize

Re: [R] rJava

2017-01-05 Thread Jeff Newmiller
I would guess that you don't have the Java runtime installed, or that the wordsize (32 or 64 bit) runtime you have installed is not compatible with the wordsize of the version of R that you are using. You really should read and heed the Posting Guide, which mentions things like mentioning

[R] rJava

2017-01-05 Thread tolga.uzuner
Dear R Users, I am having the following problem with rJava, on a Windows 10 machine with R 3.3.2: > library(rJava) Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Error: package or namespace

[R] IRkernel Installation Issues

2017-01-05 Thread Paul Bernal
Hello everyone, I tried to get the IRkernel going doing the following: install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest')) then taking care of proxy settings by doing: library(devtools) library(httr)

Re: [R] Fw: Regex problem

2017-01-05 Thread David Winsemius
> On Jan 5, 2017, at 10:09 AM, Carl Sutton via R-help > wrote: > > Re-sending help request, went to wrong addy first time. > r-help-requ...@r-project.org > > Belated Happy new year to the Guru's: > > I have a data frame with 570+ columns and in those column headers

[R] Fw: Regex problem

2017-01-05 Thread Carl Sutton via R-help
Re-sending help request, went to wrong addy first time. r-help-requ...@r-project.org Belated Happy new year to the Guru's: I have a data frame with 570+ columns and in those column headers yours truly has a few blunders. Namely somehow I managed to end some of them with both an apostrophe '

Re: [R] Generating a Special Histogram

2017-01-05 Thread Duncan Murdoch
On 05/01/2017 11:01 AM, Dan Abner wrote: Hi all, Is anyone aware of a package, function, or general R trick that would make generating histograms like the one in the attachment easy in R (i.e., without manually drawing each individual horizontal line and specifying the coordinates for a textbox

Re: [R] Generating a Special Histogram

2017-01-05 Thread Sarah Goslee
Hi Dan, I'd probably start by looking at the various examples for stem and leaf plot in R. stem() or aplpack::stem.leaf() might help you get started, or if you don't need the fancy boxes, be sufficient. Sarah On Thu, Jan 5, 2017 at 11:01 AM, Dan Abner wrote: > Hi all, >

Re: [R] Generating a Special Histogram

2017-01-05 Thread Richard M. Heiberger
I recommend the stem function. > stem(wt) The decimal point is 1 digit(s) to the right of the | 12 | 57 14 | 4902479 16 | 1233444349 18 | 002507 > stem(wt, 2) The decimal point is 1 digit(s) to the right of the | 13 | 57 14 | 49 15 | 02479 16 | 1233444 17 | 349 18 |

[R] Generating a Special Histogram

2017-01-05 Thread Dan Abner
Hi all, Is anyone aware of a package, function, or general R trick that would make generating histograms like the one in the attachment easy in R (i.e., without manually drawing each individual horizontal line and specifying the coordinates for a textbox for each number)? I need to make ~12 of

Re: [R] Problems with roxygen2 when building package

2017-01-05 Thread David Winsemius
> On Jan 5, 2017, at 5:35 AM, Renger van Nieuwkoop > wrote: > > Hi > I am trying to build my own package. When I run in RStudio (R3.3.2, all > packages updated, Roxygen available, Windows 10 machine) build-document, I > get the following error message: > > ==>

[R] Linear optimization with quadratic constraints

2017-01-05 Thread Preetam Pal
Hello guys, The context is ordinary multivariate regression with k (>1) regressors, i.e. *Y = XB + Error*, where Y = n X 1 vector of predicted variable, X = n X (k + 1) matrix of regressor variables(including ones in the first column) B = (k+1) vector of coefficients, including intercept. Say, I

[R] Problems with roxygen2 when building package

2017-01-05 Thread Renger van Nieuwkoop
Hi I am trying to build my own package. When I run in RStudio (R3.3.2, all packages updated, Roxygen available, Windows 10 machine) build-document, I get the following error message: ==> devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) Fehler in check_dep_version(pkg,

Re: [R-es] Regresión Logística desbalanceada

2017-01-05 Thread José Luis Cañadas
Hola. En principio podrías hacer sobremuestreo de tus FALSE. Teóricamente el sobre muestreo NO debería mejorar sustancialmente un modleo logístico y si se utiliza hay que corregir las estimaciones. Un par de referencias de los compañeros Raúl Vaquerizo y Carlos Gil, respectivamente 1-

Re: [R] XML to CSV

2017-01-05 Thread Franzini, Gabriele [Nervianoms]
Hello Andrew, as you are "clean slate" anyway in handling XML files, you could take a look to XSLT processing -- also an off-topic area. There are free tools available around, and many examples of "XML to CSV XSLT" on StackOverflow. HTH, Gabriele -Original Message- On January 4,

Re: [R-es] Regresión Logística desbalanceada

2017-01-05 Thread Carlos Ortega
Hola, Sí, puedes balancear las clases de diferentes formas... Mira lo que ofrece el paquete "caret" aquí: http://topepo.github.io/caret/subsampling-for-class-imbalances.html Saludos, Carlos Ortega www.qualityexcellence.es El 5 de enero de 2017, 13:28, Milagros Camacho Bellido <