Re: [R] approxfun asymmetry

2025-07-05 Thread Jeff Newmiller via R-help
) * (0 - (-Inf)) / (1000 - (-Inf)) = 1 + 0 * Inf / Inf = 1 + NA / Inf = 1 + NA = NA Zero times infinity is undefined. [1] <https://en.m.wikipedia.org/wiki/Linear_equation> On July 4, 2025 3:50:26 AM PDT, "Timothy Earl (Cefas) via R-help" wrote: >Hi, > >I

[R] approxfun asymmetry

2025-07-04 Thread Timothy Earl (Cefas) via R-help
r Environment, Fisheries and Aquaculture Science may be monitored in line with relevant UK legislation . <https://www.gov.uk/government/organisations/centre-for-environment-fisheries-and-aquaculture-science/about/personal-information-charter> ______ R-hel

Re: [R] Merging matrices of different rows

2025-06-29 Thread Jeff Newmiller via R-help
gt;> [4,]4 10 >> [5,]5 11 >> [6,]6 12 >> > b<-matrix(5:12,nrow=4); b >> [,1] [,2] >> [1,]59 >> [2,]6 10 >> [3,]7 11 >> [4,] 8 12 >> > cbind.fill(a,b) >> Error in cbind.fill(

Re: [R] code for drawing the R logo

2025-06-29 Thread Robert Baer via R-help
Not an expert, but from my read of the explanation you linked, the .svg IS the source.  You could think of it as the source for .svg render engines, On 6/27/2025 12:16 PM, Ranjan Maitra via R-help wrote: Hi, Is there code for drawing the R logo? https://www.r-project.org/logo/ has the logo

[R] code for drawing the R logo

2025-06-28 Thread Ranjan Maitra via R-help
Hi, Is there code for drawing the R logo? https://www.r-project.org/logo/ has the logo in svg and png formats, and also the terms of the license, but I can not find code to draw this. Many thanks and best wishes, Ranjan __ R-help@r-project.org

Re: [R] Potential bug in readLines when reading empty lines

2025-06-27 Thread Jeff Newmiller via R-help
gt;rare either. > >If R *did* guess from the first line, then the second line would not disappear. > >On Thu, 26 Jun 2025 at 04:58, Jeff Newmiller via R-help > wrote: >> >> Indeed, the documentation appears to be incorrect... it is literally >> impossible for the fun

Re: [R] Potential bug in readLines when reading empty lines

2025-06-27 Thread Marttila Mikko via R-help
rpreted as LF, LF, LF. I believe that accounts for the extra new line on MacOS (and Linux) and in binary mode on Windows, but leaves the disappearing line in text mode on Windows a bit of a mystery still. Best, Mikko [1]: https://github.com/wch/r-source/blob/ff4be744953e2702f4194f01f669b7c93b44933e

Re: [R] Converting dataframe to matrix

2025-06-26 Thread Jeff Newmiller via R-help
o accommodate all of these possibilities, throwing an error if any >> entry does not conform to any of the possibilities that you envisage. >> >> cheers, >> >> Rolf Turner >> >> -- >> Honorary Research Fellow >> Department of Statistics >> U

Re: [R] Does this exist: diff(range(VAR, na.rm=T))

2025-06-25 Thread JRG via R-help
a major addition but often > > useful. > > > > Dennis > > > > Dennis Fisher MD > > P < (The "P Less Than" Company) > > Phone: 1-415-307-4791 > > www.PLessThan.com > > > > [[alternative HTML version deleted]] > > ___

Re: [R] Potential bug in readLines when reading empty lines

2025-06-25 Thread Heuvel, E.G. van den (Guido) via R-help
-Oorspronkelijk bericht- Van: Enrico Schumann Verzonden: woensdag 25 juni 2025 16:44 Aan: Heuvel, E.G. van den (Guido) CC: 'r-help@R-project.org' Onderwerp: Re: [R] Potential bug in readLines when reading empty lines [Externe email] Quoting "Heuvel, E.G. van de

Re: [R] Potential bug in readLines when reading empty lines

2025-06-25 Thread Heuvel, E.G. van den (Guido) via R-help
, it appears to not be working correctly. -Oorspronkelijk bericht- Van: Jeff Newmiller Verzonden: woensdag 25 juni 2025 16:10 Aan: Heuvel, E.G. van den (Guido) ; Heuvel, E.G. van den (Guido) via R-help ; 'r-help@R-project.org' Onderwerp: Re: [R] Potential bug in readLines when re

Re: [R] Potential bug in readLines when reading empty lines

2025-06-25 Thread Jeff Newmiller via R-help
pe of generic line end >handling algorithm that you describe. However, it appears to not be working >correctly. > >-Oorspronkelijk bericht- >Van: Jeff Newmiller >Verzonden: woensdag 25 juni 2025 16:10 >Aan: Heuvel, E.G. van den (Guido) ; Heuvel, E.G. van >den (Guido

Re: [R] Potential bug in readLines when reading empty lines

2025-06-25 Thread Jeff Newmiller via R-help
e this and submit a suggestion/patch to R and hope someone agrees that such a change won't cause more havoc than it avoids for other users. But that would be unlikely to happen in a timely fashion for your current needs. On June 24, 2025 11:59:58 PM PDT, "Heuvel, E.G. van den (Guido) via

[R] Potential bug in readLines when reading empty lines

2025-06-25 Thread Heuvel, E.G. van den (Guido) via R-help
ow should I read test.txt in such a way that the empty 2nd line is left intact? Best regards, Guido van den Heuvel Statistics Netherlands __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/

Re: [R] From strings to column names

2025-06-18 Thread Ivan Krylov via R-help
ice1 = paste0(var, '1_price'), price2 = paste0(var, '2_price'), volume1 = paste0(var, '1_volume'), volume2 = paste0(var, '2_volume') ) ] -- Best regards, Ivan ______ R-help@r-project.org mailing list -- To U

