[R] Antwort: Re: packrat: Failed to download current version of foreign(0.8-67)

2017-02-20 Thread G . Maubach
Hi Mr. Ligges, doing as you said R responds with install.packages("foreign") trying URL 'https://cran.uni-muenster.de/bin/windows/contrib/3.3/foreign_0.8-67.zip' Warning in install.packages : cannot open URL 'https://cran.uni-muenster.de/bin/windows/contrib/3.3/foreign_0.8-67.zip': HTTP

Re: [R] Confused about using data.table package,

2017-02-20 Thread C W
Thanks Hadley! While I got your attention, what is a good way to get started on ggplot2? ;) My impression is that I first need to learn plyr, dplyr, AND THEN ggplot2. That's A LOT! Suppose i have this: iris iris2 <- cbind(iris, grade = sample(1:5, 150, replace = TRUE)) iris2 I want to have

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread stephen sefick
Hello All, I am writing a package. I would like to encourage the user to look at the data to rectify errors with function A before utilizing function B to code these data as binary. I thought about solving this problem by adding a "flag" in the attributes that could be used downstream in B, and

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread Charles C. Berry
On Mon, 20 Feb 2017, stephen sefick wrote: Hello, I would like to add something to a data frame that is 1) invisible to the user, 2) has no side effects, and 3) I can test for in a following function. Is this possible? I am exploring classes and attributes and I have thought about using a list

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread stephen sefick
Just as clarification, I don't want to hide anything from the user. I just want to add something that I can test for in downstream function. I appreciate all of the help. kindest regards, Stephen On Mon, Feb 20, 2017 at 5:53 PM, Bert Gunter wrote: > Yes. > > To

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread stephen sefick
Yes, I mean "won't annoy the user", will allow them to do anything they need to do with a dataframe (write to csv, etc.), but will allow me to test for in a down stream function of the analysis to stop the function and present an error. Adding something to the class attribute seems like the right

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread Bert Gunter
Yes. To elaborate a bit on Ista's reply: A) The only way I can imagine hiding info from a user would be to encrypt it. This could be done programmatically I think, but I would have to research it to figure out how. B) If all you want to do is prevent the info from being printed, just create

Re: [R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread Ista Zahn
It depends on what you mean by 1). If you mean "won't annoy the user" then yes, e.g., add something to the class attribute. If 1) means "can't be discovered by the user" then no (at least not easily). Anything you can see they can see. Best, Ista On Feb 20, 2017 4:21 PM, "stephen sefick"

Re: [R] help with grep list files

2017-02-20 Thread David Wolfskill
On Mon, Feb 20, 2017 at 03:41:50PM -0600, Glenn Schultz wrote: > All, > > I have the following files in a directory and I would like only a list of > those starting with “lld" and ending with “dat”. I used the following and it > gives me the lld files > > list.files(path = readpath, pattern

Re: [R] [FORGED] help with grep list files

2017-02-20 Thread Rolf Turner
On 21/02/17 10:41, Glenn Schultz wrote: All, I have the following files in a directory and I would like only a list of those starting with “lld" and ending with “dat”. I used the following and it gives me the lld files list.files(path = readpath, pattern = "^lld[A-Z0-9]") to get just .dat

Re: [R] help with grep list files

2017-02-20 Thread Rui Barradas
Hello, Maybe if you change the pattern to "^lld[A-Z0-9]*\\.dat$" Hope this helps, Rui Barradas Em 20-02-2017 21:41, Glenn Schultz escreveu: All, I have the following files in a directory and I would like only a list of those starting with “lld" and ending with “dat”. I used the following

[R] help with grep list files

2017-02-20 Thread Glenn Schultz
All, I have the following files in a directory and I would like only a list of those starting with “lld" and ending with “dat”. I used the following and it gives me the lld files list.files(path = readpath, pattern = "^lld[A-Z0-9]") to get just .dat files I tried list.files(path =

Re: [R] use table function with data frame subsets

2017-02-20 Thread David L Carlson
The default for read.csv() is stringsAsFactors=TRUE when creating a data frame so all the character strings in your .csv file were converted to factors: > testtable <- read.csv("clipboard", header=F) > str(testtable) 'data.frame': 6 obs. of 5 variables: $ V1: int 20170101 20170101 20170101

[R] Make sure a data frame has been "fun through" a function

2017-02-20 Thread stephen sefick
Hello, I would like to add something to a data frame that is 1) invisible to the user, 2) has no side effects, and 3) I can test for in a following function. Is this possible? I am exploring classes and attributes and I have thought about using a list (but 1 and 2 not satisfied). Any help would

