Re: [R] Mapping 2D to 3D

2020-09-18 Thread Jeff Newmiller
When dealing with a 2-d density plot, the z variable is a predefined function of your x and y data, it is not something you can specify. If you want to specify z, then you need to use geom_contour. You appear to need to study the theory of kernel density estimates, which is off topic here. (Tech

Re: [R] Mapping 2D to 3D

2020-09-18 Thread H
On 09/18/2020 03:08 AM, Carlos Ortega wrote: > Hi, > > There are some further references in the own "RStudio Community" and in > StackOverflow: > > * https://community.rstudio.com/t/options-to-stat-density-2d/792/4 > * > https://stackoverflow.com/questions/32206623/what-does-level-mean-in-ggp

Re: [R] Mapping 2D to 3D

2020-09-18 Thread H
On 09/18/2020 02:26 AM, Jeff Newmiller wrote: > No, but fortunately you are off in the weeds. Density has an > internally-computed "z" coordinate... you should be looking at ?geom_contour. > > On September 17, 2020 7:17:33 PM PDT, H wrote: >> I am trying to understand how to map 2D to 3D using gg

Re: [R] Creating animation in R Notebooks

2020-09-18 Thread Jeff Reichman
David The reference helped thank you. The "gifski" library corrected the issue Jeff -Original Message- From: David Winsemius Sent: Friday, September 18, 2020 1:19 PM To: reichm...@sbcglobal.net; r-help@r-project.org Subject: Re: [R] Creating animation in R Notebooks https://bookdown.o

Re: [R] Creating animation in R Notebooks

2020-09-18 Thread Jeff Newmiller
It is part of a CRAN package rmarkdown, but major contributed packages are indeed outside the scope of this list regardless of where they come from. Google is as always your friend: https://community.rstudio.com/t/make-an-rstudio-notebook-inline-animation-that-loops-with-gganimate/27489/2 On Se

Re: [R] Creating animation in R Notebooks

2020-09-18 Thread David Winsemius
https://bookdown.org/yihui/rmarkdown-cookbook/animation.html On 9/18/20 8:26 AM, Jeff Reichman wrote: r-help forum Has anyone created an animations within a R-Notebook. I'm trying to create an animation within a R -Notebook and while my code works outside of a notebook (Console) but inside

Re: [R] fusion of two matrices (numerical and logical)

2020-09-18 Thread jim holtman
Here is a way of doing it using the 'arr.ind' option in 'which' > A <- 1:20 > B <- matrix(A,nrow=5,ncol=4) > B [,1] [,2] [,3] [,4] [1,]16 11 16 [2,]27 12 17 [3,]38 13 18 [4,]49 14 19 [5,]5 10 15 20 > # B is a numerical matrix > C <- B<

Re: [R] Creating animation in R Notebooks

2020-09-18 Thread Bert Gunter
Maybe better asked here: https://community.rstudio.com/ as this is largely an RStudio product. 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 Fri

[R] Creating animation in R Notebooks

2020-09-18 Thread Jeff Reichman
r-help forum Has anyone created an animations within a R-Notebook. I'm trying to create an animation within a R -Notebook and while my code works outside of a notebook (Console) but inside the R-Notebook framework I only get a list of the *.png files. Any suggestions? path.animate.plot <-

Re: [R] how to overlay two histograms

2020-09-18 Thread John Kane
Is this what you want? ggplot(d, aes(counts, fill = name)) + geom_bar(stat = "bin", position = "dodge") Note: You probably should play around with the "bin" width. On Thu, 17 Sep 2020 at 18:05, Ana Marija wrote: > Hello, > > I am trying to overlay two histograms with this: > > p <- ggplo

Re: [R] How to reduce the sparseness in a TDM to make a cluster plot readable?

2020-09-18 Thread Andrew
Hello Jim Thanks for that. I'll read up on it and will give it a go, either later today or tomorrow. I am assuming this will work for both tf and tf-idf weighted TDMs? Much appreciated. :-) Best wishes Andy On 18/09/2020 09:18, Jim Lemon wrote: Hi Andrew, >From your last email the answer

Re: [R] Seasonal adjustment with seas - Error: X-13 has returned a non-zero exist status

2020-09-18 Thread Weber Sylvain (HES)
Dear Bill, Jeff, and Bert, Thanks so much for the replies. Bill is absolutely right. The problem came from the UNC path. I could solve the issue by adding the following lines to my Rprofile: myPaths <- .libPaths() myPaths <- c('M:/R/win-library/4.0', myPaths[2]) # where 'M:/R/win-library/4.0' i

Re: [R] How to reduce the sparseness in a TDM to make a cluster plot readable?

2020-09-18 Thread Jim Lemon
Hi Andrew, >From your last email the answer to your problem may be the findFreqTerms() function. Just increase the number of times a term has to appear and check the result until you get the matrix size that you want. Jim On Fri, Sep 18, 2020 at 5:32 PM Andrew wrote: > > Hi Abby > > Many thanks

Re: [R] How to reduce the sparseness in a TDM to make a cluster plot readable?

2020-09-18 Thread Andrew
Hi Abby Many thanks for reaching out with an offer of help. Very much appreciated. (1) The packages I'm using are 'tm' for text-mining and the TDM and for the clustering it is 'cluster' (2) Not sure where the problem is happening as it doesn't show up as an error. Where it manifests is in the

Re: [R] Mapping 2D to 3D

2020-09-18 Thread Carlos Ortega
Hi, There are some further references in the own "RStudio Community" and in StackOverflow: - https://community.rstudio.com/t/options-to-stat-density-2d/792/4 - https://stackoverflow.com/questions/32206623/what-does-level-mean-in-ggplotstat-density2d Kind Regards, Carlos. On Fri, Sep