Re: [R] regarding CCA plot

2023-12-09 Thread Gilson Correia de Carvalho
Dear Shailendra, For me the problem is not related to R or Rstudio or even vegan. The CCA analysis can not be done with denuded site, as the sum will be zero. "all row sums must be >0 in the community data matrix" Best regards, GCC

Re: [R] regarding CCA plot

2023-12-09 Thread Ivan Krylov
Dear Shailendra Pal, Welcome to the R-help mailing list! Most of us are not members of RStudio in any way. Your problem is also purely about programming in R, so you've come to the right place. You have also done the right thing by showing us the code. On Fri, 8 Dec 2023 16:08:51 +0530

[R] regarding CCA plot

2023-12-09 Thread shailendra pal
Hii rstudio members I am learning rstudio, For my manuscript I am trying to plot CCA using species and environmental data. But I am getting error like Error in cca.default(sptrans, envtrans) : all row sums must be >0 in the community data matrix *My code is like * library(vegan)

Re: [R] Convert two-dimensional array into a three-dimensional array.

2023-12-08 Thread Bert Gunter
OK. I'm not getting what you want, so feel free to ignore this if you think I've missed the point completely and don't want to waste your time. Won't be my first time clueless. A 3-D array can be thought of as as a "pile" of 2-D flats, so a 10 x 2 x 10 array consists of 10 2-d flats, each 10 x

[R] Convert two-dimensional array into a three-dimensional array.

2023-12-08 Thread Sorkin, John
Colleagues I want to convert a 10x2 array: # create a 10x2 matrix. datavals <- matrix(nrow=10,ncol=2) datavals[,] <- rep(c(1,2),10)+c(rnorm(10),rnorm(10)) datavals into a 10x3 array, ThreeDArray, dim(10,2,10). The values storede in ThreeDArray's first dimensions will be the data stored in

Re: [R] Convert character date time to R date-time variable.

2023-12-08 Thread Duncan Murdoch
On 08/12/2023 4:30 p.m., David Winsemius wrote: On 12/7/23 08:21, Sorkin, John wrote: Colleagues, I have a matrix of character data that represents date and time. The format of each element of the matrix is "2020-09-17_00:00:00" How can I convert the elements into a valid R date-time

Re: [R] Convert character date time to R date-time variable.

2023-12-08 Thread David Winsemius
On 12/7/23 08:21, Sorkin, John wrote: Colleagues, I have a matrix of character data that represents date and time. The format of each element of the matrix is "2020-09-17_00:00:00" How can I convert the elements into a valid R date-time constant? You will not be able to store these

Re: [R] Convert character date time to R date-time variable.

2023-12-08 Thread Martin Maechler
> Ebert,Timothy Aaron > on Thu, 7 Dec 2023 16:29:09 + writes: > Look at the lubridate package in R. Regards, Tim Absolutely *un*needed here !! - as others mention in this thread. Very simple with base R: > strptime("2020-09-17_00:00:00", format = "%Y-%m-%d_%H:%M:%S")

Re: [R] Fit NLE - was: computer algebra in R

2023-12-07 Thread Konrad via R-help
Dear all, first I would like to thank Leo for his help and advice. My sincere apologies for the delayed response; regrettably, I overlooked the email. In order to characterize the problem a bit better I want to give additional information and clarify the point where I have problems. First

Re: [R] Convert character date time to R date-time variable.

2023-12-07 Thread Dirk Eddelbuettel
`anytime` was written for this: > anytime::anytime("2020-09-17_00:00:00") [1] "2020-09-17 CDT" > class(anytime::anytime("2020-09-17_00:00:00")) [1] "POSIXct" "POSIXt" > Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

Re: [R] Convert character date time to R date-time variable.

2023-12-07 Thread Rui Barradas
Às 16:30 de 07/12/2023, Rui Barradas escreveu: Às 16:21 de 07/12/2023, Sorkin, John escreveu: Colleagues, I have a matrix of character data that represents date and time. The format of each element of the matrix is "2020-09-17_00:00:00" How can I convert the elements into a valid R date-time

Re: [R] Convert character date time to R date-time variable.

2023-12-07 Thread Rui Barradas
Às 16:21 de 07/12/2023, Sorkin, John escreveu: Colleagues, I have a matrix of character data that represents date and time. The format of each element of the matrix is "2020-09-17_00:00:00" How can I convert the elements into a valid R date-time constant? Thank you, John John David Sorkin

Re: [R] Convert character date time to R date-time variable.