[R] Exp and Log are much slower on Windows than on other OSes.

2025-06-16 Thread Don van den Bergh via R-help
fix or avoid it? Most of our software's users (and I bet R's users as well) use Windows so this has quite an impact. Kind regards, Don [[alternative HTML version deleted]] ______ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

Re: [R] Some general comments -- Pascal

2025-06-15 Thread JRG via R-help
be > > done internally within the shell script that speed up many things. The UNIX > > pipelines helped make fairly complex things seem almost routine to write > > this way. A new language, perhaps somewhat based on R, might do well if it > > did not do everything but a

Re: [R] Some general comments

2025-06-14 Thread Ivan Krylov via R-help
Dear data analyst (or small investor?), В Fri, 13 Jun 2025 11:49:37 + (UTC) Small Investor via R-help пишет: > 1. Version compatibility issues seem to be on the rise. Very > often, you get the message that package x was built on R version y > (and thus, won't work in your vers

Re: [R] Some general comments

2025-06-13 Thread Jeff Newmiller via R-help
r. On June 13, 2025 7:49:37 AM EDT, Small Investor via R-help wrote: >Dear R community, >I have been using R for over 15 years. I want to raise an issue which has been >haunting me for some time now: It feels as if R is falling apart. I try to >justify this feeling by providing thre

[R] Some general comments

2025-06-13 Thread Small Investor via R-help
her people feel the same way, but I think I am shifting away from R. yours best,a data analyst dude [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] How to stratify data with multiple group simultaneously with R ggplot2?

2025-06-08 Thread Jeff Newmiller via R-help
aes(x=x, y=y, colour=w, group=w)) + > geom_line(linewidth=2) + > ggtitle("A+B") >ggplot(df[df$z=="A",], aes(x=x, y=y, colour=w, group=w)) + > geom_line(linewidth=2) + > ggtitle("A") >ggplot(df[df$z=="B",], aes(x=x, y=y, colour=w, group=w

[R] Repository of Examples and Problems from Lock5 textbook

2025-06-01 Thread Kevin Zembower via R-help
answers against those given in the book for almost all the problems. Let me know if you think this repository could be improved in any way. Thank you to all the folks who helped me better understand statistics and how to compute them with R. -Kevin ______

Re: [R] Simulating mid-points from a defined range

2025-05-31 Thread JRG via R-help
M Brian Smith briansmith199...@gmail.com >>> wrote: >>> >>> > Hi, >>> > >>> > Let say I have a range [0, 100] >>> > >>> > Now I need to simulate 1000 10 mid-points within the range with >>> > accuracy upto

Re: [R] Simulating mid-points from a defined range

2025-05-31 Thread JRG via R-help
ence between any 2 > > consecutive mid-points shall be at-least 5.00. > > > > I wonder if there is any Statistical theory available to support this > > kind of simulation. > > > > Alternately, is there any way in R to implement this? > > > > _

Re: [R] Simulating mid-points from a defined range

2025-05-31 Thread Jeff Newmiller via R-help
t; >> I wonder if there is any Statistical theory available to support this >> kind of simulation. >> >> Alternately, is there any way in R to implement this? >> >> __ >> R-help@r-project.org mailing list -- To UNSUBSCR

Re: [R] Failed to convert text to date

2025-05-31 Thread Jeff Newmiller via R-help
Could you please help why I am getting NA value? > >__ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide https://www.R-project.org/posting-guide.html >and provide

Re: [R] constructing a matrix for rgl plots

2025-05-31 Thread Jeff Newmiller via R-help
ould still have your x and y partition variables from when you created the data frame, and you should be able to construct the matrix using the matrix() constructor (not the as.matrix function) from your data frame z column. ?matrix On May 31, 2025 4:04:20 AM PDT, ravi via R-help wrote: >H

[R] constructing a matrix for rgl plots

2025-05-31 Thread ravi via R-help
phi = 20) :   At least one coordinate must be a matrix  How do I get z in the form of a matrix? Thanks. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Need r help asap

2025-05-30 Thread Jeff Newmiller via R-help
desperate to get it back. > >Hannah >Sent from my iPhone >__ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide https://www.R-project.

Re: [R] Looking for a function or a set of steps

2025-05-29 Thread Mike Day via R-help
gt; Paul Zachos, PhD >> Director, Research and Evaluation >> Association for the Cooperative Advancement of Science and Education >> (ACASE) >> 110 Spring Street Saratoga Springs, NY 12866 | >> p...@acase.org | www.acase.org >> >> >> >&g

[R] Only one label from axis() is shown

2025-05-28 Thread Marc Girondot via R-help
or  4 minor  5.0 year   2025 month  05 day    16 svn rev    88216 language   R version.string R version 4.5.0 Patched (2025-05-16 r88216) nickname   How About a Twenty-Six ----

Re: [R] how to read a PSB file in R?

2025-05-27 Thread Ranjan Maitra via R-help
On Tue May20'25 12:15:41AM, Ranjan Maitra via R-help wrote: > From: Ranjan Maitra via R-help > Date: Tue, 20 May 2025 00:15:41 -0500 > To: r-help@r-project.org > Reply-To: Ranjan Maitra > Subject: Re: [R] how to read a PSB file in R? > > On Tue May20'25 05:56:59A

Re: [R] how to read a PSB file in R?

2025-05-26 Thread Ranjan Maitra via R-help
On Tue May20'25 12:15:41AM, Ranjan Maitra via R-help wrote: > From: Ranjan Maitra via R-help > Date: Tue, 20 May 2025 00:15:41 -0500 > To: r-help@r-project.org > Reply-To: Ranjan Maitra > Subject: Re: [R] how to read a PSB file in R? > > On Tue May20'25 05:56:59A

Re: [R] Looking for a function or a set of steps

2025-05-26 Thread paul zachos via R-help
t; 1-x > >> On 18.05.2025, at 19:40, paul zachos via R-help wrote: >> >> Dear R Community >> >> I am an R beginner >> >> I have a vector of ‘1’s and ‘0’s >> >> x >> [1] 0 0 1 0 0 1 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 0 0 >> [28] 0

Re: [R] Formatting zeroes with prettyNum

2025-05-23 Thread Marttila Mikko via R-help
(In hindsight I should have used a `zero.print` value that looked less like a typo, e.g. `zero.print = "--"` in my example. Sorry about the potential confusion.) -Original Message----- From: R-help On Behalf Of Marttila Mikko via R-help Sent: Friday, 23 May 2025 13:21 To: How

Re: [R] Formatting zeroes with prettyNum

2025-05-23 Thread Marttila Mikko via R-help
place = TRUE) [1] " " Warning message: In .format.zeros(x, zero.print, replace = replace.zero) : 'zero.print' is truncated to fit into formatted zeros; consider 'replace=TRUE' When zero.print is only one character, it doesn't give a warning. Tim >

