Re: [R] spaghetti plot - urgent

2017-07-19 Thread Ulrik Stervbo
Hi Rosa, You pass a vector to ggplot, which expects a data.frame. I am sure you meant to do this: point7$y_point7 <- point7$beta0_7 + point7$beta1_7*point7$time + point7 $epsilon_7 ggplot(point7, aes(time, y_point7)) + geom_line() HTH Ulrik On Wed, 19 Jul 2017 at 20:37 Rosa Oliveira wrote:

Re: [R] STL - time series seasonal decomposition sensitive to data points?

2017-07-19 Thread Jeff Newmiller
I think this looks like a question about statistics. I suggest you review the documentation for the functions you are using and study the references to better understand the algorithms you are using. If you think the algorithms are not behaving according to theory and the packages are part of th

Re: [R] STL - time series seasonal decomposition sensitive to data points?

2017-07-19 Thread Ismail SEZEN
> On 19 Jul 2017, at 21:34, Eridk Poliruyt wrote: > > Hi all, > > I am trying to analyse a time series data and want to make > trend-season decomposition using STL approach in R. However I found > the decomposition result seems to be sensitive to data points even > with the robust option. > >

[R] spaghetti plot - urgent

2017-07-19 Thread Rosa Oliveira
Hi everyone, I’m trying to do a spaghetti plot and I know I’m doing all wrong, It must be. What I need: 15 subjects, each with measurements over 5 different times (t1, ..., t5), and the variable that I need to represent in the spaguetti plot is given by: PCR = b0 + b1 * ti + epsilon B0, - ba

[R] STL - time series seasonal decomposition sensitive to data points?

2017-07-19 Thread Eridk Poliruyt
Hi all, I am trying to analyse a time series data and want to make trend-season decomposition using STL approach in R. However I found the decomposition result seems to be sensitive to data points even with the robust option. More specifically, suppose I have a few years of monthly data. Using st

Re: [R] label sunflower point

2017-07-19 Thread Nada Gh
Thank you all! On Mon, Jul 17, 2017 at 4:46 PM, Michael Friendly wrote: > On 7/16/2017 9:36 AM, Nada Gh wrote: >> >> Hi, >> >> I create a plot using sunflowerplot, I need to highlight one point to show >> its importance. What suggestion you have to accomplish this? >> >> Thanks, > > > In general,

Re: [R] Creating/Reading a complex string in R

2017-07-19 Thread Duncan Murdoch
On 19/07/2017 11:41 AM, Jeff Newmiller wrote: I think the whole premise of this question is flawed. If you want to work with this string as data, then read it in from a separate file using readLines. If it is fixed data that you want to be part of your program, then invest the effort to escap

Re: [R] Creating/Reading a complex string in R

2017-07-19 Thread Jeff Newmiller
I think the whole premise of this question is flawed. If you want to work with this string as data, then read it in from a separate file using readLines. If it is fixed data that you want to be part of your program, then invest the effort to escape the odd characters and be done with it. But us

Re: [R] Creating/Reading a complex string in R

2017-07-19 Thread David Winsemius
> On Jul 19, 2017, at 5:38 AM, Michael Friendly wrote: > > It was suggested to quote your string with *backticks* (` ... `) rather than > single quotes. > > String <- ` > > ... > ` That failed for me. The parser considered it a language object, an R name. Here's what I needed to do:

Re: [R] Creating/Reading a complex string in R

2017-07-19 Thread Michael Friendly
It was suggested to quote your string with *backticks* (` ... `) rather than single quotes. String <- ` ... ` On 7/18/2017 1:05 PM, Christofer Bogaso wrote: Thanks for your pointer. Is there any way in R how to replace " ' " with " /' " programmatically? My actual string is quite

Re: [R] Problem in shiny writing a .txt file

2017-07-19 Thread Mathew Guilfoyle
Is res.path usually empty? If the res.path directory is empty (i.e. dir(res.path) is an empty vector) the file.remove operation will remove the directory. This behaviour is documented in the help for file.remove. When your subsequent function tries to write to that directory it does not exist

Re: [R] Problem in shiny writing a .txt file

2017-07-19 Thread Ulrik Stervbo
Hi Ana, The path is most likely wrong. How does f.texto() know the res.path? Do you manage to remove the old path and create a new one but f.texto() doesn't know? Not reasons for your problem, but curious: Why do you change the working directory? What is the intention behind appending dir(res.pa

Re: [R] Problem in shiny writing a .txt file

2017-07-19 Thread Rolf Turner
On 19/07/17 19:19, Ana Belén Marín wrote: Hi all! I'm developing a shiny app and I have problems when I wanna write a .txt file. " ... when I *want to* write ..." The language of this mailing list is *English*, not Valspeak. cheers, Rolf Turner -- Technical Editor ANZJS Department of S

[R] Problem in shiny writing a .txt file

2017-07-19 Thread Ana Belén Marín
Hi all! I'm developing a shiny app and I have problems when I wanna write a .txt file. First of all, I change the directory in order to work in a temporal one: wd <- tempdir() setwd( wd ) res.path <- paste0( wd, "/OUT/" ) dir.create( res.path ) Just before calling the function that fails, I