Re: [R] Replace double slashes with single backslash

2020-12-28 Thread Anbu A
Thank you, Jim. That clarifies. I am trying to pass this path in a loop and read the files associated with the path. Yes the length is 26 where double quotes are counted as single quotes. Let me try to read the files using the collected path. Really appreciate it. Thanks, Anbu On Mon, Dec 28,

Re: [R] Error: Discrete value supplied to continuous variable

2020-12-28 Thread jim holtman
You setup your X & Y axis incorrectly. in your call to ggplot you have: g <-df %>% ggplot(aes(x=reorder(job,-span), y=span, fill=factor(job))) + but in your call to geom_rect you are using a completely different set of variables that is causing the error: geom_rect(aes(xmin = ID - w/2,

[R] Error: Discrete value supplied to continuous variable

2020-12-28 Thread King, Barry
I am attempting to convert an original schedule to longest operating time next schedule then create waterfall plot. I am having trouble with the plot. I get an Error: Discrete vale supplied to continuous variable message. My example code appears below. library(tidyverse) library(ggplot2) #

Re: [R] Replace double slashes with single backslash

2020-12-28 Thread jim holtman
Why do you want to replace '\\' with '\' in the file names? They are actually single '\' in the character string, but are printing out as '\\'. see example below: > x <- 'a\\b' > x [1] "a\\b" > nchar(x) [1] 3 Jim Holtman *Data Munger Guru* *What is the problem that you are

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Dirk Eddelbuettel via ESS-help
Hi Stephen, On 28 December 2020 at 16:23, Stephen Bond wrote: | I have been struggling with trying to follow the steps in | https://r-pkgs.org/ and the best thing would be to have a similar | online book showing the steps with ESS. the Hadley book is chained to | RStudio and they assume

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Stephen Bond via ESS-help
Hi Dirk, I have been struggling with trying to follow the steps in https://r-pkgs.org/ and the best thing would be to have a similar online book showing the steps with ESS. the Hadley book is chained to RStudio and they assume everybody uses RStudio, so many examples do not work as expected when

Re: [R] Replace double slashes with single backslash

2020-12-28 Thread Bert Gunter
"\" is an escape in R. See ?Quotes for details. 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 Mon, Dec 28, 2020 at 12:56 PM Anbu A wrote: > Hi All, > I am

[R] Replace double slashes with single backslash

2020-12-28 Thread Anbu A
Hi All, I am able to replace "r" with "x" for the word "Users" just for a test run. *Code: newlist %>% mutate(.,new_col=str_replace(fpath,"r","x")) *- this works fine But when I try to replace "\\" with "\". *newlist %>% mutate(.,new_col=str_replace(fpath,"\\","\")) *, I get a prompt ">" to

Re: [R] Passing variable name

2020-12-28 Thread Avi Gross via R-help
There are endless ways to do what you want, Seyit. If you wish to remain in base R, using the names function on the left-hand side changes the names as in: names(something) <- c("new", "names") And in general, you may want to learn how to use an alternate set of methods that work well with

Re: [R] Passing variable name

2020-12-28 Thread Rui Barradas
Hello, In my previous post I had meant something like the following. The two important parts are the use of `[[` in table() and the use of get() in the ggplot call. MyData<-data.frame("Gender" = c("F", "F", "F", "F", "M", "M", "M", "M", "M", "M", "F", "F"), "Hand" =

Re: [R] Passing variable name

2020-12-28 Thread Seyit Ali KAYIS
Hi Bert, Thanks a lot for informing me regarding the html format of my email. I also would like to thank to Erdogan CEVHER and Jim LEMON for their kind reply/suggestions. Yes I am aware of names function in R which is not the one I am looking for in here. Let me try to explain in

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Liz Hare via ESS-help
This is a great idea! I am working on transitioning to using ESS with R scripts to Rmd, and I could definitely use tips! Liz > On Dec 28, 2020, at 9:08 AM, Dirk Eddelbuettel via ESS-help > wrote: > > > A few weeks ago a few of riffed about all the "known unknown" in using ESS > and that

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Dirk Eddelbuettel via ESS-help
On 28 December 2020 at 18:48, Greg Minshall wrote: | i'm a fan. thanks. someone already added ESS and orgmode to the | collwhatever site. i'd mostly be extracting information, as i'm not an | expert (but might be able to chip in during a discussion). | | i'd prefer an e-mail list or

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Greg Minshall via ESS-help
Dirk, i'm a fan. thanks. someone already added ESS and orgmode to the collwhatever site. i'd mostly be extracting information, as i'm not an expert (but might be able to chip in during a discussion). i'd prefer an e-mail list or something else that doesn't require real-time observing (i've

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Dirk Eddelbuettel via ESS-help
On 28 December 2020 at 10:05, Tyler Smith via ESS-help wrote: | I could reframe my talk as "an overview of Blogdown" to more clearly articulate a single goal. Sorry to be stickler but to keep this focused I would still say no. _Blogdown per se_ has no relationship with ESS. And I say that as

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Tyler Smith via ESS-help
I understand your skepticism! I could reframe my talk as "an overview of Blogdown" to more clearly articulate a single goal. Best, Tyler -- plantarum.ca On Mon, Dec 28, 2020, at 9:51 AM, Dirk Eddelbuettel via ESS-help wrote: > > On 28 December 2020 at 14:26, Sparapani, Rodney via ESS-help

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Dirk Eddelbuettel via ESS-help
On 28 December 2020 at 14:26, Sparapani, Rodney via ESS-help wrote: | All great ideas. How about ESS and Roxygen? Good one, added! On 28 December 2020 at 09:40, Tyler Smith wrote: | I'd be happy to demo blogging with Emacs, RMarkdown, Blogdown, Hugo, ESS etc. Colour me sceptical. That is a

Re: [ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Tyler Smith via ESS-help
Hi Dirk, I'd be happy to demo blogging with Emacs, RMarkdown, Blogdown, Hugo, ESS etc. I think a 5-10 minute demo with links to more detailed docs would be an engaging format. Best, Tyler -- plantarum.ca On Mon, Dec 28, 2020, at 9:08 AM, Dirk Eddelbuettel wrote: > > A few weeks ago a few

[ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Sparapani, Rodney via ESS-help
Hi Dirk: All great ideas. How about ESS and Roxygen? There's also interest in using Emacs to view R graphics for which there is currently no support; but I think it I might be trivial based on some recent messages. I'm sure that we would come up with others if we ever get this off the ground.

[R] Interpreting coefficient in selection and outcome Heckman models in sampleSelection

2020-12-28 Thread Marinella Cirillo via R-help
Dear Arne, I have just read the exchange of messages with Mark Bulling.I was wondering if you have discovered/developed a function to calculate the marginal effects of the selection and outcome equations (sampleSelection). Thank you Marinella [[alternative HTML version deleted]]

[ESS] [OT] Best Practices Emacs / ESS Mini-Webinars

2020-12-28 Thread Dirk Eddelbuettel via ESS-help
A few weeks ago a few of riffed about all the "known unknown" in using ESS and that teaching each other a few tricks would be cool. We really should do this. To kick it off, maybe we should spawn a quick one-off mailing list (I have used groups.io before) or Slack instance (if someone wants to