[R] Root Dir for OpenCpu files

2017-04-27 Thread Jake Stone
I have opencpu (single server) up and functioning. My first function will open a dataset from a csv file stored on my hard drive. Where should I deploy the csv file? (I tried my apps www directory, but it doesn't work) In sum: within an opencpu app, where do I deploy a file so that this line of c

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

2017-04-27 Thread Jeff Newmiller
gg$timestamps <- as.POSIXct(as.character( gg$timestamps ) ) Factors are integers with the appearance of character data, so you are converting the integers to POSIXct. I usually try to avoid letting R automatically convert character data to factors, e.g. using stringsAsFactors=FALSE in read.csv

Re: [R] Error with installed.packages with R 3.4.0 on Windows

2017-04-27 Thread Thierry Onkelinx
We have several computers with the same problem. Op 28 apr. 2017 7:25 a.m. schreef "Jean-Claude Arbaut" : Hello, I am currently getting a strange error when I call installed.packages(): Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) && : missing value where TRUE/FALSE n

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

2017-04-27 Thread Dhivya Narayanasamy
Hi Jim, Thank you for the reply. 'gg.ts' is actually the object name of the time series I am using here. Also I have changed my timestamp class from factor to POSIXct (gg$timestamps <- as.POSIXct(gg$timestamps, format = "%Y-%m-%d %H-%M-%S") . When i plot this time series on graph, the x axis sca

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

2017-04-27 Thread SeshanV
Since my coding philosophy is "why compute something that is not needed" I don't have timing data comparing coxph.fit to the stripped down version. I will try to come up with a test suite. I do work under Linux (the initial Windows output was because I had both 3.3.1 and 3.4.0 on that machine).

[R] Error with installed.packages with R 3.4.0 on Windows

2017-04-27 Thread Jean-Claude Arbaut
Hello, I am currently getting a strange error when I call installed.packages(): Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) && : missing value where TRUE/FALSE needed Calls: installed.packages I am working with R 3.4.0 on Windows. I didn't get this error with R 3.3.3

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

2017-04-27 Thread SeshanV
Thank you Drs. Therneau and Murdoch. "Why not use coxph.fit?" -- My use case scenario is that I needed the Cox model coefficients for resampled data. I was trying to reduce the computational overhead of coxph.fit (since it will repeated a large number of times) by stripping all the parts that I

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

2017-04-27 Thread Jim Lemon
Hi Dhivya, I'm not that familiar with the "gg.ts" function, but you are passing character values to the "frequency" and "start" arguments. If there is no automatic conversion to numeric values, that would cause the error. Similarly, your "timestamps" variable may have been read in as a factor, whic

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

2017-04-27 Thread Duncan Murdoch
On 27/04/2017 10:53 AM, sesh...@mskcc.org wrote: Thank you Drs. Therneau and Murdoch. "Why not use coxph.fit?" -- My use case scenario is that I needed the Cox model coefficients for resampled data. I was trying to reduce the computational overhead of coxph.fit (since it will repeated a large

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

2017-04-27 Thread Therneau, Terry M., Ph.D.
On 04/27/2017 09:53 AM, sesh...@mskcc.org wrote: Thank you Drs. Therneau and Murdoch. "Why not use coxph.fit?" -- My use case scenario is that I needed the Cox model coefficients for resampled data. I was trying to reduce the computational overhead of coxph.fit (since it will repeated a larg

Re: [R] Reading XML attriutes in R

2017-04-27 Thread Ben Tupper
Hi, There might be an easy solution out there already, but I suspect that you will need to parse the XML yourself. The example below uses package xml2 not XML but you could do this with either. The example simply shows how to get values out of the XML hierarchy. Once you have the attributes

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

2017-04-27 Thread Therneau, Terry M., Ph.D.
Let me summarize rather than repeat the entire thread: An error report from a user (seshan) stumped me, and I asked for help here. Duncan Murdoch picked up on fine details of the error message, i.e., that the error did NOT come from within the survival package. That changes the whole tenor of

Re: [R] missing and replace

2017-04-27 Thread Fraser D. Neiman
Dear All, Replacing missing values with means is generally not a good idea: "Perhaps the easiest way to impute is to replace each missing value with the mean of the observed values for that variable. Unfortunately, this strategy can severely distort the distribution for this variable, leading t

[R] Reading XML attriutes in R

2017-04-27 Thread Archit Soni
Hi All, I have a XML file like : GB I want to create a data frame out of this XML but obviously xmlToDataFrame() is not working. It has dynamic attributes like for node precipitation , it could have attributes like value and mode both if there is ppt in some city. My basic is