Re: [R] Issues with R's forecast function

2024-05-27 Thread Paul Bernal
Hi Sarah, I ran update.packages, reloaded the forecast package, but kept on getting the same errors. I am going to install the latest R version (4.4.0), as I was using version 4.3.2 and reinstall the package. Cheers, Paul El lun, 27 may 2024 a las 13:51, Sarah Goslee () escribió: > Hi Paul, >

Re: [R] Issues with R's forecast function

2024-05-27 Thread Sarah Goslee
Hi Paul, Looking at this, you aren't running the most recent version of forecast. If I were having a problem of this sort, I'd update R (if you can), run update.packages() and then try again with a minimal set of packages. As one of the other responses suggested, you probably have mismatched

Re: [R] Issues with R's forecast function

2024-05-27 Thread Paul Bernal
Dear Sarah, Here is the sessionInfo() output, I forgot to include it in my reply. sessionInfo() R version 4.3.2 (2023-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22631) Matrix products: default locale: [1] LC_COLLATE=English_United States.utf8

Re: [R] Issues with R's forecast function

2024-05-27 Thread Paul Bernal
Thanks for the kind feedback. I will go ahead and update the packages and see what happens. I will keep you posted. Cheers, Paul El lun, 27 may 2024 a las 13:51, Sarah Goslee () escribió: > Hi Paul, > > Looking at this, you aren't running the most recent version of forecast. > > If I were

Re: [R] Issues with R's forecast function

2024-05-27 Thread Paul Bernal
Dear Sarah, Thank you for kindly reaching back. I did load the package, which makes this issue really odd. I ran the same model about a week ago and everything was working to perfection. Best regards, Paul El lun, 27 may 2024 a las 12:15, Sarah Goslee () escribió: > Hi Paul, > > It looks like

Re: [R] Issues with R's forecast function

2024-05-27 Thread Jeff Newmiller via R-help
You have completely ignored mentioning what R contributed packages you may have been using in "back when it worked". It is critical that you keep track of which "library" statements are necessary to run your code, if any. I searched for "R usemethod forecast" in Google and this [1] came up.

Re: [R] Issues with R's forecast function

2024-05-27 Thread Sarah Goslee
Hi Paul, It looks like you're using the forecast package, right? Have you loaded it? What is the output of sessionInfo() ? It looks to me like you either haven't loaded the needed packages, or there's some kind of conflict. Your examples don't give me errors when I run them, so we need more

[R] Issues with R's forecast function