2023-12-07 Thread Ebert,Timothy Aaron
Look at the lubridate package in R. Regards, Tim -Original Message- From: R-help On Behalf Of Sorkin, John Sent: Thursday, December 7, 2023 11:22 AM To: r-help@r-project.org (r-help@r-project.org) Subject: [R] Convert character date time to R date-time variable. [External Email]

[R] Convert character date time to R date-time variable.

2023-12-07 Thread Sorkin, John
Colleagues, I have a matrix of character data that represents date and time. The format of each element of the matrix is "2020-09-17_00:00:00" How can I convert the elements into a valid R date-time constant? Thank you, John John David Sorkin M.D., Ph.D. Professor of Medicine, University of

[R] How to calculate relative risk from GAM model in mgcv package?

2023-12-06 Thread Eren Yalın
Hi R users,I am a beginner in the use of R. I need urgent help for my thesis study. I have daily air pollution parameters PM10, PM2.5 CO, NO2, SO2, and O3. I also have daily hospital admission numbers. Taking into account the effect of

[ESS] Fwd: emacs theme for polymode with noweb files

2023-12-06 Thread LaurentEss via ESS-help
Hi Clark,     Indeed, tsdh-dark seems to be good but on my machine the R code is not highlighted in the code chunk (as it is in your image) and I don't know why because in the command line I can see that I am in the ESS[R] mode. I will try to change the color for <<  >>= and @ thanks to the

Re: [R-es] Problemas para instalar Shiny en Mac

