[R] Problem in conversion of regulate time series and forecasting using Date Time [Timestamp values]:R

2017-04-26 Thread Dhivya Narayanasamy
Hi, I am new to R. Kindly help me with the plot that gives wrong x-axis values. I have a data frame "gg", that looks like this: > head(gg) timestamps value 1 2017-04-25 16:52:00 -0.412 2 2017-04-25 16:53:00 -0.4526667 3 2017-04-25 16:54:00 -0.4586667 4 2017-04-25 16:55:00 -0.

[R] Problem in conversion of regulate time series and forecasting using Date Time [Timestamp values]:R

2017-04-26 Thread Dhivya Narayanasamy
Hi, I have a data frame "gg", that looks like this: > head(gg) timestamps value 1 2017-04-25 16:52:00 -0.412 2 2017-04-25 16:53:00 -0.4526667 3 2017-04-25 16:54:00 -0.4586667 4 2017-04-25 16:55:00 -0.4606667 5 2017-04-25 16:56:00 -0.505 6 2017-04-25 16:57:00 -0.507 I

Re: [R] [FORGED] missing and replace

2017-04-26 Thread PIKAL Petr
Hi not sure if sexiest but zoo package has several functions for replacing missing values. as.data.frame(lapply(DF1, function(x) na.aggregate(x, FUN=function(y) round(mean(y) Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Rolf >

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread SeshanV
Attaching the code that generates the error. The function phcoefs in the attached was modeled after coxph.fit from which all the preprocessing has been stripped so that just coxfit6 (C code) can be called to estimate the coefficients. > library(survival) > source("coxfit6-issue.R") Error in .Ca

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread SeshanV
Thanks to Henrik Bengtsson I found a work around which is to use environment(phcoefs) <- asNamespace("survival") It seems like the symbols that are accessed using .Call are not accessible from outside the package that defines it. > phcoefs(stim[ii], sts[ii], as.matrix(as.double(cvt[ii])), oo$co

Re: [R] missing and replace

2017-04-26 Thread Ng Bo Lin
Apologies, I re-read the question and realised you hope to replace the missing values rounded to the nearest whole number. Here’s the code in full. df1 <- data.frame(x = c(25, 30, 40, 26, 60), y = c(122, 135, NA, 157, 195), z = c(352, 376, 350, NA, 360)) means <- sapply(df1, mean, na.rm = T);

Re: [R] missing and replace

2017-04-26 Thread Ng Bo Lin
Hi Val, You could do this by nesting 2 for loops, and defining a function such that it returns the mean of the column when the value is ‘NA’. df1 <- data.frame(x = c(25, 30, 40, 26, 60), y = c(122, 135, NA, 157, 195), z = c(352, 376, 350, NA, 360)); df2 <- df1[0, ] means <- sapply(df1, mean, n

Re: [R] [FORGED] missing and replace

2017-04-26 Thread Rolf Turner
On 27/04/17 12:45, Val wrote: HI all, I have a data frame with three variables. Some of the variables do have missing values and I want to replace those missing values (1represented by NA) with the mean value of that variable. In this sample data, variable z and y do have missing values. The me

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
On 26/04/2017 7:40 PM, sesh...@mskcc.org wrote: Thanks to Henrik Bengtsson I found a work around which is to use environment(phcoefs) <- asNamespace("survival") It seems like the symbols that are accessed using .Call are not accessible from outside the package that defines it. If it was inte

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
On 26/04/2017 5:20 PM, sesh...@mskcc.org wrote: Attaching the code that generates the error. The function phcoefs in the attached was modeled after coxph.fit from which all the preprocessing has been stripped so that just coxfit6 (C code) can be called to estimate the coefficients. library(s

[R] missing and replace

2017-04-26 Thread Val
HI all, I have a data frame with three variables. Some of the variables do have missing values and I want to replace those missing values (1represented by NA) with the mean value of that variable. In this sample data, variable z and y do have missing values. The mean value of y and z are152. 25

Re: [R] OpenCPU app development. Testing Source Code

2017-04-26 Thread Jeff Newmiller
Not the right forum... try https://www.opencpu.org/help.html I suggest you learn R interactively (not via OpenCPU), but packages are not that hard to build if you use RStudio. -- Sent from my phone. Please excuse my brevity. On April 26, 2017 3:05:05 PM PDT, Jake Stone wrote: >I'm brand new to

Re: [R] Reg. help for SWAT Calibration

2017-04-26 Thread Jim Lemon
Hi Sanjeev, The video that you attached seems to contain the information that you want. If you contact Kazi Rahman (the creator of the video) who seems to be at the University of Geneva currently, you may be able to get the information that you want. Jim On Wed, Apr 26, 2017 at 4:27 PM, Sanjeev K

[R] OpenCPU app development. Testing Source Code

2017-04-26 Thread Jake Stone
I'm brand new to opencpu. Do I have to package my code before I can test on my opencpu single server? It would be nice to just test from source. -- *jake* [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSC

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
On 26/04/2017 2:51 PM, Therneau, Terry M., Ph.D. wrote: A user contacted me directly about this, I answered with my best understanding of the recent R-help discussion of the issue, and their response to my response shows that I'm not quite right. I am emphatically not an MS Windows user so am

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Therneau, Terry M., Ph.D.
A user contacted me directly about this, I answered with my best understanding of the recent R-help discussion of the issue, and their response to my response shows that I'm not quite right. I am emphatically not an MS Windows user so am asking for help -- which I will cut/paste to this user a

Re: [R] Counting enumerated items in each element of a character vector

2017-04-26 Thread Boris Steipe
Let's be a bit careful. You'll probably need a regular expression. But maybe a regex can't work in principle, so one can't just gloss over the details. You said: "blah blah blah" can contain ANY text. If this is true, "blah blah blah" could contain the delimiters. If that is the case, a regex i

[R] [R-pkgs] Package huxtable 0.2.1 on CRAN

2017-04-26 Thread David Hugh-Jones
Hi all, I'm happy to announce that the huxtable package version 0.2.1 is on CRAN. huxtable is an R package to create LaTeX and HTML tables, with a friendly, modern interface. Features of 0.2.1 include: - Export to LaTeX, HTML, Word and Markdown - Easy integration with knitr and rmarkdown documen

Re: [R] Reg. help for SWAT Calibration

2017-04-26 Thread Jeff Newmiller
http://www.r-project.org/posting-guide.html https://cran.r-project.org -- Sent from my phone. Please excuse my brevity. On April 25, 2017 11:27:01 PM PDT, Sanjeev Kumar wrote: >Sir/Mam >I am a Research Scholar at Central University of Karnataka and I am >working on SWAT (Soil And Water Ass

Re: [R] Reg. help for SWAT Calibration

2017-04-26 Thread Boris Steipe
Your mental model of what R is and does appears to be misaligned with actuality. Quoting from Wikipedia: R is an open source programming language and software environment for statistical computing and graphics [...]. The R language is widely used among statisticians and data miners for d

Re: [R] Network Alternative to rJava/JRI?

2017-04-26 Thread Ista Zahn
Shiny could probably work, but https://www.opencpu.org/ is probably a better fit. Best, Ista On Wed, Apr 26, 2017 at 9:55 AM, Jake Stone wrote: > I am a java programmer, quite new to R. > > I am familiar with rJava/JRI, but would prefer a distributed networked > architecture for my systems. > >

[R] Reg. help for SWAT Calibration

2017-04-26 Thread Sanjeev Kumar
Sir/Mam I am a Research Scholar at Central University of Karnataka and I am working on SWAT (Soil And Water Assessment tool) and I need 'R' for the Calibration purpose but for 'R' I need a code. So if it is possible to send that code pls send me. https://www.youtube.com/watch?v=5NFn9paBR98

[R] [R-pkgs] Package glmnetUtils now on CRAN

2017-04-26 Thread Hong Ooi via R-packages
I'm pleased to announce that the glmnetUtils package is now available on CRAN. I wrote this after using the popular glmnet package to fit elastic net models for a few customer projects, and rewriting the same boilerplate code each time. glmnetUtils provides some quality-of-life improvements for

[R] Implementations of bootstrap aggregation

2017-04-26 Thread Alex Fun
I would like to do bootstrap aggregation of a model (currently fit with glm()) so that: 1) Data observations are replicated as N bootstrap samples. 2) The specified model is fit to each sample. 3) Error is calculated on out of bag samples. 4) Have an easy way of making model predictions. 5) + all

[R] Network Alternative to rJava/JRI?

2017-04-26 Thread Jake Stone
I am a java programmer, quite new to R. I am familiar with rJava/JRI, but would prefer a distributed networked architecture for my systems. TASK: - Java runs an NLP analysis of a text. It then sends an array (vector) of variables to R - R predicts the class of the input vector based on

[R] Hiring experts

2017-04-26 Thread Santiago Bueno
I need to hire an R software expert to help me with nls, nlme and surface prediction plots. Can I get suggestions? Best, Santiago Bueno [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see h

Re: [R] Counting enumerated items in each element of a character vector

2017-04-26 Thread Boris Steipe
What's the expected output for this sample? How do _you_ define what should be counted? > On Apr 26, 2017, at 8:33 AM, Dan Abner wrote: > > Hi all, > > I was not clearly enough in my example code. Please see below where "blah > blah blah" can be ANY text or numbers: No predictable pattern

Re: [R] Counting enumerated items in each element of a character vector

2017-04-26 Thread Dan Abner
Hi all, I was not clearly enough in my example code. Please see below where "blah blah blah" can be ANY text or numbers: No predictable pattern at all to what may or may not be written in place of "blah blah blah". text1<-c("blah blah blah. blah blah blah 1) blah blah blah 1 2) blah blah blah 10)

[R] Antwort: Re: Multiple-Response Analysis: Cleaning of Duplicate Codes (SOLVED)

2017-04-26 Thread G . Maubach
Hi Bert, many thanks for your reply. I appreciate your help a lot. I would like to do the operation (= finding the duplicates) row-wise. During this night a solution showed up in my dreams :) Instead of using duplicates() to flag and filter the values I could use unique instead with the same r

[R] Antwort: Re: Multiple-Response Analysis: Cleaning of Duplicate Codes (SOLVED)

2017-04-26 Thread G . Maubach
Hi Bert, many thanks for your reply. I appreciate your help a lot. I would like to do the operation (= finding the duplicates) row-wise. During this night a solution showed up in my dreams :) Instead of using duplicates() to flag and filter the values I could use unique instead with the same r