Re: [R] Formatting zeroes with prettyNum

2025-05-23 Thread Howard, Tim G (DEC) via R-help
zero.print = " - ", replace = TRUE) [1] " " Warning message: In .format.zeros(x, zero.print, replace = replace.zero) : 'zero.print' is truncated to fit into formatted zeros; consider 'replace=TRUE' When zero.print is only one character, it doesn'

[R] Formatting zeroes with prettyNum

2025-05-23 Thread Marttila Mikko via R-help
ribution, or reliance upon the contents of this e-mail is strictly prohibited. If you have received this e-mail transmission in error, please reply to the sender, so that they can arrange for proper delivery, and then please delete the message from your computer systems. Thank you.

Re: [R] Why is there no macro facility for R?

2025-05-22 Thread Marc Schwartz via R-help
mericans Independence Center; >> Senior Statistician University of Maryland Center for Vascular Research; >> >> Division of Gerontology and Paliative Care, >> 10 North Greene Street >> GRECC (BT/18/GR) >> Baltimore, MD 21201-1524 >> Cell phone 443-418

Re: [R] Looking for a function or a set of steps

2025-05-19 Thread Goodale, Tom via R-help
Surely doing y <- 1 - x would be the simplest way? Best, Tom > -Original Message- > From: R-help On Behalf Of Rui Barradas > Sent: 19 May 2025 08:08 > To: paul zachos ; r-help@r-project.org > Subject: Re: [R] Looking for a function or a set of steps > > Às 1