[R] use table function with data frame subsets

2017-02-20 Thread message
Readers, Data set: 20170101,10020,A,b,Y 20170101,10020,B,b,N 20170101,10020,C,d,Y 20170102,20001,C,d,Y 20170102,20001,D,m,Y 20170102,20001,L,a,Y testtable<-read.csv('~/tmp/data.csv',header=F) testtablea<-testtable[grep('^10',testtable[,2]),] testtable V1V2 V3 V4 V5 1 20170101

Re: [R] optimisation of the system of differential equations

2017-02-20 Thread Jim Lemon
Hi Malgorzata, There is currently another thread on the list about attaching R code to emails. The problem appears to be that if you attach a file with the extension ".R" it is sent in a way that is blocked by the mail server. If you want to attach an R code file to your message, change the

Re: [R] packrat: Failed to download current version of foreign(0.8-67)

2017-02-20 Thread Uwe Ligges
foreign is a recommended package that is already part of your R installation. and there shoudl not be a problem to install a recent version of it. What is the error message of you run install.packages("foreign") from a new R session? Best, Uwe Ligges On 20.02.2017 17:33,

Re: [R] R scripts attached to e-mails - correct MIME type ?!

2017-02-20 Thread peter dalgaard
Not by the mail server as such, no, at least not for that reason. However, T-bird likely sends .txt as text/plain and .R as application/octet-stream (or so) and _therefore_ the server eliminates the latter and lets the former pass. -pd > On 20 Feb 2017, at 15:45 , Rui Barradas

[R] JRI: obtain error messages from the R engine

2017-02-20 Thread Luí­s Moreira de Sousa via R-help
Dear all, I am using JRI to execute a number of computations using the R engine. As pointed in various tutorials out there in the web I am using the eval method of the Rengine class, e.g.: engine.eval("meanVal=mean(rVector)"); At some point the eval method starts returning NULL, which

[R] Linkage Disequilibrium for RADseq data with R

2017-02-20 Thread Giulia Valvassori
Dear all, I would like to perform a Linkage Disequilibrium analysis on RADseq matrix. Can anyone suggest me which R package and function should i use and which kind of input file i should prepare? Thank you in advance for your help and time. Giulia [[alternative HTML version deleted]]

[R] [R-pkgs] CRAN updates: rpg and odeintr

2017-02-20 Thread Tim Keitt
rpg is a package for working with postgresql: https://github.com/thk686/rpg odeintr is a package for integrating differential equations: https://github.com/thk686/odeintr Cheers, THK http://www.keittlab.org/ [[alternative HTML version deleted]]

Re: [R] weighted sum of independent chi square random variables

2017-02-20 Thread Bert Gunter
The quantile function is just the inverse of the distribution function, so if you have the latter you can always get the former, e.g by simple interpolation using approx(). Assuming you can't find it already written for you of course. Bert On Feb 20, 2017 7:15 AM, "li li"

[R] weighted sum of independent chi square random variables

2017-02-20 Thread li li
Hi all, Is there a function in R that can calculate the quantiles or percentiles for the weighted sum of independent chi square random variables. I found a few functions for calculating probability distribution function for such random variables (e.g. pchisqsum..), but can not find any function

Re: [R] Confused about using data.table package,

2017-02-20 Thread David Winsemius
> On Feb 20, 2017, at 8:12 AM, Hadley Wickham wrote: > > On Sun, Feb 19, 2017 at 3:01 PM, David Winsemius > wrote: >> >>> On Feb 19, 2017, at 11:37 AM, C W wrote: >>> >>> Hi R, >>> >>> I am a little confused by the data.table

[R] Antwort: Re: RStudio: Place for Storing Options

2017-02-20 Thread G . Maubach
Hi Martin, Hi Ulrik, I am still working on the answer. I got a message from RStudio team but I am still working on the clearification of the answer and a possible solution. Kind regards Georg Von:Martin Maechler An: , Kopie:

[R] packrat: Failed to download current version of foreign(0.8-67)

