[R] seq() problem with chron

2018-09-05 Thread Waichler, Scott R
Hi, I encountered the problem below where the last value in the chron vector created with seq() should have a time of 15:30, but instead has 15:15. What causes this and how can I make sure that the last value in the chron vector is the same as the "to" value in seq()? library(chron) dt1 <- c

[R] A small thing that amused my small mind

2018-09-05 Thread Bert Gunter
A few days ago, someone asked how to truncate arbitrary numerics to 1 digit towards 0. e.g. -189 should become -100 and 254 should become 200; and all values in magniude < 1 should become 0. I proposed a somewhat clumsy solution using floor() and ceiling(), but in fooling with it a bit more, I rea

Re: [R] Marginal effects with plm

2018-09-05 Thread Fox, John
Dear Milu, Depending upon what you mean by "marginal effects," you might try the effects package. For example, for your model, try (Ef.hd <- Effect(c("heat", "debt_dummy"), plm1)) plot(Ef.hd) A couple of comments about the model: I'd prefer to specify the formula as log(y) ~ p

[R] Marginal effects with plm

2018-09-05 Thread Miluji Sb
Dear all, I am running the following panel regression; plm1 <- plm(formula = log(y) ~ x1 + I(x1^2) + heat*debt_dummy + tt, data = df, index=c("region","year")) where 'df' is a pdata.frame. I would like to obtain marginal effects of 'y' for the variable 'x1'. I have tried the packages 'prediction

[R] Revolutions blog: August 2018 roundup

2018-09-05 Thread David Smith (CDA) via R-help
Since 2008, Microsoft staff and guests have written about R at the Revolutions blog (http://blog.revolutionanalytics.com) and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R f

Re: [R] Casting Date to char

2018-09-05 Thread Rich Shepard
On Wed, 5 Sep 2018, Ben Tupper wrote: Perhaps you wanted to convert dp$rainfall.sampdate and not dp$sampdate like this... dp$sampdate <- as.character(dp$rainfall.sampdate) ... or even better, take charge of the conversion with format() ... dp$sampdate <- format(dp$rainfall.sampdate, format =

Re: [R] Casting Date to char

2018-09-05 Thread Rich Shepard
On Wed, 5 Sep 2018, Duncan Murdoch wrote: This might just be a typo in your message, but as.character() is the function you want, not as.Character(). Duncan, Yes, it is a typo. The other typo or error above is that you are trying to convert dp$sampdate, but the dataframe has no column wit

Re: [R] Casting Date to char

2018-09-05 Thread Ben Tupper
Hi, Perhaps you wanted to convert dp$rainfall.sampdate and not dp$sampdate like this... dp$sampdate <- as.character(dp$rainfall.sampdate) ... or even better, take charge of the conversion with format() ... dp$sampdate <- format(dp$rainfall.sampdate, format = '%Y-%m-%d') Cheers, Ben > On Sep

Re: [R] Casting Date to char

2018-09-05 Thread Rich Shepard
On Wed, 5 Sep 2018, Rich Shepard wrote: dp$sampdate <- as.Character(dp$sampdate) This from a failed attempt: as.Character not found. The reported error was generated by using as.character. Rich __ R-help@r-project.org mailing list -- To UNSUBSCRI

Re: [R] Casting Date to char

2018-09-05 Thread Duncan Murdoch
On 05/09/2018 4:17 PM, Rich Shepard wrote: I've read the help for as.Date: "Date Conversion Functions to and from Character" but the method as.character(x ...) isn't working for me: str(dp) 'data.frame': 113569 obs. of 2 variables: $ rainfall.sampdate: Date, format: "2005-01-01" "200

[R] Casting Date to char

2018-09-05 Thread Rich Shepard
I've read the help for as.Date: "Date Conversion Functions to and from Character" but the method as.character(x ...) isn't working for me: str(dp) 'data.frame': 113569 obs. of 2 variables: $ rainfall.sampdate: Date, format: "2005-01-01" "2005-01-02" ... $ rainfall.prcp: num 0.59 0.0

Re: [R] Display time of PDF plots

2018-09-05 Thread MacQueen, Don via R-help
(this is somewhat a change of subject from the original question) Rich, there functions such as aggregate() in base R. There are also many options in CRAN packages. But I tend to have difficulty getting them to do exactly what I want, and usually end up rolling my own. The idea is to split the

Re: [R] Convention de stage

2018-09-05 Thread ruipbarradas
Bonjour, Vous êtes en erreur, cette liste est la liste R-Help pour aider ceux qui ont des doutes sur le langage de programmation R, un langage pour statistique, analyse de donnés et graphiques scientifiques. Cordialement, Rui Barradas Enviado a partir do meu smartphone Samsung Galaxy. M

[R] Convention de stage

2018-09-05 Thread Jouanin Celine via R-help
Bonjour, Suite à votre appel la semaine dernière, je reviens vers vous concernant ma convention de stage et mon entrée à Open le 10 septembre. Avez vous eu des retours pour la signature de celle ci ? Je peux passer demain ou vendredi la chercher afin de la transmettre à mon organisme de formation

Re: [R] Help with r script

2018-09-05 Thread ruipbarradas
Hello, 25*30 This is the most basic possible, please google an intro text and run its examples. Hope this helps, Rui Barradas  Enviado a partir do meu smartphone Samsung Galaxy. Mensagem original De: Nathan D Jennings Data: 05/09/2018 00:30 (GMT+00:00) Para: r-help@r-projec