Re: [R] how to read a PSB file in R?

2025-05-19 Thread Ranjan Maitra via R-help
On Tue May20'25 05:56:59AM, Rui Barradas wrote: > From: Rui Barradas > Date: Tue, 20 May 2025 05:56:59 +0100 > To: Ranjan Maitra , r-help@r-project.org > Subject: Re: [R] how to read a PSB file in R? > > Às 03:17 de 20/05/2025, Ranjan Maitra via R-help escreveu: > >

[R] how to read a PSB file in R?

2025-05-19 Thread Ranjan Maitra via R-help
file. Many thanks and best wishes, Ranjan __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented

[R] Very odd issue getting "Input/output error" running shiny app from index.html locally but same shiny on my server working fine

2025-05-19 Thread Chris Evans via R-help
<https://www.coresystemtrust.org.uk/> Other work web site: https://www.psyctc.org/psyctc/ Personal site: https://www.psyctc.org/pelerinage2016/ <https://ombook.psyctc.org/book> __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see http

Re: [R] Very odd issue getting "Input/output error" running shiny app from index.html locally but same shiny on my server working fine

2025-05-19 Thread Chris Evans via R-help
and then in a browser I enter the URL http://localhost:8787/ HTH, Eric On Mon, May 19, 2025 at 6:01 PM Chris Evans via R-help wrote: I realise that shiny and Rstudio is often seen as OT here but I have a strong suspicion that the issue is R or R/OS related so

[R] Looking for a function or a set of steps

2025-05-18 Thread paul zachos via R-help
like to generate a new vector in which the ‘1’s in x become ‘0’s and the ‘0’s in x become ‘1’s. How should I go about this? Thank you, paz __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] customizing library locations for R in ubuntu

2025-05-15 Thread ravi via R-help
lbuettel wrote: On 9 May 2025 at 16:41, Ivan Krylov via R-help wrote: | This is not guaranteed to work, especially for (but not limited to) | packages that compile source code and link to various interfaces inside | R: https://stat.ethz.ch/pipermail/r-help/2025-April/480832.html | | This problem

Re: [R] customizing library locations for R in ubuntu

2025-05-15 Thread ravi via R-help
on the terminal? What is a simple test to determine that I have the r2u up and running? Thanks, Ravi On Wednesday, 14 May 2025 at 13:53:26 CEST, Dirk Eddelbuettel wrote: On 9 May 2025 at 16:41, Ivan Krylov via R-help wrote: | This is not guaranteed to work, especially for (but not limite

[R] Different output type with as.Date

2025-05-15 Thread Barthelemy Tanguy via R-help
Date(0L, origin = "1970-01-01") |> typeof() #> [1] "double" ``` Is it a bug or the intended behaviour? I don't see any mention of this in the documentation. I'm working on R 4.5 Thank you! Tanguy BARTHELEMY __ R-h

Re: [R] customizing library locations for R in ubuntu

2025-05-14 Thread ravi via R-help
Thanks to Jeff and Ivan for your helpful comments. Ravi On Saturday, 10 May 2025 at 11:37:29 CEST, Ivan Krylov wrote: В Thu, 8 May 2025 19:39:40 + (UTC) ravi via R-help пишет: > In windows, I add the following line: > .libPaths(c(“C:/Rownlib”,”C:/R/R-4.5.0/library”)) >    

Re: [R] missing value where TRUE/FALSE needed with R ipolygrowth

2025-05-09 Thread Jeff Newmiller via R-help
ative numbers into powers or log or sqrt... kind of things. Read the documentation for your analysis packages carefully. On May 9, 2025 2:31:29 AM PDT, Luigi Marongiu wrote: >Dear R-Help, >I am trying to determine the growth rate of bacteria under specific >conditions using >ipo

Re: [R] customizing library locations for R in ubuntu

2025-05-09 Thread Ivan Krylov via R-help
В Thu, 8 May 2025 19:39:40 + (UTC) ravi via R-help пишет: > In windows, I add the following line: > .libPaths(c(“C:/Rownlib”,”C:/R/R-4.5.0/library”)) >   in the file C:/R/R-4.5.0/etc/Rprofile.site > > I have my own list of packages in the Rownlib folder and the packages &

Re: [R] empty `Rscript -e "Rcpp:::LdFlags()"` prevents installation

2025-05-09 Thread Ralf Goertz via R-help
ive())" and the problem is gone. The reason the "$()" variant worked is probably due to some subtle differences between the two. <https://mywiki.wooledge.org/BashFAQ/082> ______ R-help@r-project.org mailing list -- To UNSUBSCRIBE and m

