Re: [R] COVID-19 datasets...

2020-05-04 Thread PIKAL Petr
Another option is https://www.ecdc.europa.eu/en/publications-data/download-todays-data-geographic-distribution-covid-19-cases-worldwide Together with instruments from https://www.repidemicsconsortium.org/ Cheers Petr Here is some simple code library(EpiEstim) library(ggplot2) library(lubridat

Re: [R] if else statement

2020-05-04 Thread Richard O'Keefe
Your ifelse expression looks fine. What goes wrong with it? On Tue, 5 May 2020 at 05:16, Ana Marija wrote: > > Hello, > > I have a data frame like this: > > > head(b) >FID IID FLASER PLASER > 1: fam1000 G1000 1 1 > 2: fam1001 G1001 1 1 > 3: fam1003 G1003 1

Re: [R] Problems installing rgl (3D graphics package). Error messages "... not available, " "non-zero exit status" and so on

2020-05-04 Thread Duncan Murdoch
On 04/05/2020 7:46 p.m., Byron Dom via R-help wrote: I want to install the 3D graphics rgl. I'm running R version 3.2.3 on Windows version "10.0.18362 N/A Build 18362". That's a four year old version of R. You'll likely have to find packages of a similar age to be able to get it to work, or u

[R] Problems installing rgl (3D graphics package). Error messages "... not available, " "non-zero exit status" and so on

2020-05-04 Thread Byron Dom via R-help
I want to install the 3D graphics rgl.  I'm running R version 3.2.3 on Windows version "10.0.18362 N/A Build 18362". I've been using R for about 15 years but only as a casual user. I have installed two packages in the past, but the last was several years ago. When I issued the command "install.pac

Re: [R] COVID-19 datasets...

2020-05-04 Thread Abby Spurdle
I don't know if this is useful of not. But here's some dis-aggregated US data. It's about 10 days old, and I need to improve the dis-aggregation algorithm. -- age <- 0:80 rel.mort.rate <- c (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5.97119198173175e-14, 1.49

Re: [R] COVID-19 datasets...

2020-05-04 Thread Abby Spurdle
Yes, you're right. Note that stack exchange is 10x more likely to flag my post as off-topic, and I was looking for *interesting* applications of R. There's only so many times one can use Fisher's iris data... On Tue, May 5, 2020 at 8:42 AM Bert Gunter wrote: > > Suggestion: Please stay on topic

Re: [R] COVID-19 datasets...

2020-05-04 Thread Bert Gunter
Suggestion: Please stay on topic. This list is R-Help, not about scientific discussions or even what statistical procedures might be used for specific research questions. Perhaps https://stats.stackexchange.com/ for the latter. Bert Gunter "The trouble with having an open mind is that people k

Re: [R] why outer function is failing?

2020-05-04 Thread David Carlson
Re-reading your question it appears you want the number of permutations for each pair, e.g. the number of permutations of the numbers 1 - 3 taken 1 time, etc. If I am correct, this should get you want you want: ct <- outer(y, x, "^") ct [,1] [,2] [,3] [,4] [,5][,6] [1,]39 27

Re: [R] COVID-19 datasets...

2020-05-04 Thread Abby Spurdle
sorry, blood acidity probably wasn't the best choice of words __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html a

Re: [R] COVID-19 datasets...

2020-05-04 Thread Abby Spurdle
While we're on this topic... I was interested in testing hypotheses (plural) that acid base chemistry (blood H+/HCO3/PCO2) or closely-related metabolic processes could influence the rate of viral replication, possibly by having some sort of effect on the acidity of phagocytes, vesicles or other ce

Re: [R] why outer function is failing?

2020-05-04 Thread Jeff Newmiller
The outer function only calls FUN once with two vectors representing all combinations of the inputs. If rolldie is not vectorized then it will have trouble with this input. Why aren't you using sample? On May 4, 2020 11:51:03 AM PDT, Yousri Fanous wrote: >Hello > >From outer help page: >outer

Re: [R] why outer function is failing?

2020-05-04 Thread David Carlson
The FUN= argument must be a vectorized function (see the documentation, ?outer), but the function rolldie takes only scalar values as arguments: rolldie(x, y) Error in rep("X", times) : invalid 'times' argument In addition: Warning messages: 1: In 1:times : numerical expression has 6 elements: onl

Re: [R] COVID-19 datasets...

2020-05-04 Thread Bernard Comcast
Thanks, i will take a look Bernard Sent from my iPhone so please excuse the spelling!" > On May 4, 2020, at 2:49 PM, James Spottiswoode wrote: > > Sure. COVID-19 Data Repository by the Center for Systems Science and > Engineering (CSSE) at Johns Hopkins University is available here: > > http

[R] why outer function is failing?

2020-05-04 Thread Yousri Fanous
Hello >From outer help page: outer takes two vectors and a function (that itself takes two arguments) and builds a matrix

Re: [R] COVID-19 datasets...