2023-12-06 Thread Juan Abasolo
no conocía yo lo del paquete `renv`. Lo miré por arriba y me enamoré. Como de Claudia Shiffer en su momento. Inalcanzable. Voy a esperar que aparezcan explicaciones en castellano y portugues a ver si le inco el diente. Hau idatzi du Emilio L. Cano (emilopezc...@gmail.com) erabiltzaileak (2023

Re: [R] Volume of polygon

2023-12-06 Thread Sarah Goslee
There's also an excellent discussion of various methods with R code here: https://dewey.dunnington.ca/post/2019/bathymetry-lake-volume-estimation-using-r/ On Wed, Dec 6, 2023 at 8:52 AM Sarah Goslee wrote: > > Hi, > > As already mentioned, this is a great topic for R-sig-geo, where you'd >

Re: [R] Volume of polygon

2023-12-06 Thread Sarah Goslee
Hi, As already mentioned, this is a great topic for R-sig-geo, where you'd probably get specialist answers like the lake morphology package https://cran.r-project.org/web/packages/lakemorpho/index.html which is explicitly designed for this kind of question. Sarah On Tue, Dec 5, 2023 at 11:13 PM

Re: [R] Volume of polygon

2023-12-05 Thread Jeff Newmiller via R-help
A raster is just a matrix of elevations. Each element of that matrix has a horizontal area. If you subtract that elevation from a reference elevation and zero out all negative values then you are left with a bunch of rectangular parallelopipeds of varying height. Add those heights up and

Re: [R] Volume of polygon

2023-12-05 Thread javad bayat
Dear Bert; Thank you for your reply. The reservoir is not cylindrica. This is the table I have created from the data extracted. Maybe there is a way to get the relation between Elevation, Area and Volume to get the elevation at a specific Volume. Sincerely valueArea Height

Re: [R] Volume of polygon

2023-12-05 Thread Bert Gunter
The volume of a polygon = 0. Polyhedra have volumes. This may be irrelevant, but if the lake is cylindrical == constant cross sectional area at all depths, then height doubles when the volume does and vice versa. Otherwise you have to know how area varies with height or use more sensible

[R] Volume of polygon

2023-12-05 Thread javad bayat
Dear all; I am trying to calculate the volume of a polygon shapefile according to a DEM raster. I have provided some codes at the end of this email.I dont know if the codes are correct or not. Following this, I have another question too. I want to know if the volume of the reservoir rises or

Re: [R-es] Problemas para instalar Shiny en Mac

2023-12-05 Thread Clei Y
Hola Muchas gracias por la sugerencia Emilio, tenías toda la razón, mi versión de R-Studio era la última pero mi versión de R ya estaba obsoleta por lo que instalé la nueva y todo funciona de maravilla. Como comentario adicional, en MacOS no tuve problema, pero en Windows tuve que configurar

Re: [ESS] emacs theme for polymode with noweb files

2023-12-05 Thread Brett Presnell via ESS-help
I've been using the zenburn theme for quit a while now. I am red-green colorblind though, so my view of these things is always compromised. https://github.com/bbatsov/zenburn-emacs LaurentEss via ESS-help writes: > [External Email] > > Dear ESS-list, > > I tried many dark color themes

Re: [ESS] emacs theme for polymode with noweb files

2023-12-05 Thread Tyler Smith via ESS-help
Hi Johannes, Tibbles add an extra layer of complexity, in that they apply their own colors to output, which doesn't necessarily follow the Emacs theme. I turn them off with: ``` options(crayon.enabled = FALSE) ``` See more discussion here: https://github.com/tidyverse/tibble/issues/395

Re: [ESS] emacs theme for polymode with noweb files

2023-12-05 Thread LaurentEss via ESS-help
Yes it is nice but the text is still unreadable in the helm-buffers-list (C-x C-b), I will search to change the colors. Le 04/12/2023 à 15:23, James W. MacDonald a écrit : I personally like Dracula mode, although Nord seems pretty nice as well. -Original Message- From: ESS-help On

Re: [ESS] emacs theme for polymode with noweb files

2023-12-05 Thread Hüsing , Johannes via ESS-help
Thanks, Tyler, for the directions, which made me burn office hours while looking fort he optimal font face. One of these faces seems to be assigned to documenting the contents of a tidyverse object. Via the link you can find the face used for printing a data frame vs printing a tibble. The

Re: [R-es] Problemas para instalar Shiny en Mac

2023-12-04 Thread Emilio L. Cano
Hola, La otra solución es actualizar R a una versión más reciente (con la 3.6 es posible que esto te llegue a pasar con más paquetes, la versión actual es 4.3.2). Si por tus requerimientos tienes que seguir usando la 3.6, entonces como dice Eric debes controlar también las versiones de los

[R] Fit NLE - was: computer algebra in R

2023-12-04 Thread Leo Mada via R-help
Fit NLE - was: [R] computer algebra in R Original post: https://stat.ethz.ch/pipermail/r-help/2023-November/478619.html Dear Kornad, I think I have started to understand what you try to achieve. The problem is to fit a NLE and compute the parameters of the NL-Eq. I have included the R

Re: [ESS] emacs theme for polymode with noweb files

2023-12-04 Thread LaurentEss via ESS-help
Hi Tyler,  Thank you for the explanations. I well understood what you mean and I agree. But I did not success to apply  your approach. I disable hl-line-mode with the command with (global-hl-line-mode nil) but M-x describe-face doesn't work. Searching on the net, I found the commande C-u C-x

Re: [R] Unable to add the CRAN apt repository

2023-12-04 Thread Steve Gutreuter
Yes, thanks. On Mon, 2023-12-04 at 14:08 -0500, Steve Gutreuter wrote: > Thanks!  "jammy" made it work.   > > For some reason,  lsb_release -cs is returning "victoria" rather than "jammy", > and > > $> sudo apt update > Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease > Ign:2

Re: [R] Unable to add the CRAN apt repository

2023-12-04 Thread Steve Gutreuter
Thanks!  "jammy" made it work.   For some reason,  lsb_release -cs is returning "victoria" rather than "jammy", and $> sudo apt update Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease Ign:2 http://packages.linuxmint.com victoria InRelease Get:3 http://archive.ubuntu.com/ubuntu

Re: [R] Unable to add the CRAN apt repository

2023-12-04 Thread Dirk Eddelbuettel
Steve, The better list for such questions is r-sig-debian. On 4 December 2023 at 13:41, Steve Gutreuter wrote: | I just upgraded from Linux Mint 20 to 21 and am no longer able to add the CRAN | Ubuntu repository to my list of repositories.  I am getting: | | $> sudo

Re: [R] Unable to add the CRAN apt repository

2023-12-04 Thread Ivan Krylov
On Mon, 04 Dec 2023 13:41:47 -0500 Steve Gutreuter wrote: > $> sudo /usr/bin/add-apt-repository "deb > https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release > -cs)-cran40/" Looks like `lsb_release -cs` returns a Mint codename for you. Thankfully, since we know that Linux Mint 21 is based

[R] Unable to add the CRAN apt repository

2023-12-04 Thread Steve Gutreuter
I just upgraded from Linux Mint 20 to 21 and am no longer able to add the CRAN Ubuntu repository to my list of repositories.  I am getting: $> sudo /usr/bin/add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" $> sudo apt update Hit:1

Re: [ESS] emacs theme for polymode with noweb files

2023-12-04 Thread Tyler Smith via ESS-help
Hi, I use cyberpunk, which is pretty usable as-is. However, more important, I think, than the actual theme you use, is being able to tweak the styling of individual faces. Once you pick a theme that is reasonably close to what you want, if there are bits that you don't like, you can easily

Re: [ESS] emacs theme for polymode with noweb files

2023-12-04 Thread James W. MacDonald via ESS-help
I personally like Dracula mode, although Nord seems pretty nice as well. -Original Message- From: ESS-help On Behalf Of LaurentEss via ESS-help Sent: Sunday, December 3, 2023 5:48 PM To: ess-help@r-project.org Subject: [ESS] emacs theme for polymode with noweb files Dear ESS-list,    

Re: [R-es] Transformar una base de datos a matriz

2023-12-04 Thread Antonio Sala Mirete
Muchas gracias a todos. Probar� con vuestras aportaciones y os mantengo informados cuando lo consiga. �Gracias de nuevo! Antonio De: Carlos Ortega Enviado: lunes, 4 de diciembre de 2023 12:54 Para: Antonio Sala Mirete Cc: r-help-es@r-project.org Asunto: Re:

Re: [R-es] Transformar una base de datos a matriz

2023-12-04 Thread jose luis via R-help-es
HolaAqui está bien explicadoSaludos How to Use Gather Function in R (With Examples) | | | | | | | | | | | How to Use Gather Function in R (With Examples) Zach This tutorial explains how to use the gather() function from the tidyr package in R, including several examples. | |

Re: [R-es] Transformar una base de datos a matriz

2023-12-04 Thread Isidro Hidalgo Arellano via R-help-es
Bueno días, Antonio: Tu pregunta es casi un curso sobre el paquete dplyr. Mira la ayuda del paquete, especialmente las agrupaciones y los cambios de largo a ancho con las funciones pivot_wider() y pivot_longer(). Saludos, Isidro -Mensaje original- De: R-help-es En nombre de Antonio

[R-es] Transformar una base de datos a matriz

2023-12-04 Thread Antonio Sala Mirete
Buenos d�as. Tengo una duda: Trabajo con comundiades de especies, y mis datos se ordenan de tal forma que, cada especie corresponde a una fila de la base de datos, por lo que cada muestra tiene un n�mero de filas correspondiente al n�mero de especies. Mi objetivo es transformar esa base de

[ESS] emacs theme for polymode with noweb files

2023-12-03 Thread LaurentEss via ESS-help
Dear ESS-list,   I tried many dark color themes to do literate programming with polymode (.rnw file) but there are always some drawbacks : the color of the beginning and the end of the chunks (<<>>= and @) are unreadable, the color of the text when I want to see the available buffers

Re: [R] back tick names with predict function

2023-12-03 Thread Robert Baer
On 12/1/2023 11:47 AM, peter dalgaard wrote: Also, and possibly more constructively, when you get an error like CI.c = predict(mod2, data.frame( `plant-density` = x), interval = 'c') # fail Error in eval(predvars, data, env) : object 'plant-density' not found you should check your

Re: [ESS] [R-win] Difficulty installing R packages under Windows 11 / Cygwin

2023-12-03 Thread Dirk Eddelbuettel via ESS-help
On 2 December 2023 at 22:06, Tomas Kalibera via ESS-help wrote: | R is not being tested under WSL. (From several arm lengths away:) WSL2 appears to be very solid. I had an early alpha tester of my (then brand-new) r2u [1] using and stressing it, it appears to work a like regular Ubuntu system

Re: [R] Try reproduce glmm by hand

2023-12-03 Thread Viechtbauer, Wolfgang (NP)
Dear Marc, Plugging the BLUPs into the likelihood isn't going to give you the ll of the model. You need to integrate over the random effect. intfun <- function(nu, xi, mi, pred, theta) dbinom(xi, xi+mi, plogis(nu)) * dnorm(nu, pred, theta) lli <- rep(NA, nrow(df)) for (i in 1:nrow(df)) {

Re: [ESS] [R-win] Difficulty installing R packages under Windows 11 / Cygwin

2023-12-02 Thread Tomas Kalibera via ESS-help
On 12/2/23 18:59, Sparapani, Rodney wrote: Hi Robert: Would they allow dual-booting?  I’m not saying that you can’t get ESS to work under Cygwin.  On the contrary, it did work at one time so it certainly can be done.  However, that is not currently supported so you are on your own.  But,

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Duncan Murdoch
On 02/12/2023 5:37 p.m., CALUM POLWART wrote: You could easily omit the Page X of xX, but leave the timestamp Then add Page X of XX programmatically using pdftools or some similar pdf command line tools. You don't need to use command line tools -- I showed how to do it by creating an R

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread CALUM POLWART
You could easily omit the Page X of xX, but leave the timestamp Then add Page X of XX programmatically using pdftools or some similar pdf command line tools. On Sat, 2 Dec 2023, 22:35 , wrote: > Having read all of the replies, it seems there are solutions for the > question and the OP points

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread avi.e.gross
Having read all of the replies, it seems there are solutions for the question and the OP points out that some solutions such as making the document twice will affect the creation date. I suspect the additional time to do so is seconds or at most minutes so it may not be a big deal. But what

Re: [ESS] [External] [R-win] Difficulty installing R packages under Windows 11 / Cygwin

2023-12-02 Thread Martin Maechler via ESS-help
As R core and ESS core I still have never tried to install ESS under Windows. Just last week installed not only R for Windows (binary from CRAN) + Rtools43 (by Tomas, from CRAN) and was able to install my Rmpfr package (C code + external lib) *from source* -- again thanks to Tomas Kalibera's

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Duncan Murdoch
On 02/12/2023 2:07 p.m., Ben Bolker wrote: Sorry, jumped into the thread too late. (On the other hand, once the document gets complicated enough, it may be worth it in the long run to convert to something that actually has a document-generating back-end, rather than reinventing everything

Re: [ESS] [External] [R-win] Difficulty installing R packages under Windows 11 / Cygwin

2023-12-02 Thread Richard M. Heiberger via ESS-help
my initial reaction is that you are trying to hard. I haven't paid serious attention to Windows since I switched to Mac about 10 years ago. What I recall is that all the unix utilities (sh, awk, grep, etc) that you need are included in the Rtools collection. Indeed they are exactly the cygwin

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Ben Bolker
Sorry, jumped into the thread too late. (On the other hand, once the document gets complicated enough, it may be worth it in the long run to convert to something that actually has a document-generating back-end, rather than reinventing everything from scratch ...) On 2023-12-02 2:03 p.m.,

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Jeff Newmiller via R-help
He clearly stated he was using the pdf() graphics device. On December 2, 2023 10:36:44 AM PST, Ben Bolker wrote: > It's still not entirely clear to me what framework you're using to generate > the PDF, but if it's rmarkdown/Rnw (Sweave)/Quarto-based, then as far as I > know all of those

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Ben Bolker
It's still not entirely clear to me what framework you're using to generate the PDF, but if it's rmarkdown/Rnw (Sweave)/Quarto-based, then as far as I know all of those frameworks use LaTeX as the last step in the script-to-PDF pipeline, and allow the inclusion of arbitrary LaTeX code, so

Re: [ESS] [R-win] Difficulty installing R packages under Windows 11 / Cygwin

2023-12-02 Thread Sparapani, Rodney via ESS-help
Hi Robert: Would they allow dual-booting? I’m not saying that you can’t get ESS to work under Cygwin. On the contrary, it did work at one time so it certainly can be done. However, that is not currently supported so you are on your own. But, perhaps there are others in the same

Re: [ESS] [R-win] Difficulty installing R packages under Windows 11 / Cygwin

2023-12-02 Thread Sparapani, Rodney via ESS-help
Hi Robert: There was a time when we supported ESS under Cygwin. In other words, run elisp code assuming UNIX/Linux rather than Windows even though Windows is the OS. However, that was a long time ago: at least 10 years since I last tried it. Cygwin has largely fallen out of fashion since you can

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Ebert,Timothy Aaron
Would this work in general? Say I have a document with figures, special equations, text, and tables. The text and tables are relatively easy. The figures would need a conversion from pixels to lines, and the equations maybe printed out, counted as a figure, and then added to the line count. It

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread John Kane
https://community.rstudio.com/t/total-number-of-pages-in-quarto-pdf/177316/2 On Sat, 2 Dec 2023 at 09:39, Dennis Fisher wrote: > OS X > R 4.3.1 > > Colleagues > > I often create multipage PDFs [pdf()] in which the text "Page X" appears > in the margin. These PDFs are created automatically

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Jeff Newmiller via R-help
One of the most fundamental characteristics of R programming is the use of data frames of column vectors, and one of the very first challenges I had as a then-Perl-programmer was coming to grips with the fact that unknown-length CSV files would be read completely into memory as rows and once

[R] Try reproduce glmm by hand

2023-12-02 Thread Marc Girondot via R-help
Dear all, In order to be sure I understand glmm correctly, I try to reproduce by hand a simple result. Here is a reproducible code. The questions are in _ Of course I have tried to find the solution using internet but I was not able to find a solution. I have also tried to

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread CALUM POLWART
Can you provide a very simplified version of how the PDF is created? On Sat, 2 Dec 2023, 14:39 Dennis Fisher, wrote: > OS X > R 4.3.1 > > Colleagues > > I often create multipage PDFs [pdf()] in which the text "Page X" appears > in the margin. These PDFs are created automatically using a

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Erich Subscriptions
You need to use raw LaTeX See section 4 here Von meinem iPad gesendet > Am 02.12.2023 um 15:39 schrieb Dennis Fisher : > > OS X > R 4.3.1 > > Colleagues > > I often create multipage PDFs [pdf()] in which the text "Page X" appears in > the margin. These PDFs are created automatically using

[R] adding "Page X of XX" to PDFs

2023-12-02 Thread Dennis Fisher
OS X R 4.3.1 Colleagues I often create multipage PDFs [pdf()] in which the text "Page X" appears in the margin. These PDFs are created automatically using a massive R script. One of my clients requested that I change this to: Page X of XX where XX is the total number of pages. I

Re: [R] Mann Kendall mutation package?

2023-12-01 Thread Ben Bolker
Have you looked at the Kendall package? https://stackoverflow.com/questions/62288340/mann-kendall-in-r (you've cross-posted a version of this question to SO as well: https://stackoverflow.com/questions/77587426/what-is-the-algorithm-for-the-mann-kendall-mutation-test ) Please don't

Re: [R] back tick names with predict function

2023-12-01 Thread peter dalgaard
Also, and possibly more constructively, when you get an error like > CI.c = predict(mod2, data.frame( `plant-density` = x), interval = 'c') # fail Error in eval(predvars, data, env) : object 'plant-density' not found you should check your assumptions. Does "newdata" actually contain a columnn

Re: [R] Mann Kendall mutation package?

2023-12-01 Thread Rui Barradas
Às 11:58 de 01/12/2023, Nick Wray escreveu: Hello - does anyone know whether there are any packages for Mann-Kendall mutation tests in R available? The only one I could find online is this MK_mut_test: Mann-Kendall mutation test in Sibada/sibadaR: Sibada's accumulated R scripts for next

Re: [R-es] PCA

2023-12-01 Thread Jose Betancourt Bethencourt
Gracias por su ayuda El 30/11/23, Marcelino de la Cruz Rot escribió: > Hola, José: > > Ahí va un ejemplo: > > library(vegan) > library(FD) > > # datos categóricos de ejemplo > dataf <- data.frame(FA = factor(sample(letters[1:3], 10, rep=T)), FB = > factor(sample(letters[1:3], 10, rep=T))) >

[R] Mann Kendall mutation package?

2023-12-01 Thread Nick Wray
Hello - does anyone know whether there are any packages for Mann-Kendall mutation tests in R available? The only one I could find online is this MK_mut_test: Mann-Kendall mutation test in Sibada/sibadaR: Sibada's accumulated R scripts for next probably use to avoid reinventing the wheel.

Re: [R] back tick names with predict function

2023-11-30 Thread Bert Gunter
"Thank you Rui. I didn't know about the check.names = FALSE argument. > Another good reminder to always read help, but I'm not sure I understood > what help to read in this case" ?data.frame , of course, which says: "check.names logical. If TRUE then the names of the variables in the data

Re: [R] back tick names with predict function

2023-11-30 Thread Robert Baer
Thank you Rui.  I didn't know about the check.names = FALSE argument.  Another good reminder to always read help, but I'm not sure I understood what help to read in this case.  Since your clue, I've discovered that a tibble-based strategy could also work. x = seq(min(cob_wt$`plant-density`),

Re: [R] Code editor for writing R code

2023-11-30 Thread Dr Eberhard W Lisse
Sublime Text. On all platforms. On 29/11/2023 17:57, Christofer Bogaso wrote: > Hi, > > Currently I use VS-Code to write codes in R. While it is very good, it > does not allow me to write Latex expressions in comments, which I am > willing to have to write corresponding mathematical expressions

Re: [R] back tick names with predict function

2023-11-30 Thread Rui Barradas
Às 17:57 de 30/11/2023, Rui Barradas escreveu: Às 17:38 de 30/11/2023, Robert Baer escreveu: I am having trouble using back ticks with the R extractor function 'predict' and an lm() model.  I'm trying too construct some nice vectors that can be used for plotting the two types of regression

Re: [R] back tick names with predict function

2023-11-30 Thread Rui Barradas
Às 17:38 de 30/11/2023, Robert Baer escreveu: I am having trouble using back ticks with the R extractor function 'predict' and an lm() model.  I'm trying too construct some nice vectors that can be used for plotting the two types of regression intervals.  I think it works with normal column

[R] back tick names with predict function

2023-11-30 Thread Robert Baer
I am having trouble using back ticks with the R extractor function 'predict' and an lm() model.  I'm trying too construct some nice vectors that can be used for plotting the two types of regression intervals.  I think it works with normal column heading names but it fails when I have "special"

Re: [R-es] PCA

2023-11-30 Thread Marcelino de la Cruz Rot
Hola, José: Ahí va un ejemplo: library(vegan) library(FD) # datos categóricos de ejemplo dataf <- data.frame(FA = factor(sample(letters[1:3], 10, rep=T)), FB = factor(sample(letters[1:3], 10, rep=T))) dataf # Obtén una matriz de distancia para tus datos (esta es una posibilidad) dataf.dist

[R-es] PCA

2023-11-30 Thread Jose Betancourt Bethencourt
-Estimados apreciaría recibir un script para el análisis de componentes principales de datos categóricos saludos José [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org

Re: [R] Code editor for writing R code

2023-11-30 Thread Ivan Krylov
В Wed, 29 Nov 2023 21:27:37 +0530 Christofer Bogaso пишет: > Does there exist any Code editor for R, that allows me to write Latex > in comments? While I cannot guarantee that you'll like it, may I suggest GNU Emacs? Its R support is provided by the ESS package , and

Re: [R] Code editor for writing R code

2023-11-29 Thread Duncan Murdoch
On 29/11/2023 1:29 p.m., Eric Berger wrote: Bert, Posit (formerly RStudio) has moved from RMarkdown to Quarto. They still support RMarkdown but major new features will be in Quarto. For new users a better choice would be Quarto. See https://quarto.org/docs/faq/rmarkdown.html I'm not sure about

Re: [R] Code editor for writing R code

2023-11-29 Thread Jeff Newmiller via R-help
Quarto is built on top of RMarkdown when R is used, so RMarkdown isn't going anywhere soon. Don't spread unnecessary FUD. Quarto is well-supported in VSCode, though. And reply to the right branch of the thread... Bert is not in the thread below. On November 29, 2023 10:29:03 AM PST, Eric

Re: [R] Code editor for writing R code

2023-11-29 Thread Eric Berger
Bert, Posit (formerly RStudio) has moved from RMarkdown to Quarto. They still support RMarkdown but major new features will be in Quarto. For new users a better choice would be Quarto. See https://quarto.org/docs/faq/rmarkdown.html Secondly, the OP stated he was using the VS-Code IDE, so there is

Re: [R] Code editor for writing R code

2023-11-29 Thread Christofer Bogaso
Hi Sergei, Where can I find TeX Comments extension in VS Code? On Wed, Nov 29, 2023 at 9:34 PM Sergei Ko wrote: > > TeX Comments extension in VS Code > > > > > Sent from my phone > > > Original message > From: Christofer Bogaso > Date: Wed, 29 Nov 2023, 15:57 > To: r-help >

Re: [R] Code editor for writing R code

2023-11-29 Thread Bert Gunter
This might be of use to you: https://everyday.codes/tutorials/how-to-use-latex-in-rmarkdown/ -- Bert On Wed, Nov 29, 2023 at 8:21 AM Bert Gunter wrote: > > I believe RMarkdown can use and render latex comments. RStudio/Posix > provides ide extensions (e.g. R Notebooks) that seem to do what you

Re: [R] Code editor for writing R code

2023-11-29 Thread Bert Gunter
I believe RMarkdown can use and render latex comments. RStudio/Posix provides ide extensions (e.g. R Notebooks) that seem to do what you want, but I have no experience with them. As Ben suggested, there are likely others, depending on exactly what you want to do. -- Bert On Wed, Nov 29, 2023 at

Re: [R] Code editor for writing R code

2023-11-29 Thread Eric Berger
Another direction would be to replace your R script (.R file) with a Quarto document (.qmd file). VS-code has good support for Quarto and you could intersperse your Latex with R chunks. On Wed, Nov 29, 2023 at 6:15 PM Ben Bolker wrote: > > > >Presumably there's nothing stopping you

Re: [R] Code editor for writing R code

2023-11-29 Thread Ben Bolker
Presumably there's nothing stopping you *writing* LaTeX in comments -- do you want a code editor that will render and display the LaTeX as you write? (Or am I misunderstanding something?) Does anyone do classic literate programming *sensu* Knuth any more?

[R] Code editor for writing R code

2023-11-29 Thread Christofer Bogaso
Hi, Currently I use VS-Code to write codes in R. While it is very good, it does not allow me to write Latex expressions in comments, which I am willing to have to write corresponding mathematical expressions as comments in my code files. Does there exist any Code editor for R, that allows me to

Re: [R] Barplot for data frame

2023-11-29 Thread Ben Tupper
Another great resource is RSeek.org https://rseek.org/?q=barplot On Wed, Nov 29, 2023 at 4:26 AM Ivan Krylov wrote: > В Wed, 29 Nov 2023 00:29:49 + > Livio Beqiri пишет: > > > how can i create a vertical barplot that displays brands in x-axis > > and Revenue in Y-axis > > What have you

[R] computer algebra in R

2023-11-29 Thread Leo Mada via R-help
Dear Konrad, I presume that the system can be written as follows, where h0, d0, ga0, kga and kd are given: err1 = h + hd + hga - h0; err2 = d + hd - d0; err3 = ga + hga - ga0; err4 = hga - kga*h*ga; err5 = hd - kd*h*d; All error terms should be zero. Do you need (a) the symbolic solution or

Re: [R] Barplot for data frame

2023-11-29 Thread Ivan Krylov
В Wed, 29 Nov 2023 00:29:49 + Livio Beqiri пишет: > how can i create a vertical barplot that displays brands in x-axis > and Revenue in Y-axis What have you tried? If you're not currently studying R with an instructor (who should be contacted with basic questions like this instead; see the

Re: [R] Barplot for data frame

2023-11-29 Thread Dr Eberhard Lisse
Look like homework to me :-)-O el On 2023-11-29 02:29 , Livio Beqiri wrote: I have a dataframe df <- df <- data.frame (Revenue = c("100", "300", "500"), Brand = c("Apple", "HP", "Lenovo") ) how can i create a vertical barplot that displays brands in

[R] Barplot for data frame

2023-11-29 Thread Livio Beqiri
I have a dataframe df <- df <- data.frame (Revenue = c("100", "300", "500"), Brand = c("Apple", "HP", "Lenovo") ) how can i create a vertical barplot that displays brands in x-axis and Revenue in Y-axis [[alternative HTML version deleted]]

Re: [R] computer algebra in R

2023-11-28 Thread Søren Højsgaard via R-help
Just wanted to mention that the caracas package *may* be better at solving this problem Best Søren -Original Message- From: Konrad via R-help Reply-To: Konrad To: R-help@r-project.org Subject: [R] computer algebra in R Date: Tue, 28 Nov 2023 11:03:36 +0100 Dear all, I'm currently

[R] computer algebra in R

2023-11-28 Thread Konrad via R-help
Dear all, I'm currently working on converting mathematica code (https://github.com/ASDSE/thermosimfit/blob/master/Packages/thermoHD-Comp/thermoCacheHD-1Comp.m) to R. The code is related to solve algebraic systems. eqthermo = {h0 == h + hd + hga, d0 == d + hd, ga0 == ga + hga, kga ==

Re: [R] Problems when trying to visualize clusters

2023-11-27 Thread Paul Murrell
Hi Looks like you have misspelled the 'vars'. Does this work ... ? plot(kclustalgo, vars = c("Toll","Transits")) Paul On 17/11/23 06:10, Paul Bernal wrote: install.packages("clustMixType") install.packages("factoextra") install.packages("NbClust") This is my R code: #Reading Required

Re: [R] t.test with Welch correction is ambiguous

2023-11-27 Thread Ebert,Timothy Aaron
Your solution was educational. Thank you. I have two comments. 1) If you do not provide both options then you are forcing people to conform to your approach. In general I disapprove, but for specific cases I can see advantages. 2) Without reading the relevant papers (and possibly understanding

[R] t.test with Welch correction is ambiguous

2023-11-27 Thread Dr . Rainer Düsing
Dear R Team! There was an ongoing debate on Research Gate about the “Welch” option in your base R t.test command. A user noticed that the correction of the degrees of freedom labeled as “Welch Two Sample t-test”, if you choose var.equal = TRUE in the R t.test command, differs from the output of

Re: [ESS] [External] R Transcript opens in readonly buffer

2023-11-25 Thread Ishe Chinyoka via ESS-help
Thanks Rich, I thought something was wrong with my setup. I had thought that the transcript was to make it easy to carry on with a session after knocking off from your computer for some time. But then one queer thing is that when I set the variable ess-ask-about-transfile which, according to the

Re: [R] ggplot with two x-axis and two dimensions

2023-11-25 Thread Rui Barradas
Às 10:29 de 24/11/2023, sibylle.stoec...@gmx.ch escreveu: Dear R-user Does anybody now, if ggplot allows to use two x-axis including two dimensions (similar to excel plot (picture 1 in the pdf attachmet). If yes, how should I adapt my code? The parameters are presented in the input file

<    6   7   8   9   10   11   12   13   14   15   >