2017-02-20 Thread G . Maubach
Hi All, I tried to use packrat on R version 3.3.2 (2016-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=German_Germany.1252 [2] LC_CTYPE=German_Germany.1252 [3] LC_MONETARY=German_Germany.1252 [4] LC_NUMERIC=C

Re: [R] Confused about using data.table package,

2017-02-20 Thread Hadley Wickham
On Sun, Feb 19, 2017 at 3:01 PM, David Winsemius wrote: > >> On Feb 19, 2017, at 11:37 AM, C W wrote: >> >> Hi R, >> >> I am a little confused by the data.table package. >> >> library(data.table) >> >> df <- data.frame(w=rnorm(20, -10, 1), x= rnorm(20,

Re: [R] Is a list an atomic object? (or is there an issue with the help page of ?tapply ?)

2017-02-20 Thread Hadley Wickham
On Mon, Feb 20, 2017 at 7:31 AM, Martin Maechler wrote: >> Hervé Pagès >> on Tue, 14 Feb 2017 17:10:05 -0800 writes: > > > Hi, tapply() will work on any object 'X' that has a length > > and supports single-bracket subsetting.

Re: [R] optimisation of the system of differential equations

2017-02-20 Thread Jeff Newmiller
Go back and read the Posting Guide. 1) Missing code. Only certain types of attachments get through, and the recommendation is to include everything in the body of the email. Whatever you did, it did not get through to us. 2) Please make it clear what results you obtained and what results you

[R] optimisation of the system of differential equations

2017-02-20 Thread Malgorzata Wieteska via R-help
I try to do optimisation of the system of the differential equations. I've managed to make my exemplary code working, however after changing equations on the exact model and data on the real one, I get an error messages and code doesn't work. I have a partial data for L (concentrations were

Re: [R-es] Sobre gráficos

2017-02-20 Thread Freddy Omar López Quintero
2017-02-20 11:10 GMT-03:00 hibiki : > desgraciadamente no me abre, da un error, es que aki hay muchas > restricciones absurdas que impiden el acceso incluso a sitios inofensivos > pero bueno eso no viene al caso, ya tengo el link y en cuanto encuentre la > via lo reviso ​

[R] [R-pkgs] Announcing mfe 0.1.0

2017-02-20 Thread Luís Paulo F . Garcia
Dear R users, I am pleased to announce that the package mfe (Meta-Feature Extractor) is now available on CRAN (https://cran.r-project.org/package=mfe). The mfe package extracts meta-features from datasets to support the design of recommendation systems based on Meta-Learning. The meta-features,

Re: [R] R scripts attached to e-mails - correct MIME type ?!

2017-02-20 Thread Rui Barradas
Hello, I use Mozilla Thunderbird and I don't see a way of teaching it about the mime type. My understanding is that files with the .R extension are eliminated by the r-help mail server, but .txt pass. Is this correct? Rui Barradas Em 20-02-2017 14:15, Martin Maechler escreveu: Rui Barradas

[R] R scripts attached to e-mails - correct MIME type ?!

2017-02-20 Thread Martin Maechler
> Rui Barradas > on Sat, 18 Feb 2017 13:47:02 + writes: > Helo, No attachment came through. Change the file > extension from .R to .txt and resend, there aren't many > types of files r-help accepts. > Rui Barradas As a matter of fact, one

Re: [R-es] Sobre gráficos

2017-02-20 Thread hibiki
Muchas gracias a los 2, voy a revisar lo que que enviaron pero estoy seguro que me servira, con respecto al sitio de uno de tus tutoriales preferidos paco, desgraciadamente no me abre, da un error, es que aki hay muchas restricciones absurdas que impiden el acceso incluso a sitios inofensivos

Re: [R] Is a list an atomic object? (or is there an issue with the help page of ?tapply ?)

2017-02-20 Thread Martin Maechler
> Hervé Pagès > on Tue, 14 Feb 2017 17:10:05 -0800 writes: > Hi, tapply() will work on any object 'X' that has a length > and supports single-bracket subsetting. These objects are > sometimes called "vector-like" objects. Atomic vectors, > lists,

Re: [ESS] FW: Help in compiling ESS

2017-02-20 Thread Martin Maechler
> Sparapani, Rodney > on Wed, 15 Feb 2017 16:59:44 + writes: > Hi Paola: > That is correct. You can’t get around a missing feature > by just not compiling ;o) yes, indeed. {and the other advice, "do not compile it", is actually not such a

[R] vars package - irf() does not work

2017-02-20 Thread T.Riedle
Dear all, I want to run an impulse response analysis using the vars() package. The code looks as follwows. # list of class varest varest.USA<-VAR(VAR_analsis_DataUSA, lag.max = 24, ic = "SC", type = "both") varest.USA summary(varest.USA) #Run irf analysis irf.USAg<-irf(varest.USA,