2020-05-04 Thread Hasan Diwan
On Mon, 4 May 2020 at 11:32, Bernard McGarvey wrote: > Just curious does anyone know of a website that has data available in a > format that R can download and analyze? > https://hd1-units.herokuapp.com/covid has a days parameter one can adjust to go back in time and a suffix parameter to obtain

Re: [R] COVID-19 datasets...

2020-05-04 Thread Ben Tupper
This works very well https://github.com/covid19datahub/COVID19 Cheers, Ben On Mon, May 4, 2020 at 2:32 PM Bernard McGarvey < mcgarvey.bern...@comcast.net> wrote: > Just curious does anyone know of a website that has data available in a > format that R can download and analyze? > > Thanks > > > B

Re: [R] if else statement

2020-05-04 Thread Rui Barradas
Hello, Here is a way, using logical indices. b$pheno <- NA b$pheno[b$FLASER == 1 & b$PLASER == 1] <- 1 b$pheno[b$FLASER == 2 | b$PLASER == 2] <- 2 Hope this helps, Rui Barradas Às 18:15 de 04/05/20, Ana Marija escreveu: Hello, I have a data frame like this: head(b) FID IID FLA

[R] COVID-19 datasets...

2020-05-04 Thread Bernard McGarvey
Just curious does anyone know of a website that has data available in a format that R can download and analyze?   Thanks Bernard McGarvey Director, Fort Myers Beach Lions Foundation, Inc. Retired (Lilly Engineering Fellow). __ R-help@r-project.org

Re: [R] if else statement

2020-05-04 Thread Ana Marija
Thank you for the tip about table function, it seems correct: > table(b$FLASER, b$PLASER, exclude = NULL) 1 2 1836 6916 2 14 708 0 45 28 > table(b$pheno,exclude = NULL) 12 836 828 34 On Mon, May 4, 2020 at 12:45 PM Jeff Newmiller wrote: > T

Re: [R] if else statement

2020-05-04 Thread Jeff Newmiller
To expand on Patrick's response... You can use the expand.grid function to generate a test table containing all combinations. However, we would not be in a position to verify that the results you get when you apply your logic to the test table are what you want... you know the requirements much

Re: [R] if else statement

2020-05-04 Thread Patrick (Malone Quantitative)
"I tried this but I am not sure if this is correct:" Does it provide the expected result for all possible combinations of 1/2/NA for both variables? On Mon, May 4, 2020 at 1:16 PM Ana Marija wrote: > Hello, > > I have a data frame like this: > > > head(b) >FID IID FLASER PLASER > 1: f

[R] if else statement

2020-05-04 Thread Ana Marija
Hello, I have a data frame like this: > head(b) FID IID FLASER PLASER 1: fam1000 G1000 1 1 2: fam1001 G1001 1 1 3: fam1003 G1003 1 2 4: fam1005 G1005 1 1 5: fam1009 G1009 NA 2 6: fam1052 G1052 1 1 ... > unique(b$PLASER) [1] 1

Re: [R] stats:: spline's method could not be monoH.FC

2020-05-04 Thread Martin Maechler
> Martin Maechler > on Mon, 4 May 2020 16:25:02 +0200 writes: > Abby Spurdle > on Sun, 3 May 2020 16:15:17 +1200 writes: >>> and just today a colleague asked me about spline interpolation >>> with general 2nd derivative boundary conditions >>> s''(x_1) = s2_1

Re: [R] PCRE configure problem with R-4.0.0

2020-05-04 Thread Ista Zahn
On Mon, May 4, 2020 at 3:51 AM Ivan Krylov wrote: > > First of all, you mentioned Linux Mint, so you might get better advice > on R-SIG-Debian mailing list. > > On Mon, 4 May 2020 16:15:42 +1200 > Patrick Connolly wrote: > > >There are quite a lot of packages in the repository for Linux Mint > >1

Re: [R] stats:: spline's method could not be monoH.FC

2020-05-04 Thread Martin Maechler
> Abby Spurdle > on Sun, 3 May 2020 16:15:17 +1200 writes: >> and just today a colleague asked me about spline interpolation >> with general 2nd derivative boundary conditions >> s''(x_1) = s2_1, s''(x_n) = s2_2 actually I was wrong... I *read* it as the above, but what

Re: [R] 'closure' (was "stats:: spline's method could not be monoH.FC")

2020-05-04 Thread Martin Maechler
Just about this one some important term 'closure', hence I'm modifying the subject. Note we came here from my 2nd reason why I had added 'monoH.FC' feature only for splinefun() and not for spline() : - splinefun() is using's R feature of "(non-trivial) closure", i.e, it returns a *function*

Re: [R] PCRE configure problem with R-4.0.0

2020-05-04 Thread Ivan Krylov
First of all, you mentioned Linux Mint, so you might get better advice on R-SIG-Debian mailing list. On Mon, 4 May 2020 16:15:42 +1200 Patrick Connolly wrote: >There are quite a lot of packages in the repository for Linux Mint >17.2 with 'pcre' in the name and these are installed: >Apparantly t