Re: [R] challenging data merging/joining problem

2020-07-05 Thread Rasmus Liland
On 2020-07-05 14:50 -0400, Christopher W. Ryan wrote: > I've been conducting relatively simple > COVID-19 surveillance for our jurisdiction. Dear Christopher, As I am a bit unfamiliar when it comes to the tidyverse, I wrote these lines using regular data.frames: ### Convert to

Re: [R] Opening Another Application in R Then Hangs

2020-07-05 Thread Jeff Newmiller
Exit the application you started? On July 5, 2020 3:06:52 PM PDT, "Sparks, John" wrote: >Hi R Helpers, > >I am trying to open another application from within R and then work >with it. > >I can get the application to open, but R then hangs at that point >(spinning blue circle in the middle of the

Re: [R] Opening Another Application in R Then Hangs

2020-07-05 Thread Sparks, John
Hi Jeff, Greatly appreciate your reply, but I don't quite understand it. Perhaps I should give a little more detail. For this example, I want to open notepad, then go to notepad and type something in. So the program library(KeyboardSimulator)

Re: [R] Opening Another Application in R Then Hangs

2020-07-05 Thread David Winsemius
This list is not the recommended location for support of that Windows only package. The URL in the DESCRIPTION file has this to advise: ++ This package doesn't work on my computer! How can I make it work? Open aGitHub

Re: [R] Opening Another Application in R Then Hangs

2020-07-05 Thread Rasmus Liland
On 2020-07-05 22:16 +, Sparks, John wrote: > > For this example, I want to open notepad, > then go to notepad and type something in. Dear John, Perhaps start Notepad in the background is what you mean? Something like system2("START /B Notepad", invisible=FALSE) Found it at

Re: [R] [External] challenging data merging/joining problem

2020-07-05 Thread Richard M. Heiberger
Have you talked directly to the designers of the new database? One would hope that they had a clear migration path in mind. Perhaps they just didn't document it to your satisfaction. Rich On Sun, Jul 5, 2020 at 2:51 PM Christopher W. Ryan wrote: > > I've been conducting relatively simple

Re: [R] Opening Another Application in R Then Hangs

2020-07-05 Thread Sparks, John
For posterity, Abby's suggestion is spot on. The small program below demonstrates the functionality. May need to change numbers in mouse.move depending on where your copy of Notepad opens up. You can find the position of your mouse on the screen using mouse.get_cursor() Thanks to all, but

Re: [R] challenging data merging/joining problem

2020-07-05 Thread Bert Gunter
*Just my opinion* : --> feel free to disregard I would suggest that you stop thinking in terms of tidyverse functionality and instead think of what kind of data structure you need for your ongoing work and where you will source data to populate that structure both now -- including legacy data --

[R] Opening Another Application in R Then Hangs

2020-07-05 Thread Sparks, John
Hi R Helpers, I am trying to open another application from within R and then work with it. I can get the application to open, but R then hangs at that point (spinning blue circle in the middle of the screen) and my subsequent programming does not execute. Does anybody know how to get R to

Re: [R] Opening Another Application in R Then Hangs

2020-07-05 Thread Jeff Newmiller
If you open an app using the default settings for system2, R normally expects to let you know what the program's return value was, so if it was interactive you would need to terminate the program so there would be a result for system2 to return with. For what you actually appear to be doing you

Re: [R] Opening Another Application in R Then Hangs

2020-07-05 Thread Abby Spurdle
shell ("Notepad", wait=FALSE) On Mon, Jul 6, 2020 at 10:07 AM Sparks, John wrote: > > Hi R Helpers, > > I am trying to open another application from within R and then work with it. > > I can get the application to open, but R then hangs at that point (spinning > blue circle in the middle of the

Re: [R] Can I pass the grouped portions of a dataframe/tibble to a function in dplyr

2020-07-05 Thread Chris Evans
Ouch. I should have know all those points Rui: my bad. Casual behaviour while just rushing up a little example. Good to be reminded. group_modify() is clearly exactly what I wanted and I will experiment with it and make sure I understand it properly. I see from the help that it evolves

[R] Can I pass the grouped portions of a dataframe/tibble to a function in dplyr

2020-07-05 Thread Chris Evans
Apologies if this is a stupid question but searching keeps getting things I know and don't need. What I want to do is to use the group-by() power of dplyr to run functions that expect a dataframe/tibble per group but I can't see how do it. Here is a reproducible example. ### create trivial

Re: [R] Can I pass the grouped portions of a dataframe/tibble to a function in dplyr

2020-07-05 Thread Rui Barradas
Hello, You can pass a grouped tibble to a function with grouped_modify but the function must return a data.frame (or similar). ## this will also do it #sillyFun <- function(tib){ # tibble(nrow = nrow(tib), ncol = ncol(tib)) #} sillyFun <- function(tib){ data.frame(nrow = nrow(tib), ncol

[R] challenging data merging/joining problem

2020-07-05 Thread Christopher W. Ryan
I've been conducting relatively simple COVID-19 surveillance for our jurisdiction. We get data on lab test results automatically, and then interview patients to obtain other information, like clinical details. We had been recording all data in our long-time data system (call it dataSystemA). But

Re: [R] Can I pass the grouped portions of a dataframe/tibble to a function in dplyr

2020-07-05 Thread Rui Barradas
Hello, I forgot to say I redid the data set setting the RNG seed first. set.seed(2020) n <- 50 x <- 1:n y <- sample(1:3, n, replace = TRUE) z <- rnorm(n) tib <- tibble(x,y,z) Also, don't do as_tibble(cbind(...)) as.data.frame(cbind(...)) If one of the variables is of a different class