2024-05-27 Thread Paul Bernal
Dear all, I am currently using R 4.3.2 and the data I am working with is the following: ts_ingresos_reservas= ts(ingresos_reservaciones$RESERVACIONES, start = c(1996,11), end = c(2024,4), frequency = 12) structure(c(11421.54, 388965.46, 254774.78, 228066.02, 254330.44, 272561.38, 377802.1,

Re: [R] Can someone please have a look at my query on stackoverflow ?

2024-05-27 Thread David Winsemius
If I had seen that post before it got a bounty, I would have voted to migrate it to https://stats.stackexchange.com since it is a request for advice on methods as well as an implicit request for a package recommendation. — David Sent from my iPhone > On May 27, 2024, at 5:40 AM, Ashim Kapoor

[R] Can someone please have a look at my query on stackoverflow ?

2024-05-27 Thread Ashim Kapoor
Dear experts, I am having difficulty with computing spectrum of seasonal ARMA models. My query is posted here : https://stackoverflow.com/questions/78526800/computing-the-spectrum-of-a-seasonal-model-in-r Will be grateful if someone has a look at it and responds. Many thanks, Ashim.

Re: [R] dplyr, group_by and selective action according to each group

2024-05-26 Thread Laurent Rhelp
Thank you for your answers. Endeed, if I can do the treatment row by row, which is the case, I can use a condition statement with mutate. Instead of ifelse I found the case_when statement in order to take into account the three groups. And the list of functions  with the relevant names is a

Re: [R] dplyr, group_by and selective action according to each group

2024-05-24 Thread avi.e.gross
Although there may well be many ways to do what is being asked for with the tidyverse, sometimes things are simple enough to do the old-fashioned way. The request seems to have been to do something to all rows in ONE specific group but was phrased in the sense of wanting to know which group

Re: [R] dplyr, group_by and selective action according to each group

2024-05-24 Thread Bert Gunter
Laurent: As I don't use dplyr, this won't help you, but I hope you and others may find it entertaining anyway. If I understand you correctly (and ignore this if I have not), there are a ton of ways to do this in base R, including using switch() along the lines you noted in your post. However,

[R] dplyr, group_by and selective action according to each group

2024-05-24 Thread Laurent Rhelp
Dear RHelp-list,    Using dplyr and the group_by approach on a dataframe, I want to be able to apply a specific action according to the group name. The code bellow works, but I am not able to write it in a more esthetic way using dplyr. Can somebody help me to find a better solution ? Thank

Re: [R] Regexp pattern but fixed replacement?

2024-05-23 Thread Enrico Schumann
On Thu, 11 Apr 2024, Duncan Murdoch writes: > I noticed this issue in stringr::str_replace, but it > also affects sub() in base R. > > If the pattern in a call to one of these needs to be a > regular expression, then backslashes in the replacement > text are treated specially. > > For example, >

Re: [R] R, RStudio, and a server for my iPad.

2024-05-21 Thread peter dalgaard
...or look inside the administration interface for your router. Typically starts with opening a browser on 192.168.0.1 or 192.168.1.1 (with a password that you presumably have from your provider) and going to "Access Control" or thereabouts. -pd > On 12 Apr 2014, at 20:08 , Viechtbauer

Re: [R] Listing folders on One Drive

2024-05-21 Thread Jorgen Harmse via R-help
I would just use fi <- file.info(dir(path, recursive=TRUE, include.dirs=TRUE)) path could be the OneDrive directory or Scotland (and is not needed if you're already in the directory you want). Then rownames(subset(fi, isdir)) will contain all the directories. Maybe you want to use grep or other

Re: [R] wrtiteBin in conjunction with seek : the position in the file is not good when writing

2024-05-21 Thread Laurent Rhelp
It works !! Thank you VERY much because I didn't understand the rw argument for the seek command and endeed it is explained: File connections can be open for both writing/appending, in which case*R*keeps separate positions for reading and writing. Which|seek|refers to can be set by

Re: [R] wrtiteBin in conjunction with seek : the position in the file is not good when writing

2024-05-21 Thread Ivan Krylov via R-help
В Tue, 21 May 2024 11:29:33 +0200 Laurent Rhelp пишет: > pos <- seek(con_in,2,origin="start") > # We have to repeat the command to return the good amount of read > # bytes > print(paste0("pos is not equal to 2, pos = ",pos)) That's because seek() returns the previous position ("before any

[R] wrtiteBin in conjunction with seek : the position in the file is not good when writing

2024-05-21 Thread Laurent Rhelp
Dear RHelp-list,  I want to write at a specific position in a file without reading all the file because it is very large and I cannot read it in my RAM. But I miss something about the use of the command writeBin in conjunction with seek. In the example bellow the seek commands works well with

Re: [R] R-help Digest, Vol 255, Issue 17

2024-05-21 Thread Michael L Friendly
You might be interested in the `Rdatasets` package, https://vincentarelbundock.github.io/Rdatasets/ which lists over 2200 datasets from various packages. What is the context of the `lottery` dataset. I seem to recall smth to do with the NJ Lottery -Michael 1. Availability of Sdatasets

Re: [R] Listing folders on One Drive

2024-05-20 Thread John Fox
Dear Nick, See list.dirs(), which is documented in the same help file as list.files(). I hope this helps, John -- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada web: https://www.john-fox.ca/ -- On 2024-05-20 9:36 a.m., Nick Wray wrote: [You don't often get email

Re: [R] Listing folders on One Drive

2024-05-20 Thread avi.e.gross
Nick, As Jeff said, we don't know what you tried and what did not work. There are built-in and probably package versions but have you tried something like list.files()? You can tweak it to get the files you want by doing something like: -change directory to HERE - here.files <-

Re: [R] Listing folders on One Drive

2024-05-20 Thread Jeff Newmiller via R-help
What does "doesn't work" mean? What have you tried? On May 20, 2024 6:36:58 AM PDT, Nick Wray wrote: >Hello I have lots of folders of individual Scottish river catchments on my >uni One Drive. Each folder is labelled with the river name eg "Tay" and >they are all in a folder named "Scotland" >I

[R] Listing folders on One Drive

2024-05-20 Thread Nick Wray
Hello I have lots of folders of individual Scottish river catchments on my uni One Drive. Each folder is labelled with the river name eg "Tay" and they are all in a folder named "Scotland" I want to list the folders on One Drive so that I can cross check that I have them all against a list of

[R] Availability of Sdatasets

2024-05-20 Thread Avro Alo via R-help
>From the mention in R-intro I went to look at The new S language book. In chapter 1 it has a lottery dataset. So naturally I thought it is pre-supplied with R. But I didn't fount, made a google search and found the package that has the dataset,

Re: [R] [External] Re: Removing polygons from shapefile of Scotland and Islands

2024-05-17 Thread Barry Rowlingson
Scotland is the second feature in the UK data, so get it and split this one MULTIPOLYGON feature into individual POLYGONS scot = st_cast(the_uk$geometry[2],"POLYGON") # which is the largest polygon? which.max(st_area(scot)) [1] 1 # the first one. ok... plot(scot[[1]]) # mainland # add the

Re: [R] Current version of R, 4.4.0 and patch to correct the bug fix related to the RStudio viewer pane on Windows systems

2024-05-17 Thread Vega, Ann (she/her/hers) via R-help
We are a government agency so it's an issue. But I appreciate your input and Duncan's as well. We have the answer we needed based on Duncan's response. Thank you for your time! av Ann Vega, PSPO She/Her/Hers (Learn More) Office of Science

Re: [R] Current version of R, 4.4.0 and patch to correct the bug fix related to the RStudio viewer pane on Windows systems

2024-05-16 Thread Ben Bolker
Yes, but this sounds more like a bureaucratic requirement ("all available patches must be installed") and less like something someone has thought through. It's conceivable that one might be able to talk to a security officer and convince them that this is not in fact an important issue,

Re: [R] Current version of R, 4.4.0 and patch to correct the bug fix related to the RStudio viewer pane on Windows systems

2024-05-16 Thread CALUM POLWART
Do you receive RDS objects from unknown (untrusted) sources? ?? If not - the security issue is a non-issue as I understand it. On Thu, 16 May 2024, 16:21 Vega, Ann (she/her/hers) via R-help, < r-help@r-project.org> wrote: > I help to coordinate the USEPA's R user group. We have over 500

Re: [R] Current version of R, 4.4.0 and patch to correct the bug fix related to the RStudio viewer pane on Windows systems

2024-05-16 Thread Duncan Murdoch
The developer.r-project.org site lists plans for releases, and no plan is in place yet for a 4.4.1 release. You can look at the history of previous versions if you want to make a guess: 4.3.1: June, 2023 4.2.1: June, 2022 4.1.1: August, 2021 4.0.1: June, 2020 3.6.1: July, 2019 3.5.1: July,

[R] Current version of R, 4.4.0 and patch to correct the bug fix related to the RStudio viewer pane on Windows systems

2024-05-16 Thread Vega, Ann (she/her/hers) via R-help
I help to coordinate the USEPA's R user group. We have over 500 members and our security officer has required us to update to R version 4.4.0 because of the security vulnerability to versions prior. However, we cannot download the patched version because it does not have a signed certificate

Re: [R] Least error-prone reading of Excel files?

2024-05-16 Thread Ebert,Timothy Aaron
https://www.r-bloggers.com/2021/06/reading-data-from-excel-files-xlsxlsxcsv-into-r-quick-guide/ Excel can hold a great quantity of data. However, I find that it is slow and often crashes when I try to use Excel at large scale. It also grinds my entire system to a halt. At the kb and mb scales I

[R] Least error-prone reading of Excel files?

2024-05-16 Thread DynV Montrealer
I'm tasked to read a table from an excel file and it doesn't mention which method to use. I went back some lessons ago and the 5 years old lesson mentioned to pick a package using the highest score the way of the attached (screenshot). Since there's no requirement of a method to read Excel files,

Re: [R] Extracting values from Surv function in survival package

2024-05-16 Thread CALUM POLWART
I don't think that gives the summary of event numbers without extra work. library(survival) fit <- survfit( Surv(time,status)~sex,data=lung) summary(fit)$n.event [1] 3 1 2 1 1 1 1 2 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 3 1 1 1 1 1 2 [38] 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

[R] [R-pkgs] segmented 2.1-0 is released

2024-05-16 Thread Vito Muggeo via R-packages
dear R users, I am pleased to announce that segmented 2.1-0 is now available on CRAN. segmented focuses on estimation of breakpoints/changepoints of segmented, i.e. piecewise linear, relationships in (generalized) linear models. Starting with version 2.0-0, it is also possible to model

Re: [R] Extracting values from Surv function in survival package

2024-05-16 Thread Göran Broström
Hi Dennis, look at the help page for summary.survfit, the Value n.event. Göran On 2024-05-15 22:41, Dennis Fisher wrote: OS X R 4.3.3 Colleagues I have created objects using the Surv function in the survival package: FIT.1 Call: survfit(formula = FORMULA1)

Re: [R] Extracting values from Surv function in survival package

2024-05-16 Thread CALUM POLWART
More difficult than it should be IMO. survminer package is often helpful. But if you want to avoid dependency: library(survival) fit <- survfit( Surv(time,status)~sex,data=lung) surfable <-summary(fit)$table surfable # just the events surfable[,"events"] On Wed, 15 May 2024, 21:42 Dennis

[R] Extracting values from Surv function in survival package

2024-05-15 Thread Dennis Fisher
OS X R 4.3.3 Colleagues I have created objects using the Surv function in the survival package: > FIT.1 Call: survfit(formula = FORMULA1) n events median 0.95LCL 0.95UCL SUBDATA$ARM=1, SUBDATA[, EXP.STRAT]=0 18 13345 156 NA SUBDATA$ARM=2,

[R] flexsurvspline with offset

2024-05-15 Thread Bonnett, Laura
Dear all, I am using R 4.4.0 via RStudio (2024.04.0) on a Windows PC. The code below worked on the previous version of the flexsurv but is not working since my recent update (version 2.3). The code that was working is: library(survival) rfs <- pmax(rotterdam$recur, rotterdam$death) rfstime

Re: [R] Removing polygons from shapefile of Scotland and Islands

2024-05-14 Thread Jan van der Laan
I believe mapshaper has functionality for removing small 'islands'. There is a webinterface for mapshaper, but I see there is also an R-package (see https://search.r-project.org/CRAN/refmans/rmapshaper/html/ms_filter_islands.html for island removal). If you want to manually select which

Re: [R] Altrep and translations (was " Description of error is untranslated when ....")

2024-05-14 Thread Ricardo Villalba
Hello On the other hand, i find that R_compact_intrange checks whether (r = n2 - n1 + 1) >= R_XLEN_T_MAX, while seq_colon checks for (r = fabs(n2 - n1)) >= R_XLEN_T_MAX. And only then n is defined as r + 1 + epsilon. r is not used again That is why seq_colon does not reject that size at first and

[R] Removing polygons from shapefile of Scotland and Islands

2024-05-14 Thread Nick Wray
Hello I have a shapefile of Scotland, including the islands. The river flow data I am using is only for the mainland and for a clearer and larger map I would like to not plot Orkney and Shetland to the north of the mainland, as I don't need them. The map I have I got from

[R] Altrep and translations (was " Description of error is untranslated when ....")

2024-05-14 Thread Martin Maechler
> Ivan Krylov via R-help > on Tue, 14 May 2024 08:08:58 +0300 writes: > Dear Ricardo Villalba, Thank you for spotting this corner > case! > В Mon, 13 May 2024 11:37:57 -0300 Ricardo Villalba > пишет: >> I track the messages to be coded here: >>

Re: [R] Description of error is untranslated when R_XLEN_T_MAX is exceeded by only 1 element.

2024-05-13 Thread Ivan Krylov via R-help
Dear Ricardo Villalba, Thank you for spotting this corner case! В Mon, 13 May 2024 11:37:57 -0300 Ricardo Villalba пишет: > I track the messages to be coded here: > https://github.com/r-devel/r-svn/blob/abe625945c4402cd2bb97b5a64e7469db3e904f0/src/main/altclasses.c#L580 > and here >

[ESS] ligatures in ESS

2024-05-13 Thread Hüsing , Johannes via ESS-help
Dear all, I declared some ligatures, which led tot he lines: '(ess-r-prettify-symbols '(("<-" . 8592) ("%>%" . 8658) ("%<>%" . 8660) ("%T>%" . 129107))) shown in the entry within (custom-set-variables). When opening an *.Rmd file, I see no effect of this declaration, the

Re: [R] test2r.mengz1(X)

2024-05-13 Thread Bert Gunter
... but maybe cocor() in the cocor package will do do what you want. -- Bert On Mon, May 13, 2024 at 1:57 PM Duncan Murdoch wrote: > > Google says that function is in the bcdstats package, which isn't on > CRAN. It appears to be a private package for a course, kept on Github. > > Duncan

Re: [R] test2r.mengz1(X)

2024-05-13 Thread Duncan Murdoch
Google says that function is in the bcdstats package, which isn't on CRAN. It appears to be a private package for a course, kept on Github. Duncan Murdoch On 2024-05-13 12:24 p.m., Alligand, Justine wrote: Dear participants and subscribers of the R-help mailing list, I would like to compare

[R] test2r.mengz1(X)

2024-05-13 Thread Alligand, Justine
Dear participants and subscribers of the R-help mailing list, I would like to compare two dependent correlations with one overlapping variable. The Meng Z1 method seemed suitable for this purpose. I found out that the "cocor" package is required for this instrument. I checked several times

Re: [R] [EXTERNAL] Re: duplicated() on zero-column data frames returns empty

2024-05-13 Thread Jorgen Harmse via R-help
Good luck! It looks like a significant effort for someone not already on the team. Regards, Jorgen Harmse. From: Mark Webster Date: Monday, May 13, 2024 at 04:07 To: Jorgen Harmse , Ivan Krylov Cc: r-help@r-project.org Subject: [EXTERNAL] Re: duplicated() on zero-column data frames returns

Re: [R] Description of error is untranslated when R_XLEN_T_MAX is exceeded by only 1 element.

2024-05-13 Thread Ricardo Villalba
Typo: *2^48 should be 2^52 El lun, 13 may 2024 a las 11:37, Ricardo Villalba () escribió: > Hello everyone > When asking to create sequence longer than 2^48 (which is forbidden) the > same error message appears translated and untranslated depending on whether > R_XLEN_T_MAX is reached or

[R] Description of error is untranslated when R_XLEN_T_MAX is exceeded by only 1 element.

2024-05-13 Thread Ricardo Villalba
Hello everyone When asking to create sequence longer than 2^48 (which is forbidden) the same error message appears translated and untranslated depending on whether R_XLEN_T_MAX is reached or exceeded while not an error o problem beyond that of the untranslated text, i find this weird. ¿could it be

Re: [R] Is there some way to customize colours for the View output?

2024-05-13 Thread Ivan Krylov via R-help
В Mon, 13 May 2024 06:08:22 -0400 Duncan Murdoch пишет: > The row and column names don't appear to be controllable from that > menu, they seem (on my machine) to be displayed in the same colour as > the background of a dialog box, i.e. some kind of gray. I don't > think R tries to control that

Re: [ESS] New Emacs? New ESS? New Emacs Modified distributions!

2024-05-13 Thread Hüsing , Johannes via ESS-help
Dear Vincent, I installed the package en passent while working, and was able to continue working without any problem, re-definition of paths or what have you. Many thanks for catering for our needs! Johannes Dr. Johannes Hüsing Epidemiologie Landeskrebsregister NRW gGmbH Gesundheitscampus

Re: [R] Is there some way to customize colours for the View output?

2024-05-13 Thread Duncan Murdoch
I just tried it on an old Windows computer. I don't see dataeditfg in the preferences menu; I think it is the internal variable name used for "dataedittext". The row and column names don't appear to be controllable from that menu, they seem (on my machine) to be displayed in the same colour

Re: [R] duplicated() on zero-column data frames returns empty

2024-05-13 Thread Mark Webster via R-help
> If you would like to try your hand at developing a patch and make a > case for it at R-devel or the Bugzilla, the resources at > can be helpful. I am attempting to get admitted onto the Bugzilla at the moment for the data frame cases, fingers crossed! Best

Re: [R] Is there some way to customize colours for the View output?

2024-05-13 Thread Iago Giné Vázquez
Hi all, I've just could test your suggestions on using dataedit... entries now, and indeed they work... partially. See, please, the next screenshot: https://ibb.co/Dkn2pVs dataedituser modifies the red borders dataedittext the yellow text dataeditfg... I do not know, specified to green the

Re: [R] duplicated() on zero-column data frames returns empty

2024-05-12 Thread Ivan Krylov via R-help
(Sorry for only getting back to this more than a month later.) В Mon, 8 Apr 2024 17:03:00 + Jorgen Harmse пишет: > What is the policy for changing something that is wrong? There is a > trade-off between breaking old code that worked around a problem and > breaking new code written by people

[ESS] New Emacs? New ESS? New Emacs Modified distributions!

2024-05-12 Thread Vincent Goulet via ESS-help
Hi folks, With the recent releases of GNU Emacs 29.3 and ESS 24.01.1 (yay!), I was due for updates of my Emacs Modified for (macOS|Windows) distributions. With the Winter semester ending, I finally had some time to devote to the project. I'm pleased to announce that versions 29.3-modified-1

Re: [R] R CMD check vs RStudio check

2024-05-10 Thread Ivan Krylov via R-help
В Fri, 10 May 2024 03:46:54 + "Boylan, Ross" пишет: > The devtools::check() documentation mentions it invoke > pkgbuild::build() and rcmdcheck::rcmdcheck(). Since I'm guessing my > command line build and check invoked those last 2, or at least > operated similarly, they seem less likely

Re: [R] Print date on y axis with month, day, and year

2024-05-10 Thread Rui Barradas
Às 00:58 de 10/05/2024, Sorkin, John escreveu: I am trying to use ggplot to plot the data, and R code, below. The dates (jdate) are printing as Mar 01, Mar 15, etc. I want to have the date printed as MMM DD (or any other way that will show month, date, and year, e.g. mm/dd/yy). How can I

Re: [R] R CMD check vs RStudio check

2024-05-09 Thread Boylan, Ross via R-help
Ivan, thank you for the tips; they allowed me to move on to the next problems. By building the tar file first and checking it later, and fixing several other problems I got R CMD check to work. It does *not* delete inst/doc. It also does not run boostrap.R, as far as I can tell, presumably

Re: [R] Print date on y axis with month, day, and year

2024-05-09 Thread Ben Bolker
gg0 <- ggplot(data=yyy[1:30,],aes(as.Date(jdate,format="%m-%d-%Y"),Sum)) +geom_point() gg0 + scale_x_date(date_labels = "%m/%d/%Y") On 2024-05-09 7:58 p.m., Sorkin, John wrote: I am trying to use ggplot to plot the data, and R code, below. The dates (jdate) are printing as Mar 01, Mar 15,

[R] Print date on y axis with month, day, and year

2024-05-09 Thread Sorkin, John
I am trying to use ggplot to plot the data, and R code, below. The dates (jdate) are printing as Mar 01, Mar 15, etc. I want to have the date printed as MMM DD (or any other way that will show month, date, and year, e.g. mm/dd/yy). How can I accomplish this? yyy <- structure(list(

Re: [R] Compilation problems with R4.4.0

2024-05-09 Thread Ivan Krylov via R-help
Glad you got R working! В Thu, 9 May 2024 12:19:49 + Simon Andrews пишет: > Does this need reporting upstream as a bug in R or lapack? Maybe in AlmaLinux (and I think RHEL9 too, but that's up to Miguel Esteva). Best case scenario, they somehow built the reference BLAS and LAPACK packages

Re: [R] Strange variable names in factor regression

2024-05-09 Thread Michael Dewey
Comment in in-line below On 09/05/2024 13:09, Naresh Gurbuxani wrote: On converting character variables to ordered factors, regression result has strange names. Is it possible to obtain same variable names with and without intercept? Thanks, Naresh mydf <- data.frame(date =

Re: [R] Strange variable names in factor regression

2024-05-09 Thread Duncan Murdoch
On 09/05/2024 8:09 a.m., Naresh Gurbuxani wrote: On converting character variables to ordered factors, regression result has strange names. Is it possible to obtain same variable names with and without intercept? You are getting polynomial contrasts with the ordered factor, because you have

Re: [R] Compilation problems with R4.4.0

2024-05-09 Thread Simon Andrews via R-help
Thank you! Installing openblas and then using ./configure --without-lapack --with-blas --enable-R-shlib ..got everything working. Does this need reporting upstream as a bug in R or lapack? I'm good now, but it might help others to get this fixed. Simon. -Original Message- From:

[R] Strange variable names in factor regression

2024-05-09 Thread Naresh Gurbuxani
On converting character variables to ordered factors, regression result has strange names. Is it possible to obtain same variable names with and without intercept? Thanks, Naresh mydf <- data.frame(date = seq.Date(as.Date("2024-01-01"), as.Date("2024-03-31"), by = 1)) mydf[, "wday"] <-

Re: [R] Using intervals() function for nlme model - Statistics Lab ETHZ

2024-05-09 Thread Ivan Krylov via R-help
Just one more thing: when you do find a solution, can you please share it with us? I do trust nlraa::boot_nlme() as it's been deliberately written for nonlinear mixed-effects models, but the fact that intervals() is inherited from the 'lme' class without any mention of nonlinear models in the

Re: [ESS] How to get working Rnw file name inside script

2024-05-08 Thread Susumu Tanimura via ESS-help
Hi Rrof. Goulet, Thank you very much for sharing the function. It works. Now I noticed that the return value of commandArgs() inside Rnw with ess includes a working Rnw file name. \begin{Schunk} \begin{Sinput} > commandArgs() \end{Sinput} \begin{Soutput} [1] "/usr/lib/R/bin/exec/R"

Re: [ESS] How to get working Rnw file name inside script

2024-05-08 Thread Vincent Goulet via ESS-help
I'm not sure this is what you're looking for, but here goes. I have been using the following function for a number of years to extract the name of the file from which Sweave is called. ### ### getSourceName() ### ## Extract the name of the file used in the command 'Sweave' calling ## this

Re: [R] Problem with creating a PCA graph in a loop

2024-05-08 Thread Gavin Duley
> On 8 May 2024, at 09:16, Ivan Krylov wrote: > > В Tue, 7 May 2024 16:57:14 +0200 > gavin duley пишет: > >> aes(label=current_rownames, >>colour=wine.data.filt$Treatment >> ) > > As you've noticed, aes() remembers variables by their name and > environment, not by value: Yes, it was

Re: [R] Using intervals() function for nlme model - Statistics Lab ETHZ

2024-05-08 Thread Bielakova Tatiana
Dear Ivan, thanks for the insights! This points us directly in the direction we need. Have a lovely day! Yours sincerely, Tatiana, Marvin & Paul from Statistics Lab From: Ivan Krylov Sent: Monday, May 6, 2024 4:24 PM To: Bielakova Tatiana Cc:

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Ivan Krylov via R-help
В Wed, 8 May 2024 16:59:25 + Simon Andrews пишет: > The lapack libraries are: > > $ rpm -qa | grep lapack > lapack-3.9.0-10.el9.x86_64 > lapack64_-3.9.0-10.el9.x86_64 > lapack64-3.9.0-10.el9.x86_64 > lapack-devel-3.9.0-10.el9.x86_64 Thanks for this information! I figured out I needed to

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Simon Andrews via R-help
Also just did a full errata update and retried the compilation. It failed exactly as before. -Original Message- From: Ivan Krylov Sent: 08 May 2024 16:09 To: Simon Andrews Cc: Simon Andrews via R-help ; Miguel Esteva Subject: Re: [R] Compilation problems with R4.4.0 В Wed, 8 May

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Simon Andrews via R-help
The lapack parts of the configure are: checking whether 'struct tm' includes tm_zone... yes checking whether 'struct tm' includes tm_gmtoff... yes checking for dgemm_ in -llapack... no checking for ATLAS routines in liblapack... no checking for dpstrf_ in -llapack... yes checking for liblapack

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Ivan Krylov via R-help
В Wed, 8 May 2024 14:25:08 + Simon Andrews пишет: > #8 0x73f87c0b in dgesv ( > n=12884901891, nrhs=4294967299, > a=, > lda=12884901891, ipiv=..., > b=, > ldb=12884901891, info=0 > ) at /usr/src/debug/lapack-3.9.0-10.el9.x86_64/SRC/dgesv.f:167 > #9 0x750b2a17 in La_solve

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Simon Andrews via R-help
Hi Ivan, Thanks for getting back to me and very happy to hear I'm not the only one who's seen this. I've run the command under the debugger and the backtrace is below. It's complaining about missing debuginfo packages, but I definitely installed them so I'm not sure why they're not being

Re: [R] Compilation problems with R4.4.0

2024-05-08 Thread Ivan Krylov via R-help
Dear Simon, В Wed, 8 May 2024 10:17:41 + Simon Andrews via R-help пишет: > I'm having a strange problem compiling R4.4.0 on an AlmaLinux9 box. > make[4]: Entering directory '/bi/apps/R/R-4.4.0/src/library/grDevices' > byte-compiling package 'grDevices' > > *** caught segfault *** >

[R] Compilation problems with R4.4.0

2024-05-08 Thread Simon Andrews via R-help
I'm having a strange problem compiling R4.4.0 on an AlmaLinux9 box. I've compiled previous versions OK on the same hardware/software (last was R4.3.2) but 4.4.0 is repeatedly failing. Configuration works OK. ./configure --prefix=/bi/apps/R/4.4.0 --enable-R-shlib R is now configured for

Re: [R] losing variable attributes when subsetting model.frame

2024-05-08 Thread Vito Muggeo via R-help
dear Duncan, Thank you very much for your quick reply. Very useful and also very elegant, I would add. Thanks again, kind regards, Vito Il 08/05/2024 14:06, Duncan Murdoch ha scritto: I would guess that subsetting uses [] indexing on each column, with a logical argument.  If that is true,

Re: [R] losing variable attributes when subsetting model.frame

2024-05-08 Thread Duncan Murdoch
On 08/05/2024 7:47 a.m., Vito Muggeo via R-help wrote: dear all, I have a simple function f() which, when included in model.frame() via the formula, returns the variable itself with some attributes. However when I specify the subset argument, the attributes get lost, apparently. I would like to

[R] losing variable attributes when subsetting model.frame

2024-05-08 Thread Vito Muggeo via R-help
dear all, I have a simple function f() which, when included in model.frame() via the formula, returns the variable itself with some attributes. However when I specify the subset argument, the attributes get lost, apparently. I would like to extract the attributes also when specifying the

Re: [R] Problem with creating a PCA graph in a loop

2024-05-08 Thread Ivan Krylov via R-help
В Tue, 7 May 2024 16:57:14 +0200 gavin duley пишет: > aes(label=current_rownames, > colour=wine.data.filt$Treatment > ) As you've noticed, aes() remembers variables by their name and environment, not by value: str(ggplot2::aes(label = foo)) # List of 1 # $ label: language ~foo # <--

Re: [R] Is there some way to customize colours for the View output?

2024-05-07 Thread Rolf Turner
On Tue, 7 May 2024 06:34:50 -0400 Duncan Murdoch wrote: > On 07/05/2024 6:31 a.m., Iago Giné Vázquez wrote: > > Thanks Duncan. > > > > I am currently on Windows. Is there any solution for it? > > Switch to Linux or MacOS? Fortune nomination! cheers, Rolf Turner -- Honorary Research

Re: [R] [R-sig-ME] lmer error: number of observations <= number of random effects

2024-05-07 Thread Bert Gunter
I think you should seek out a local statistician with whom to consult if at all possible, as the details of your research goals and the nature of the data you have to meet those goals matter and cannot be effectively discussed in a remote forum like this. That is, to be blunt, you seem to be risk

Re: [R] [R-sig-ME] lmer error: number of observations <= number of random effects

2024-05-07 Thread Srinidhi Jayakumar via R-help
Thank you very much for your responses! What if I reduce the model to modelLSI3 <- lmer(SA ~ Index1* LSI+ (1+LSI |ID),data = LSIDATA, control = lmerControl(optimizer ="bobyqa"), REML=TRUE). This would allow me to see the random effects of LSI and I can drop the random effect of age (Index1)

[R] Problem with creating a PCA graph in a loop

2024-05-07 Thread gavin duley
Hi all, I am having enormous problems with a loop that iterates over different levels in the factor wine.data$Time (levels T06, T09, and T12) and creates a PCA and graph for individuals at that time only. These graphs need to be accessible outside the loop, so I can combine them using

Re: [R] Is there some way to customize colours for the View output?

2024-05-07 Thread Ivan Krylov via R-help
В Tue, 7 May 2024 09:51:55 + Iago Giné Vázquez пишет: > In the View help, it is told that: > > On Windows, the initial size of the data viewer window is taken > from the default dimensions of a pager (see Rconsole), but adjusted > downwards to show a whole number of rows and columns.

Re: [R] Is there some way to customize colours for the View output?

2024-05-07 Thread Duncan Murdoch
On 07/05/2024 6:31 a.m., Iago Giné Vázquez wrote: Thanks Duncan. I am currently on Windows. Is there any solution for it? Switch to Linux or MacOS? Duncan Murdoch Best regards, Iago *De:* Duncan Murdoch *Enviat

Re: [R] Is there some way to customize colours for the View output?

2024-05-07 Thread Iago Giné Vázquez
Thanks Duncan. I am currently on Windows. Is there any solution for it? Best regards, Iago De: Duncan Murdoch Enviat el: dimarts, 7 de maig de 2024 12:24 Per a: Iago Gin� V�zquez ; r-help@r-project.org Tema: Re: [R] Is there some way to customize colours for

Re: [R] Is there some way to customize colours for the View output?

2024-05-07 Thread Duncan Murdoch
If you are using X11, then the paragraph on X resources is relevant. Create a file named .Xresources in your home directory, and put a line like R_dataentry.background: green in it. On my Mac, this has to be in place before Xquartz is started. There is probably a similar restriction on other

[R] Is there some way to customize colours for the View output?

2024-05-07 Thread Iago Giné Vázquez
Hi all, As the email subject tells, I write to ask if there is the chance to customize the colours (and in particular the background) of the `View` output window. In the View help, it is told that: On Windows, the initial size of the data viewer window is taken from the default

Re: [R] Using intervals() function for nlme model - Statistics Lab ETHZ

2024-05-06 Thread Ivan Krylov via R-help
Dear Tatiana, Marvin & Paul, If you don't get a better answer here, try r-sig-mixed-mod...@r-project.org. On Fri, 3 May 2024 11:29:19 + "Bielakova Tatiana" wrote: > Based on the documentation of nlme package, the function interval is > supported for gls, lme, and lmList classes. Although

Re: [R] Get a copy of a matrix only for TRUE entries of a matching size boolean matrix?

2024-05-06 Thread Martin Maechler
> DynV Montrealer > on Fri, 3 May 2024 10:39:10 -0400 writes: > It's exactly what I was looking for, thanks. I'm replying > to the whole list so others can skip this question, to not > waste time on it. good. > Bonne fin de journée de Montréal (nous sommes le matin

Re: [R] [R-sig-ME] lmer error: number of observations <= number of random effects

2024-05-06 Thread TT FF
See if this paper may help If it helps reducing the model when you have few observations. the (1|ID) may increase the type 1 error. https://journals.sagepub.com/doi/10.1177/25152459231214454 Best > On 6 May 2024, at 07:45, Thierry

[R] lmer error: number of observations <= number of random effects

2024-05-06 Thread Srinidhi Jayakumar via R-help
I am running a multilevel growth curve model to examine predictors of social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a continuous numeric variable. The age variable (Index1) has been coded as 0 for age 12, 1 for age 15 and 2 for age 18. I am currently using a time varying

Re: [R] [R-sig-ME] lmer error: number of observations <= number of random effects

2024-05-06 Thread Thierry Onkelinx via R-help
Dear Srinidhi, You are trying to fit 1 random intercept and 2 random slopes per individual, while you have at most 3 observations per individual. You simply don't have enough data to fit the random slopes. Reduce the random part to (1|ID). Best regards, Thierry ir. Thierry Onkelinx Statisticus

Re: [R] R CMD check vs RStudio check

2024-05-03 Thread Ivan Krylov via R-help
В Fri, 3 May 2024 19:45:08 + "Boylan, Ross via R-help" пишет: > & $R CMD check . > * checking for file './DESCRIPTION' ... ERROR > Required fields missing or empty: > 'Author' 'Maintainer' You're checking a source package directory. This could work, but it's much easier and more reliable

<    1   2   3   4   5   6   7   8   9   10   >