[R] empty `Rscript -e "Rcpp:::LdFlags()"` prevents installation

2025-05-09 Thread Ralf Goertz via R-help
27;s guidelines should address this? __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, mi

Re: [R] customizing library locations for R in ubuntu

2025-05-08 Thread Jeff Newmiller via R-help
s the packages that are "built-in" to R. On May 8, 2025 12:39:40 PM PDT, ravi via R-help wrote: >Hi, >In Windows, I follow a method with customized library locations that has >worked for me when upgrading to new R versions.  I have not been able to >follow the same method in U

[R] customizing library locations for R in ubuntu

2025-05-08 Thread ravi via R-help
d also appreciate explanations for why the library system in ubuntu is structured in the way it is. Thanks, Ravi __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] Help merging large datasets in R

2025-05-08 Thread Jeff Newmiller via R-help
g does not corrupt your code example. On May 6, 2025 11:53:42 PM PDT, "Deelen, M. (Mirjam) via R-help" wrote: >Hi guys, >For my MSc. thesis i am using R studio. The goal is for me to merge a couple >(6) of relatively large datasets (min of 200.000 and max of 2mil rows). I

Re: [R] Help merging large datasets in R

2025-05-07 Thread Jeff Newmiller via R-help
set. Try merging that where it is easy to check. Then expand to using all >the data. Your approach should work with a little modification. Alternatively >make a couple of small fake data sets and play with those. Once you have the >code correct there should be no problem expanding to the

[R] Help merging large datasets in R

2025-05-07 Thread Deelen, M. (Mirjam) via R-help
(so I can drop the additonal criteria and the final amount of cases, probably, increases). * Or are there any tips as to figure out where in these steps cases are lost ? Thanks! Mirjam [[alternative HTML version deleted]] __ R-help@r-proje

[R] OT: A philosophical question about statistics

2025-05-06 Thread Gregg Powell via R-help
> > they’re more common in teaching. Meanwhile, classic Normal and t > > methods aren’t going away – they’re fundamental and still useful. > > Future students will continue to learn both, getting the best of both > > worlds. > > > > Good luck in your studies! >

Re: [R] OT: A philosophical question about statistics

2025-05-06 Thread Kevin Zembower via R-help
; Thank you very much for your time and effort in answering my > questions. > I really appreciate the thoughts of the members of this group. > > -Kevin > > > > ______ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see h

Re: [R] OT: A philosophical question about statistics

2025-05-06 Thread Kevin Zembower via R-help
what > assumption or which test is problematic and why? > > Tim __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] OT: A philosophical question about statistics

2025-05-06 Thread Kevin Zembower via R-help
till useful. > Future students will continue to learn both, getting the best of both > worlds. > > Good luck in your studies! > gregg ______ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] OT: A philosophical question about statistics

2025-05-06 Thread Kevin Zembower via R-help
the easiest and quickest part. Thank you again, Bert, for replying. I always enjoy your contributions to this group. -Kevin ______ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] non-reproducible eigen() output with MKL

2025-05-06 Thread smallepsilon via R-help
ago where this was discussed: > > https://www.stat.math.ethz.ch/pipermail/r-help/2023-August/477904.html > > I generally use: > > export OPENBLAS_NUM_THREADS=1 > export MKL_NUM_THREADS=1 > > since in my experience the biggest performance gains come from switching to

[R] OT: A philosophical question about statistics

2025-05-05 Thread Gregg Powell via R-help
going away – they’re fundamental and still useful. Future students will continue to learn both, getting the best of both worlds. Good luck in your studies! gregg On Monday, May 5th, 2025 at 8:17 AM, Kevin Zembower via R-help wrote: > > > I marked this posting as Off Topic because i

[R] OT: A philosophical question about statistics

2025-05-05 Thread Kevin Zembower via R-help
much for your time and effort in answering my questions. I really appreciate the thoughts of the members of this group. -Kevin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] non-reproducible eigen() output with MKL

2025-05-04 Thread smallepsilon via R-help
if you have eigenvalues that are almost > identical, though.) > > -pd > > > On 4 May 2025, at 17.57, smallepsilon via R-help r-help@r-project.org wrote: > > > > I am using MKL with R 4.5.0 on Linux, and eigen() is producing different > > results with identical calls.

