Re: [R] error while loading ggplot2

2018-01-17 Thread Jeff Newmiller
Please post using plain text... the mailing list will strip HTML anyway and mess up what you send. Send the output of sessionInfo() so we know what versions of R and packages you have. -- Sent from my phone. Please excuse my brevity. On January 17, 2018 4:37:06 PM PST, shijin mathew via R-he

[R] error while loading ggplot2

2018-01-17 Thread shijin mathew via R-help
Getting the following error while loading ggplot2. > library(ggplot2) Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): object 'vI' not found Tried different version of R and ggplot2 but still doesnt work. Any help to reso

Re: [R] reading lisp file in R

2018-01-17 Thread Ranjan Maitra
Thanks! I guess one way to do it in R would be to read the lines and then do character parsing (string-matching and other operations) to save as a data frame and forget about the lines at the end perhaps? I am not sure how general such a scheme would be: that is also something I would like to sh

Re: [R] reading lisp file in R

2018-01-17 Thread Ranjan Maitra
Thanks! I am trying to use it in R. (Actually, I try to give my students experiences with different kinds of files and I was wondering if there were tools available for such kinds of files. I don't know Lisp so I do not actually know what the lines towards the bottom of the file mean.( Many tha

Re: [R] reading lisp file in R

2018-01-17 Thread Eric Berger
It seems the file contains records, with each record having 18 fields. I would use awk (standard unix tool), creating an awk script to process the file into a new file with one line for each record, each line with 18 fields, say comma-separated. The csv file can then be easily read into R via the f

Re: [R] reading lisp file in R

2018-01-17 Thread David Winsemius
> On Jan 17, 2018, at 8:22 PM, Ranjan Maitra wrote: > > Dear friends, > > Is there a way to read data files written in lisp into R? > > Here is the file: > https://archive.ics.uci.edu/ml/machine-learning-databases/university/university.data > > I would like to read it into R. Any suggestion

[R] reading lisp file in R

2018-01-17 Thread Ranjan Maitra
Dear friends, Is there a way to read data files written in lisp into R? Here is the file: https://archive.ics.uci.edu/ml/machine-learning-databases/university/university.data I would like to read it into R. Any suggestions? Thanks very much in advance for pointers on this and best wishes, Ra

Re: [R] Assessing calibration of Cox model with time-dependent coefficients

2018-01-17 Thread Bert Gunter
1. Please repost in **plain text** as html can get mangled, as here (see below), on this plain text list. 2. Generally, statistical issues are off topic here. stats.stackexchange.com is one place to post such questions. Having said that, the intersection of statistics and (on topic) R coding is of

[R] Assessing calibration of Cox model with time-dependent coefficients

2018-01-17 Thread Max Shell
I am trying to find methods for testing and visualizing calibration to Cox models with time-depended coefficients. I have read this nice article . In this paper, we can fit three models: fit0 <- coxph(Surv(futime, status) ~ x1 + x2 + x3, da

Re: [R] Help making first dataset R package

2018-01-17 Thread Thierry Onkelinx
Dear Martin, 1 and 2. src is intended for C, C++ or Fortan files, not for R files. See https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Non_002dR-scripts-in-packages. Either convert your script to a function and place it in the R folder or place the the script in inst/src. 3 and 4. No

Re: [R] Help making first dataset R package

2018-01-17 Thread Bert Gunter
I think this would fit better on the r-package-devel list. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Jan 17, 2018 at 7:53 AM, Martin M

[R] Help making first dataset R package

2018-01-17 Thread Martin Møller Skarbiniks Pedersen
Hi, I am trying to make my first R package containing only a single data.frame and documentation. All code can be found at: https://github.com/MartinMSPedersen/folkeafstemninger When I check the package I get four warnings. I will list all warnings in this email because they migth be connect

Re: [R] effects & lme4: error since original data frame notfoundWASeffects: error when original data frame is missing

2018-01-17 Thread Fox, John
Dear Gerrit, This issue is discussed in a vignette in the car package (both for functions in the car and effects packages): vignette("embedding", package="car") . The solution suggested there is the essentially the one that you used. I hope this helps, John - John

Re: [R] effects & lme4: error since original data frame notfoundWASeffects: error when original data frame is missing

2018-01-17 Thread Gerrit Eichner
Third "hi" in this regard and for the archives: I found a (maybe "dirty") workaround which at least does what I need by creating a copy of the required data frame in the .GlobalEnv by means of assign: foo <- function() { assign("X", sleepstudy, pos = 1) fm <- lmer(Reaction ~ Days + (Days | S

Re: [R] effects & lme4: error since original data frame not found WASeffects: error when original data frame is missing

2018-01-17 Thread Gerrit Eichner
Hi, again, I have to modify my query since my first (too simple) example doesn't reflect my actual problem. Second try: When asking Effect() inside a function to compute an effect of an lmer-fit which uses a data frame local to the body of the function, as in the following example (simplifying m

Re: [R] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Duncan Murdoch
On 17/01/2018 8:37 AM, Martin Møller Skarbiniks Pedersen wrote: On 17 January 2018 at 14:30, Eric Berger wrote: This is an error message from R. For example, if you give the following R commands a <- 5 a$foo This will generate the error message: Error in a$foo : $ operator is invalid for a

Re: [R] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Martin Møller Skarbiniks Pedersen
On 17 January 2018 at 14:30, Eric Berger wrote: > This is an error message from R. > For example, if you give the following R commands > > a <- 5 > > a$foo > This will generate the error message: > Error in a$foo : $ operator is invalid for atomic vectors > > So you can search for the string 'x$

Re: [R] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Ben Tupper
Hi, It's not really a roxygen thing but a subsetting thing. > x = c(foo = 7, tag = 8) > x$tag Error in x$tag : $ operator is invalid for atomic vectors For simple vectors you want ... > x['tag'] tag 8 ... or ... > x[['tag']] [1] 8 See more at > ?`$` Cheers, Ben > On Jan 17, 2018, at

Re: [R] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Eric Berger
This is an error message from R. For example, if you give the following R commands > a <- 5 > a$foo This will generate the error message: Error in a$foo : $ operator is invalid for atomic vectors So you can search for the string 'x$tag' in your code (or possibly in the package). HTH, Eric On W

[R] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Martin Møller Skarbiniks Pedersen
Hi, I am trying to create my first R package. I will later today put the files on Github. However I gets this error and I can't find any reason for it: R> roxygen2::roxygenise() First time using roxygen2. Upgrading automatically... Error in x$tag : $ operator is invalid for atomic vectors

[R] Split charts with ggplot2, tidyquant

2018-01-17 Thread Eric Berger
A very common chart in the financial markets is a split chart with two time series shown in two vertically stacked sub-charts. A classic case would be the top panel showing the time series of historical prices of some stock, and the bottom panel showing the volume traded per day immediately below i

[R] mgcv::gam is it possible to have a 'simple' product of 1-d smooths?

2018-01-17 Thread Mathew Guilfoyle
I am trying to test out several mgcv::gam models in a scalar-on-function regression analysis. The following is the 'hierarchy' of models I would like to test: (1) Y_i = a + integral[ X_i(t)*Beta(t) dt ] (2) Y_i = a + integral[ F{X_i(t)}*Beta(t) dt ] (3) Y_i = a + integral[ F{X_i(t),t} dt ]

[R] mgcv::gam is it possible to have a 'simple' product of 1-d smooths?

2018-01-17 Thread Mathew Guilfoyle
I am trying to test out several mgcv::gam models in a scalar-on-function regression analysis. The following is the 'hierarchy' of models I would like to test: (1) Y_i = a + integral[ X_i(t)*Beta(t) dt ] (2) Y_i = a + integral[ F{X_i(t)}*Beta(t) dt ] (3) Y_i = a + integral[ F{X_i(t),t} dt ]

[R] effects: error when original data frame is missing

2018-01-17 Thread Gerrit Eichner
Hello, everyody, when asking, e.g., Effect() to compute the effects of a fitted, e.g., linear model after having deleted the data frame from the workspace for which the model was obtained an error is reported: > myair <- airquality > fm <- lm(Ozone ~ Temp, data = myair) > rm(myair) > Effect("Tem

[R] Help

2018-01-17 Thread said chakouk via R-help
Hi I try « Iramuteq » and when I’ll like « methode reinert » I have this message Erreur R Loading required package: Matrix There were 50 or more warnings (use warnings() to see the first 50) There were 50 or more warnings (use warnings() to see the first 50) Error in Ntip + Nnode : non-numeric ar