[R] Estimating regression with constraints in model coefficients - Follow-up on Constrained Ordinal Model — Optimized via COBYLA

2025-05-04 Thread Gregg Powell via R-help
PM, Gregg Powell via R-help wrote: > > > Hello Christofer, > > That’s good information. Thanks for the precision. > Think I can use this now to work on a script: > > Based on what you provided: > 1. Two distinct sets of coefficients, β¹ and β², each associated with

[R] non-reproducible eigen() output with MKL

2025-05-04 Thread smallepsilon via R-help
et.seed(20250504) Sigma <- rWishart(1, df = n, Sigma = diag(n))[,,1] e1 <- eigen(Sigma) e2 <- eigen(Sigma) identical(e1, e2) ______ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Estimating regression with constraints in model coefficients

2025-05-01 Thread Gregg Powell via R-help
t; > > > > > nloptr::nloptr() with a manually coded log-likelihood function > > > > > > > > for the cumulative logit model. > > > > > > > > > > Since you need: > > > > > > > > > > Coefficient bounds (e.g., lb ≤

Re: [R] Overnight Cluster (Whitepaper)?

2025-04-30 Thread Jeff Newmiller via R-help
t;Is there a vendor who sells a plug-and-play solution to this problem? I am >guessing we are not unusual in a setup like this, though an upper price >bound on the software here is of course just the cost of buying a giant >homogeneous computer or using Amazon resources. > >Po

Re: [R] Overnight Cluster (Whitepaper)?

2025-04-30 Thread Ivan Krylov via R-help
memory and CPU core limits, but it might be unable to save you from inefficient job plans. See 'future.batchtools' for an example of an R interface for cluster job submission systems. -- Best regards, Ivan [1] https://github.com/BOINC/boinc/wiki/BOINC-apps-(introduction) __

Re: [R] return inconsistency?

2025-04-30 Thread Jeff Newmiller via R-help
alternate return values to a local variable along different execution paths and require all execution paths to reach the end of the function where that variable name is alone on the last line. On April 30, 2025 2:15:02 AM PDT, Ralf Goertz via R-help wrote: >I made a stupid error w

Re: [R] return inconsistency?

2025-04-30 Thread Ivan Krylov via R-help
On Wed, 30 Apr 2025 11:15:02 +0200 Ralf Goertz via R-help wrote: > If this is not an error what is its purpose? >From the point of view of the R syntax, everything is an expression. One of the uses of return() being an expression is base::callCC(). The ability to use it inside an expr

[R] return inconsistency?

2025-04-30 Thread Ralf Goertz via R-help
ariant (which returns the value of the numerator only) not a syntax error? I would have expected R to report something like > Error: unexpected '/' in "return(OR^2+6*OR+1)/" If this is not an error what is its purpose? ______ R-help@r-p

Re: [R] Estimating regression with constraints in model coefficients

2025-04-29 Thread Gregg Powell via R-help
; > > Equality constraint: sum(β) = C > > > > > > > > C. Likelihood > > > > > > The probability of category k is given by: > > > > > > > > P(Y = k) = logistic(θ_k - Xβ) - logistic(θ_{k-1} - Xβ) > > > > > > > > Without intercepts, this becomes more like: > > > > > > > > P(Y ≤ k) = 1 / (1 + exp(-(c_k - Xβ))) > > > > > > > > …where c_k are fixed thresholds. > > > > > > > > Implementation using nloptr > > > > > > This example shows a rough sketch using nloptr, which allows both > > > > > > equality and bound constraints: > > > > > > > > > library(nloptr) > > > > > > > > > # Custom negative log-likelihood function > > > > > > > negLL <- function(beta, X, y, K, cutpoints) { > > > > > > > eta <- X %*% beta > > > > > > > loglik <- 0 > > > > > > > for (k in 1:K) { > > > > > > > pk <- plogis(cutpoints[k] - eta) - plogis(cutpoints[k - 1] - eta) > > > > > > > loglik <- loglik + sum(log(pk[y == k])) > > > > > > > } > > > > > > > return(-loglik) > > > > > > > } > > > > > > > > > # Constraint: sum(beta) = C > > > > > > > sum_constraint <- function(beta, C) { > > > > > > > return(sum(beta) - C) > > > > > > > } > > > > > > > > > # Define objective and constraint wrapper > > > > > > > objective <- function(beta) negLL(beta, X, y, K, cutpoints) > > > > > > > eq_constraint <- function(beta) sum_constraint(beta, C = 2) # > > > > > > > example >C > > > > > > > > > # Run optimization > > > > > > > res <- nloptr( > > > > > > > x0 = rep(0, ncol(X)), > > > > > > > eval_f = objective, > > > > > > > lb = lower_bounds, > > > > > > > ub = upper_bounds, > > > > > > > eval_g_eq = eq_constraint, > > > > > > > opts = list(algorithm = "NLOPT_LD_SLSQP", xtol_rel = 1e-8) > > > > > > > ) > > > > > > > > The next step would be writing the actual log-likelihood for your > > > > > > specific problem or verifying constraint implementation. > > > > > > > > Manually coding the log-likelihood for an ordinal model is > > > > > > nontrivial... so a bit of a challenge :) > > > > > > > > All the best, > > > > > > gregg powell > > > > > > Sierra Vista, AZ signature.asc Description: OpenPGP digital signature __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide https://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Possible bug in gzcon() (6161:src/main/connections.c)

2025-04-26 Thread Ivan Krylov via R-help
9.csv.gz") calls file(), which can transparently switch to a gzfile() connection, which supports concatenated archives, but gzcon() currently doesn't. Feature request submitted at <https://bugs.r-project.org/show_bug.cgi?id=18887>. -- Best regards, Ivan _

Re: [R] 4.5.0: Do NOT just copy library folder and update.packages()

2025-04-25 Thread Jeff Newmiller via R-help
if there is only one folder for packages under 4.X... where >any version of R $.X... would load from there the packages? > >Thanks > >Fer > >On 4/25/25 11:16, Peter Dalgaard via R-help wrote: >> A couple of people have gotten themselves in trouble by copying the contents

[R] 4.5.0: Do NOT just copy library folder and update.packages()

2025-04-25 Thread Peter Dalgaard via R-help
.5.0. One of them has tools in the 4.4 library and the other does not. I have no clue what the difference might be -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd@c

Re: [R] How to find inverse of glm model?

2025-04-24 Thread Gregg Powell via R-help
nt"), lin)) : > > > NA/NaN/Inf in foreign function call (arg 5) > > > ``` > > > How can I properly set this regression model? > > > Thank you > > > > > On Wed, Apr 16, 2025 at 7:08 AM Luigi Marongiu marongiu.lu...@gmail.com > &g

Re: [R] Estimating regression with constraints in model coefficients

2025-04-24 Thread Gregg Powell via R-help
- function(beta, X, y, K, cutpoints) { > > > > > eta <- X %*% beta > > > > > loglik <- 0 > > > > > for (k in 1:K) { > > > > > pk <- plogis(cutpoints[k] - eta) - plogis(cutpoints[k - 1] - eta) > > > > > loglik <

Re: [R] How to find inverse of glm model?

2025-04-23 Thread Gregg Powell via R-help
& Statistics > > > University of Melbourne, VIC 3010 Australia > > > Tel: (+61) 0403 138 955 > > > Email: a...@unimelb.edu.au > > > Website: https://researchers.ms.unimelb.edu.au/~apro@unimelb/ > > > > > > I acknowledge the Traditional Ow

Re: [R] Estimating regression with constraints in model coefficients

2025-04-23 Thread Gregg Powell via R-help
; > > eq_constraint <- function(beta) sum_constraint(beta, C = 2) # example >C > > > > > > # Run optimization > > > res <- nloptr( > > > x0 = rep(0, ncol(X)), > > > eval_f = objective, > > > lb = lower_bounds, > > >

Re: [R] Estimating regression with constraints in model coefficients

2025-04-21 Thread Jeff Newmiller via R-help
gt;> >eq_constraint <- function(beta) sum_constraint(beta, C = 2) # example >C >> > >> ># Run optimization >> >res <- nloptr( >> > x0 = rep(0, ncol(X)), >> > eval_f = objective, >> > lb = lower_bounds, >> > ub = uppe

Re: [R] Estimating regression with constraints in model coefficients

2025-04-21 Thread Gregg Powell via R-help
implementation. Manually coding the log-likelihood for an ordinal model is nontrivial... so a bit of a challenge :) All the best, gregg powell Sierra Vista, AZ signature.asc Description: OpenPGP digital signature ______ R-help@r-project.org mailing

Re: [R] problem with my base_df function ?

2025-04-16 Thread varin sacha via R-help
the following error , at the following point in the code ..." ) On 2025-04-16 12:11 p.m., varin sacha via R-help wrote: > R-experts, > > The R script here below. > > How to solve my problem ? > > Best, > > > ## > # Load packa

[R] problem with my base_df function ?

2025-04-16 Thread varin sacha via R-help
 df_sample <- sample_n(base_df, n)   result <- gfci(data = df_sample, test = "kci", score = "sem-bic")   plot(result, main = paste("n =", n)) } #####   __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and mo

Re: [R] How to find inverse of glm model?

2025-04-15 Thread Andrew Robinson via R-help
y of Melbourne, VIC 3010 Australia Tel: (+61) 0403 138 955 Email: a...@unimelb.edu.au Website: https://researchers.ms.unimelb.edu.au/~apro@unimelb/ I acknowledge the Traditional Owners of the land I inhabit, and pay my respects to their Elders. On 16 Apr 2025 at 1:01 AM +1000, Gregg Powell via R-

Re: [R] How to find inverse of glm model?

2025-04-15 Thread Gregg Powell via R-help
Norm[df$Norm<0] = 0 b_model = glm(Norm ~ Cycles, data=df, > family=binomial) plot(Norm ~ Cycles, df, main="Normalized view", > xlab=expression(bold("Time")), ylab=expression(bold("Signal (normalized)")), > type="p", col="cyan") lines

Re: [R] Drawing a sample based on certain condition

2025-04-15 Thread Jeff Newmiller via R-help
ng execution >time? Are you planning on looking at all t and T within a range? > >Tim > >-Original Message- >From: R-help On Behalf Of Bert Gunter >Sent: Monday, April 14, 2025 4:16 PM >To: Duncan Murdoch >Cc: r-help@r-project.org >Subject: Re: [R] Drawing a sa

Re: [R] An opinion question, please

2025-04-10 Thread Jeff Newmiller via R-help
S3 or S4 structure, please? > >I know I will get lots of opinions, but that’s fine. > >Thanks, >Erin > > >Erin Hodgess, PhD >mailto: erinm.hodg...@gmail.com > > [[alternative HTML version deleted]] > >__ &g

[R] Error in running get_acs()

2025-04-09 Thread Deana Kittaneh via R-help
mats. In addition: Warning message: In unzip(file_loc, exdir = tmp) : error 1 in extracting from zip file Error: Your geometry data download failed. Please try again later or check the status of the Census Bureau website at https://www2.census.gov/geo/tiger/ _

Re: [R] Estimating regression with constraints in model coefficients

2025-04-08 Thread Gregg Powell via R-help
pose certain constraints on each of the > model parameters, based on some non-sample information. > > Is there any R function to estimate model coefficients with imposing > some unser-defined constraints on the model parameters? > > Any pointer will be very helpful. >

Re: [R] Request to Unsubscribe from R Forum Replies

2025-04-07 Thread David Winsemius via R-help
gards, > >[[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.R-project.org/pos

Re: [R] Setting up hypothesis tests with the infer library?

2025-04-05 Thread Kevin Zembower via R-help
all been simulations, bootstraps, randomized distributions, etc. Thank you, again, Rui and Michael, for your help for me. -Kevin On Sat, 2025-03-29 at 16:42 +, Rui Barradas wrote: > Às 16:09 de 29/03/2025, Kevin Zembower via R-help escreveu: > > Hello, all, > > > > We'r

Re: [R] Setting up hypothesis tests with the infer library?

2025-03-31 Thread Kevin Zembower via R-help
hough. Tastes > will > vary. > > In dplyr style, add a column and use it in slice: > > df <- expand.grid(year=c(1980, 2010), DP=c("Approve", "Disapprove")) > %>% >     mutate(freq = c(660, 640, 1000-660, 1000-640)) %>% >     slice(rep(1:n

Re: [R] Setting up hypothesis tests with the infer library?

2025-03-29 Thread David Winsemius via R-help
> On Mar 29, 2025, at 9:59 AM, Kevin Zembower via R-help > wrote: > > Hi, Rui and Michael, thank you both for replying. > > Yeah, I'm not supposed to know about Chi-squared yet. So far, all of > our work with hypothesis tests has involved creating the sample dat

[R] Setting up hypothesis tests with the infer library?

2025-03-29 Thread Kevin Zembower via R-help
ble to do something like this: = (df <- data.frame(group1count = 660, #Or, group1prop = 0.66 group1samplesize = 1000, group2count = 640, #Or, group2prop = 0.64 group2samplesize = 1000)) = Am I overlooking a way to

[R] 3 way crosstable not working

2025-03-25 Thread varin sacha via R-help
quot;female","male","female","male","male")   color=c("red","blue","green","green","blue","red","blue","green","red","blue") data<- data.frame(statut, sex,color)   

Re: [R] PLOTTING ODE MODEL RESULTS USING PLOT.DESOLVE FROM THE DESOLVE PACKAGE

2025-03-25 Thread Jeff Newmiller via R-help
rvations. I checked the >vignettes but did not see this incorporated. > >Mariam. > > [[alternative HTML version deleted]] > >__ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/ma

  1   2   3   4   5   6   7   8   9   10   >