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

2025-04-07 Thread David Winsemius via R-help
You need to unsubscribe yourself using the instructions at the list info page. You should be getting month reminder emails that include your password. None of the volunteer mods are able to access that password. — David. Sent from my iPhone > On Apr 7, 2025, at 4:23 AM, Loop Vinyl wr

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

2025-03-29 Thread David Winsemius via R-help
upport for the original edition of Chihara and Hesterberg: "Mathematical Statistics with Resampling and R, 3rd Edition (2022)". -- David. > > The prop.test() would work. obviously. I'll look into that. I didn't > know about it. > > I'm really s

Re: [R] Test For Difference of Betas By Group in car

2025-01-19 Thread David Winsemius via R-help
Sent from my iPhone > On Jan 19, 2025, at 2:48 PM, David Winsemius wrote: > >  > Sent from my iPhone > >> On Jan 19, 2025, at 1:57 PM, David Winsemius wrote: >> >> I don’t understand why you don’t include the full text of the error. >> >>

Re: [R] Test For Difference of Betas By Group in car

2025-01-18 Thread David Winsemius via R-help
Sent from my iPhone > On Jan 19, 2025, at 1:57 PM, David Winsemius wrote: > > I don’t understand why you don’t include the full text of the error. > > — > David > Sent from my iPhone > >> On Jan 19, 2025, at 10:00 AM, Sparks, John via R-help >> wrot

Re: [R] Test For Difference of Betas By Group in car

2025-01-18 Thread David Winsemius via R-help
I don’t understand why you don’t include the full text of the error. — David Sent from my iPhone > On Jan 19, 2025, at 10:00 AM, Sparks, John via R-help > wrote: > > Hello R-Helpers, > > I was looking into how to test whether the beta coefficient from a regression >

Re: [R] R Processing dataframe by group - equivalent to SAS by group processing with a first. and retain statments

2024-11-27 Thread David Winsemius via R-help
On 11/27/24 09:44, David Winsemius via R-help wrote: On 11/27/24 08:30, Sorkin, John wrote: I am an old, long time SAS programmer. I need to produce R code that processes a dataframe in a manner that is equivalent to that produced by using a by statement in SAS and an if first.day statement

Re: [R] R Processing dataframe by group - equivalent to SAS by group processing with a first. and retain statments

2024-11-27 Thread David Winsemius via R-help
ID: 3 [1] 3 3 So all you need to do from there is unlist it and assign to the new named column #-- olddata$FirstDay <- unlist( by(olddata, olddata["ID"], FUN= function(x) { rep( x$ID[1], times=nrow(x) )}) ) olddata # ID date FirstDay

Re: [R] R Processing dataframe by group - equivalent to SAS by group processing with a first. and retain statments

2024-11-27 Thread David Winsemius via R-help
the `date` column to be repeated withing the indexed group so here's the correct code: > olddata$FirstDay <- unlist( by(olddata, olddata["ID"], FUN= function(x) { rep( x$date[1], times=nrow(x) )}) ) > olddata ID date FirstDay 1 1 1 1 2 1 1 1 3 1 2 1 4 1 2 1 5 1 3 1

Re: [R] Convert string to date time

2024-11-26 Thread David Winsemius via R-help
ds to stay in there because you have a bunch of them in htat format then you need to add the appropriate format string. --- David x <- as.POSIXct(x,tz=Sys.timezone()) x but this did not work; the time portion was ignored. I suspect the problem is the _ between the date and time, but

Re: [R] Using multiple dat files

2024-11-06 Thread David Winsemius via R-help
ows |time.scale = YEAR| And there does not appear to be any definition of what the value of `YEAR` is supposed to be. It appears to me that you have been assigned a task in a poorly documented package. Contact the package author. -- David. Kind regards Sibylle ___

[R] The RV coinertia coefficient to interpret multivariate analysis plots

2024-10-13 Thread David Bars
normalization methods compared) are identical and the same for the db-RDA plots.. This scenario tells me something at a theorically level? Why could obtain 1 for PCoA and db-RDA and not for sPLS-DA? Thanks on advance for your comments... David [[alternative HTML version deleted

Re: [R] How to install this package

2024-10-03 Thread David Winsemius via R-help
ieve that xts objects store that sort of information in their attributes. Look at the results of attr(dt_ts) In the future you should not ask unrelated questions without changing the subject line to reflect the new topic area. And you should stop posting in HTML. — David > -

Re: [R] Prediction from Arima model

2024-08-31 Thread David Winsemius via R-help
e it makes sense to output a confidence interval when you are projecting a time series. If you wanted a confidence interval on the past data then you can just use standard descriptive methods. — David. > > I also wanted to get the estimate of SE for the new value which is > used to obta

Re: [R] checking for unstated dependencies in examples ... ERROR

2024-08-25 Thread DAVID WINSEMIUS via R-help
anyone help on this? I doubt anyone can help with such scanty information about how this problem comes about. I don't think there's an "ubuntu" package, but rather that you are on a Linux box. Do you actually have a file named "lines"? Have you looked for a s

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 Kap

Re: [R] Question regarding reservoir volume and water level

2024-04-09 Thread David Stevens via R-help
an idea of the shape and then use lm(Elevation~f(Storage) where f(Storage) may be a cubic or quartic polynomial. Then double the Storage and calculate Elevation. This type of thing is done everyday by hydrologists. Good luck David K Stevens, PhD, PE, Professor Civil and Environmental

[R] Default t test in R is Welch's test, not Student's, and can be very problematic

2024-03-04 Thread Curtis, David
#x27;s test instead, by using t.test(x, y, var.equal = TRUE). Code to demonstrate the problem and play around with different scenarios, as described in the paper, is at: https://github.com/davenomiddlenamecurtis/TestTTest Regards * Dave Curtis -- Professor David Curtis MD PhD UCL Ge

Re: [R] igraph_vertex

2024-02-24 Thread David Winsemius
in that replacement the error I got was: network <- graph_from_data_frame(edge_list, directed= FALSE, + vertices = details) #Error: object 'details' not found Same conclusion, though. Incomplete presentation of code. -- David. Anyway, the error is produced by this line: +

Re: [R] igraph_vertex

2024-02-24 Thread David Winsemius
output versions of code since that will insert lots of superfluous "+"'s. Some but not all API will be able to strip those characters. -- David. On 2/24/24 03:09, SIBYLLE STÖCKLI via R-help wrote: Dear R-community It would be nice to get some input how to find a s

Re: [R] Rtools and things dependent on it

2024-02-23 Thread David Winsemius
Sent from my iPhone > On Feb 23, 2024, at 18:19, Sorkin, John wrote: > > David, > > I greatly appreciate the explanation you gave regarding R tools providing > tools available in Linux distros, but not found in Windows. (I am using a > windows system). Does this

Re: [R] Rtools and things dependent on it

2024-02-23 Thread David Winsemius
On 2/23/24 16:28, Sorkin, John wrote: > David, > My apologies regarding the format of my email. I am replying using my > iPhone, and I can’t find a way to switch from what I suspect is html > to txt format. > The link you sent told me that R tools allows compilation

Re: [R] Rtools and things dependent on it

2024-02-23 Thread David Winsemius
know what I should do, other than down load R tools. https://cran.r-project.org/bin/windows/base/howto-R-devel.html And do configure your client to send only plain-text. -- David. John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of

Re: [R] Rtools and things dependent on it

2024-02-23 Thread David Winsemius
g pieces of information: Operating system, R version, Rtools version, current location of Rtools, names of packages and where they were obtained. Regards and good luck; David (a.k.a IRTFM) > Avi > > [[alternative HTML version deleted]] Rhelp is a plain text mailing list. You should c

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

2023-12-08 Thread David Winsemius
lements. If you wanted to maintain the same structure, your first step might be to coerce to a data.frame and then proceed, or to first construct a vector and then use as the first argument to `matrix`. Best; David Thank you, John John David Sorkin M.D., Ph.D. Professor of Medicine

Re: [R] How can I remove my packages from rdrr.io?

2023-11-01 Thread David Winsemius
be many other sites that hold most or all of the extensive list of CRAN packages, although it is certainly true that rrio.io has become a favorite of Google. -- David > Thank you. > > [[alternative HTML version deleted]] > > __ &

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-31 Thread David Winsemius
et classed object. If the OP had left out the second use of predict and then subtracted predictLasso from the y vector a result would have appeared y=T[-sam,]$y MSE = mean((y-predictLasso)^2) ... > mean(unlist(lst)) [1] 23.39621 Whether this is meaningful is hard to tell. It also makes the fundament

[R] Virus alert because of an R-help e-mail

2023-10-31 Thread David Croll
I just received a virus warning from my e-mail provider, GMX. See the attached image below. The virus detection can be spurious - but the e-mail was automatically deleted by GMX. With the best regards, David __ R-help@r-project.org mailing list

[R] How to fix this problem

2023-09-25 Thread Parkhurst, David
I have a matrix, KD6, and I�m trying to get a correlation matrix from it. When I enter cor(KD6), I get the message �Error in cor(KD6) : 'x' must be numeric�. Here are some early lines from KD6: Flow E..coliTNSRP TPTSS 1 38.82,4201.65300 0.0270 0.0630 66.

Re: [R] RQuantLib installation problem

2023-09-24 Thread David Winsemius
$ R CMD INSTALL. You can find details at the r help page ` ?INSTALL -- David dyld[29996]: Library not loaded: /usr/local/opt/gcc/lib/gcc/11/libgfortran.5.dylib Referenced from: <383F3774-06DE-3792-AA2C-C9D6B37A2D89> /usr/local/Cellar/r/4.1.2/lib/R/lib/libR.dylib So you're installin

[R] Odd result

2023-09-24 Thread Parkhurst, David
? David [[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 http://www.R-project.org/posting-guide.html and provide

Re: [R] predict function type class vs. prob

2023-09-23 Thread David Winsemius
r") {     warning("kernlab class prediction calculations failed; returning NAs")     out <- rep("", nrow(newdata))     out[seq(along = out)] <- NA     }     }     else {     if (class(out)[1] == "try-error") {     warning("kernlab

Re: [R] predict function type class vs. prob

2023-09-23 Thread David Winsemius
::lev(obj)[apply(kernlab::predict(obj, x, type = "probabilities"), 1, which.max)] } else pred <- kernlab::predict(obj, x) pred } out <- try(svmPred(modelFit, newdata), silent = TRUE) if (is.character(kernlab::lev(modelFit))) { if (class(out)[1] == "try-error") { warning("ker

[R] How to import an excel data file

2023-09-23 Thread Parkhurst, David
I know I should save it as a .csv file, which I have done. I�m told I should use the read_excel() function from the readxl package. My question is, how do I express the location of the file. The file is named KurtzData.csv. Its location in my Mac files is DFPfiles/ae/FriendsMonroe/KurtzData.csv H

Re: [R] col2rgb() function

2023-07-23 Thread David Stevens via R-help
e transparent version is tcol <- paste0(col,"4d") This would work in one step on a whole palette. David David K Stevens, PhD, PE, Professor Civil and Environmental Engineering Utah Water Research Laboratory Utah State University 8200 Old Main Hill Logan, UT 84322-8200 david.stev...@us

Re: [R] how to change the y-axis to logarithmic in a barplot ggplot

2023-07-16 Thread David Winsemius
og(mean) ` + theme_bw() + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) + theme(legend.position = c(0.45, 0.85), legend.title = element_blank()) + scale_fill_brewer(palette = "Dark2") + scale_color_brewer(palette = "Dark2") -- David. I wou

Re: [R] log transform a data frame

2023-06-13 Thread David Carlson via R-help
Try this pdf("~/graph.pdf") par(mar=c(8, 4, 4, 2)) barplot(d2, legend= c("SYCL", "CUDA"), beside= TRUE,las=2,cex.axis=0.7,cex.names=0.7,ylim=c(0,80), col=c("#9e9ac8", "#6a51a3")) dev.off() See ?par to see the details for adjusting margins and oth

Re: [R] log transform a data frame

2023-06-13 Thread David Carlson via R-help
etter handled with box plots or strip charts. Do not use printouts of your data since it hides important information. Use str(a11) and dput(a11) or dput(head(a11)) to provide useful information about your data. David L Carlson Texas A&M University On Tue, Jun 13, 2023 at 4:08 PM Ana Mari

Re: [R] InformationValue package

2023-05-26 Thread David Winsemius
If it was in CRAN you will find it in the Archives. Sent from my iPhone > On May 26, 2023, at 1:37 PM, Jeff Reichman wrote: > > R Help > > > > > > There use to be a package called "InformationValue" which was used to > calculate the optimal probability cutoff for a ROC plot. That packag

Re: [R] Split String in regex while Keeping Delimiter

2023-04-12 Thread David Winsemius
is inconsistent with effective use of R. If so, learn to use a proper programming editor, and in any case learn to post to rhelp in plain text. -- David scan(text=gsub("([-+]){1}\\s", "\\1\n", dat), what="", sep="\n") > On Apr 12, 2023, at 2:29 AM

Re: [R] simultaneous confidence intervals for multinomial proportions: sample size

2023-04-09 Thread David Winsemius
size of the sample in each category in any case. So I'm wondering if your failure at searching derives from the impossibility of your goal. Why would you desire such a result? -- David. > I would be very grateful for any suggestion. > > > Many thanks in advance! > > Claudi

Re: [R] "prob" package alternative

2023-04-06 Thread David Winsemius
y might have even had binaries. I'll check. Yep, they do have source and binaries. So that might be the easiest. You could try just this: install.packages("fAsianOptions", repo="http://cran.nexr.com/";, dependencies=TRUE) -- David. > particularly if you are > on W

Re: [R] R does not run under latest RStudio

2023-04-06 Thread David Winsemius
t you can certainly submit to the Q&A forum. -- David Steven from iPhone On Apr 6, 2023, at 6:22 PM, Uwe Ligges wrote: No, but you need to ask on an RStudio mailing list. This one is about R. Best, Uwe Ligges On 06.04.2023 11:28, Steven T. Yen wrote: I updated to latest RStudio

Re: [R] Problems with foreign

2023-03-30 Thread David Winsemius
uot; ; value alcgp 1 = "0-39g/day" 2 = "40-79" 3 = "80-119" 4 = "120+" ; value tobgp 1 = "0-9g/day" 2 = "10-19" 3 = "20-29" 4 = "30+" ; DATA rdata ; INFILE &

[R] Bug in internal 'tar' implementation?

2023-01-31 Thread David Engster
re instead. This leads to 'tar tf' jumping over too many blocks after displaying the link filename and hence aborting. While I'm aware the 'tar()' help says to avoid links for portability reasons, it also says that it supports symbolic links on OSes that support them, which

Re: [R] Failing to install the rgl package

2023-01-26 Thread David Winsemius
l XQuartz,  then reinstall or update Java, and finally update all your installed packages including rgl and then give it another go. Finally, this is Rhelp. There is a SIG for R-Mac users. This question would have been more on-topic for  that help mailing list. -- David /Library/Framewo

Re: [R] Plotmath isn't working for special characters

2023-01-25 Thread David Stevens
A more extensive test (no=produced an empty box on the plot, yes=produced the intended plotmath result). It appears that plotmath is not producing the special math characters. Greek symbols are produced. I'll try to reinstall R and report back. David plot(1,1, main = parse(text = &q

[R] Plotmath isn't working for special characters

2023-01-24 Thread David Stevens
t="x >= y")) Has anyone else seen this? best David -- David K Stevens, PhD, PE, Professor Civil and Environmental Engineering Utah Water Research Laboratory Utah State University 8200 Old Main Hill Logan, UT 84322-8200 david.stev...@usu.edu (435) 797-3229 (office) __

Re: [R] Error 3221226505

2022-12-18 Thread David Winsemius
x27;s I what I remember from my Windows daze. You should also review the Win-R-FAQ which I think has similar advice. -- David On 12/18/22 16:20, Jeff Newmiller wrote: Doesn't happen to me. On December 16, 2022 12:44:17 AM PST, "Mathurin, Gottfried via R-help" wrote: Hello, I

[R] [R-pkgs] onetime 0.1.0: Run Code Only Once

2022-12-09 Thread David Hugh-Jones
ages for new users, or to do other one-off actions. Documentation is available at https://hughjonesd.github.io/onetime/. Cheers, David [[alternative HTML version deleted]] ___ R-packages mailing list r-packa...@r-project.or

Re: [R] What is new in R especially about Tidyverse.

2022-11-29 Thread David Winsemius
The OP should familiarize him/her-self with the `news()` function. It would allow reading what the authors of packages including those of the base packages have to say about material changes. #First, type: ?news #Then perhaps: news(package="R") news(package="tidyverse")

[R] unmet dependency for r-base-core ... was Re: ubuntu 22

2022-11-14 Thread David Winsemius
note that the proper mailing list (also plain text) would have been R-SIG-debian. -- David. > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the pos

Re: [R] Logistic regression for large data

2022-11-11 Thread David Winsemius
That’s not a large data set. Something else besides memory limits is going on. You should post output of summary(Base). — David Sent from my iPhone > On Nov 11, 2022, at 11:29 PM, George Brida wrote: > > Dear R users, > > I have a database called Base.csv (attached to th

Re: [R] Plotting a triangular prism

2022-11-10 Thread David Winsemius
One might think that after all these years you would have understood that “it’s not working” is an excessively imprecise description of, well, anything. Also html is deprecated severely on Rhelp. — David. Sent from my iPhone > On Nov 10, 2022, at 5:46 PM, Erin Hodgess wrote: > &g

Re: [R] Is this *always* the intended R^2 value for no intercept in lm?

2022-11-06 Thread David Winsemius
required by theory in your domain of investigation, you are advised to avoid such a practice. — David. Sent from my iPhone > On Nov 5, 2022, at 12:41 PM, Bert Gunter wrote: > > FAQ 7.41 > and > https://stackoverflow.com/questions/57415793/r-squared-in-lm-for-ero-intercept-mo

Re: [R] Associate a .R file with the RGui

2022-11-05 Thread David Winsemius
guidance on the fine details. -- David. Thanks, Amarjiit On 5 Nov 2022, at 15:03, Jeff Newmiller wrote: RGui is not an editor. It is a console (aka REPL, https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop). When using RGui, it is up to you to edit your R file in an

Re: [R] [EXT] Re: Linestring values to vector

2022-10-21 Thread David Stevens
vertices lines(sfp$X],sfp$Y,col='red',lwd=2) David David K Stevens, PhD, PE, Professor Civil and Environmental Engineering Utah Water Research Laboratory Utah State University 8200 Old Main Hill Logan, UT 84322-8200 david.stev...@usu.edu (435) 797-3229 (office) On 10/21/2022 12:01 PM, J

Re: [R] Reading Text files from UK Met Office into R again...

2022-10-12 Thread David Winsemius
6 NA NA $ V15 : int 8 NA NA NA $ V16 : int NA 8 NA NA $ V17 : int NA 8 NA NA $ V18 : logi NA NA NA NA $ V19 : logi NA NA NA NA $ V20 : int 100 8 NA NA #snipped about 80 lines ... $ V99 : num 91.7 NA NA NA [list output truncated] ALWAYS use a programming editor and always post i

Re: [R] Help with steam graph

2022-10-02 Thread David Winsemius
hering" process seems to have removed the `com_name` column. Can exit R without saving your workspace and then construct a series of R commands that will create a reproducible example? -- David. On 10/2/22 10:03, Tariq Khasiri wrote: Actually in my main data the column name is com_num (

Re: [R] Help with steam graph

2022-10-02 Thread David Winsemius
I don’t see a column with the name ‘com_num’, so the error message makes complete sense. — David Sent from my iPhone > On Oct 2, 2022, at 5:06 AM, Tariq Khasiri wrote: > > Hi, i'm trying to create a steamgraph with the following data by creating a > unit indicator by com

Re: [R] Need help plotting

2022-09-20 Thread Parkhurst, David
go out as plain text. Is that true for this response, or is it in HTML? From: Rui Barradas Date: Tuesday, September 20, 2022 at 4:52 AM To: Jim Lemon , Parkhurst, David , r-help mailing list Subject: Re: [R] Need help plotting Hello, Now with data, here are base R and ggplot2 plots.

Re: [R] Converting time format

2022-09-19 Thread Parkhurst, David
Thank you. From: Rui Barradas Date: Monday, September 19, 2022 at 1:28 PM To: Parkhurst, David , R-help@r-project.org Subject: Re: [R] Converting time format Hello, I will run the examples below with the following data: x <- c("12:00", "12:15", "12:30",

Re: [R] Converting time format

2022-09-19 Thread Parkhurst, David
Thank you. I�ll see what I can do with that. From: Rui Barradas Date: Monday, September 19, 2022 at 1:28 PM To: Parkhurst, David , r-help@r-project.org Subject: Re: [R] Converting time format Hello, I will run the examples below with the following data: x <- c("12:00", &q

Re: [R] Need help plotting

2022-09-19 Thread Parkhurst, David
aes(y=NO2, x=datetime)) + geom_point() > > That will be a start as a scatterplot, but the graph can be customized or > changed if scatterplot was not desired. > > Tim > > -Original Message- > From: R-help On Behalf Of Parkhurst, David > Sent: Sunday, September 18, 2

[R] Converting time format

2022-09-19 Thread Parkhurst, David
I have a dataframe obtained using read.csv from an excel file. Its first column is times, running from 18:00 to 19:30. If I want to plot other columns against time, do I need to convert those somehow, and how would I do that? If I run plot(b$time,b$myvar) I get a decent plot, but a friend sugg

[R] Need help plotting

2022-09-19 Thread Parkhurst, David
I�ve been retired since �06 and have forgotten most of R. Now I have a use for it, with some data from Bloomington�s Environmental Commission. I have a dataframe (obtained from read.csv) that contains numerous columns, including time (in Excel�s 18:00 format), and DNO2, and MNO2 from two air q

Re: [R] Remove line from data file

2022-09-19 Thread Parkhurst, David
mean by �value to delete�? Could that just be a row number? I was wanting to delete something like the 18th row in the dataframe? From: CALUM POLWART Date: Sunday, September 18, 2022 at 7:25 AM To: Parkhurst, David Cc: R-help@r-project.org Subject: Re: [R] Remove line from data file From the

[R] Remove line from data file

2022-09-18 Thread Parkhurst, David
I’ve been retired since ‘06 and have forgotten most of R. Now I have a use for it. I’ve created a data file and need to delete one row from it. How do I do that? DFP (iPad) __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https:/

Re: [R] Interpreting fa.diagram from package psych

2022-09-11 Thread David Winsemius
some sort of stable synthetic construct.  It's a rather theory-free strategy and so trying to assign labels automatically would be difficult. -- David Tim -Original Message- From: R-help On Behalf Of Luigi Marongiu Sent: Sunday, September 11, 2022 3:02 AM To: David Winsem

Re: [R] confidence intervals

2022-09-08 Thread David Winsemius
The first article had no code and did not describe a formula that I could find which matched your code. The second article is behind a paywall. — David. Sent from my iPhone > On Sep 3, 2022, at 3:39 PM, Bogdan Tanasa wrote: > >  > Dear Aaron, David, and everyone, > > T

Re: [R] About spDataLarge Package

2022-08-29 Thread David Winsemius
not require compilation. At any rate there are two other options at that page and you might want to investigate them. -- David. I tried with earlier versions of R (4.2.0 and 4.0.3) but I keep getting the same error. I was searching to see if I could obtain information regarding the R version or

Re: [R] confidence intervals

2022-08-27 Thread David Winsemius
s resource? -- David. On 8/26/22 17:55, Bogdan Tanasa wrote: Dear all, Although I know that it is not a statistics mailing list, given my work on ICeChIP https://github.com/shah-rohan/icechip/blob/master/Scripts/computeHMDandError I would appreciate to have the answer to a question : given two

Re: [R] Odd behavior of a function within apply

2022-08-09 Thread David Carlson via R-help
Could you have columns that are not character or integer so that y is never defined in the function? count1a(1:5/3) Error in count1a(1:5/3) : object 'y' not found David Carlson On Mon, Aug 8, 2022 at 1:35 PM Erin Hodgess wrote: > OK.⁠​ I'm back again.⁠​ So my test1.⁠​df i

Re: [R] Predicted values from glm() when linear predictor is NA.

2022-07-27 Thread David Winsemius
every case with that level of the interaction. The `predict.glm` function always requires a complete set of values to construct a case. Whether apparent incremental linear prediction of that interaction term is large or small will depend on the degree of independent contribution of the surrogate leve

Re: [R] Does the function "c" have a character limit?

2022-07-12 Thread David Winsemius
On 7/12/22 23:26, David Winsemius wrote: I think the restriction is not specific to `c` but rather is a limitation on the length of expressions. My foggy memory is that the limit is in the 450-500 character vicinity. Pretty sure it’s been discussed here in the past. One way to get around

Re: [R] Does the function "c" have a character limit?

2022-07-12 Thread David Winsemius
I think the restriction is not specific to `c` but rather is a limitation on the length of expressions. My foggy memory is that the limit is in the 450-500 character vicinity. Pretty sure it’s been discussed here in the past. — David. Sent from my iPhone > On Jul 12, 2022, at 11:13

Re: [R] printing with bothe print and cat...

2022-07-09 Thread David Winsemius
If spaces needed. In first sequences then paste( 1:5, collapse=“ “) Sent from my iPhone > On Jul 9, 2022, at 9:59 AM, David Winsemius wrote: > > Skip the for loops: > > cat(paste( seq(1:5), ““, 1:5) ) > > — > David > > Sent from my iPhone > >

Re: [R] printing with bothe print and cat...

2022-07-09 Thread David Winsemius
Skip the for loops: cat(paste( seq(1:5), ““, 1:5) ) — David Sent from my iPhone > On Jul 9, 2022, at 9:47 AM, akshay kulkarni wrote: > > Dear members, > I have the following code: > > testprint <- function() { > > for(i in 1:

Re: [R] if zlib version >= 1.2.5... no

2022-05-30 Thread David Winsemius
Pasting a prior posted thread on the R-Mac list: Ah, well, I see now that libR.dylib was not built or linked in tools.so simply because I had not configured with --enable-R-shlib ... 'make' succeeds but only when I build R as a shared library. The dlopen error isn't seen in the nightly builds, wh

Re: [R] categorizing data

2022-05-29 Thread David Carlson via R-help
ot; "Low" [5,] "High" "Low" "Med" [6,] "High" "Med" "Low" table(apply(rnks, 1, paste, collapse="/")) High/Low/Med High/Med/Low Low/High/Med Low/Med/High Med/High/Low Med/Low/High 66

Re: [R] Suggestions as to how to proceed would be appreciated...............

2022-05-22 Thread David Winsemius
There are several CRAN Task Views. Some of them should intersect with your question. I don’t think your description of the problem suggest that multivariate correlation is the best approach. Some sort of optimization or numerical simulation would seem to be more fruitful. — David Sent from

Re: [R] How to obtain named vector from single-column data frame?

2022-05-06 Thread David Carlson via R-help
Just use names(unlist(df[, "VarY", drop=FALSE])) # [1] "VarY1" "VarY2" "VarY3" "VarY4" "VarY5" When you extract a single column from a data frame it converts it to a vector by default. David L Carlson On Fri, May 6, 2022 at 1:05 PM

Re: [R] legend in plot

2022-05-06 Thread David Carlson via R-help
t;, legend = c("x", expression(x^2)), lty = lns, col = clr, bty = "n") David L Carlson legend("bottomright", legend = c("x", expression(x^2)), lty = lns, col = clr, bty = "n") On Thu, May 5, 2022 at 4:56 PM Jim Lemon wrote: > Hi Naresh, Have a l

Re: [R] installing an R package

2022-04-28 Thread David Winsemius
Pretty sure the right way to install that package is with the Bioc installer. Sent from my iPhone > On Apr 28, 2022, at 3:35 PM, Bogdan Tanasa wrote: > > HI everyone, > > I must transfer a package from one platform (AWS) where I was able to > install the package > > to another platform (loc

Re: [R] Model To Simulate Dice Roll

2022-04-22 Thread David Carlson via R-help
u so much David! El El vie, 22 de abr. de 2022 a la(s) 11:04 p. > m., David Carlson escribió: Since the rolls are > independent, it is not necessary to separate the rolls into two stages: > sides <- 6 ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ > ZjQcmQRYFpfptBannerStart > This Message Is From an External Send

Re: [R] What is the intended behavior, when subsetting using brackets [ ], when the subset criterion has NA's?

2022-04-06 Thread David Winsemius
r:Either of these should succeed: my_subset_criteria <- c( F, F, T, NA, NA) my_subset_criteria # OR my_subset_criteria <- c( F, F, T, NA, NA) ; my_subset_criteria (The original poster had the correct syntax.) -- David Error: unexpected symbol in " my_subset_criteria <- c

Re: [R] ggplot2

2022-04-04 Thread David Winsemius
acOS or Windows may need this to prevent the sort of error message that was offered. -- David library(ggplot2) An alternative install.packages("tidyverse") library(tidyverse) The first only installs ggplot2. The alternative installs a bunch of other stuff as well. Tim -Original M

Re: [R] Question About lm()

2022-02-09 Thread David Winsemius
The models are NOT equivalent. Why would you’ll think they were? — David Sent from my iPhone > On Feb 9, 2022, at 11:10 PM, Bromaghin, Jeffrey F via R-help > wrote: > > Hello, > > I was constructing a simple linear model with one categorical (3-levels) and > one q

Re: [R] Row exclude

2022-01-30 Thread David Carlson via R-help
You need to add "-": ` (dat3 <- dat1[-unique(c(BadName, BadAge, BadWeight)), ])` which makes the command NOT). David On Sun, Jan 30, 2022 at 11:00 AM Val wrote: > Thank you David. What about if I want to list the excluded rows? I used > this (dat3 <- dat1[un

Re: [R] Row exclude

2022-01-29 Thread David Carlson via R-help
t confused, but length(unique(c(BadName, BadAge, BadWeight)) indicates how many lines are being removed. David On Sat, Jan 29, 2022 at 8:32 PM Val wrote: > Thank you David for your help. I just have one question on this. What is > the purpose of using the "unique" function

Re: [R] Speed up studentized confidence intervals ?

2021-12-29 Thread David Winsemius
On 12/29/21 11:08 AM, varin sacha via R-help wrote: Dear David, Dear Rui, Many thanks for your response. It perfectly works for the mean. Now I have a problem with my R code for the median. Because I always get 1 (100%) coverage probability that is more than very strange. Indeed

Re: [R] Error Awareness

2021-12-26 Thread David Winsemius
On 12/23/21 3:11 AM, Stephen H. Dawson, DSL via R-help wrote: Hi, I am thinking about awareness of errors when an R script runs. My concern is I have an error-free script. I run it for months on end without problems. Then, something changes somewhere causing an error. My wonderment is how

Re: [R] Speed up studentized confidence intervals ?

2021-12-22 Thread David Winsemius
in the the function given to boot. ) — David Sent from my iPhone > On Dec 19, 2021, at 3:50 AM, varin sacha via R-help > wrote: > > Dear R-experts, > > Here below my R code working but really really slowly ! I need 2 hours with > my computer to finally get an answe

Re: [R] problem: try to passing macro value into submit block

2021-12-21 Thread David Winsemius
; and add back in the elided line-breaks the R code runs without error. -- David. __ 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 http://www.R-projec

Re: [R] [EXT] Re: Creating NA equivalent

2021-12-21 Thread David K Stevens
survival analysis. Some data sets have both lower and upper censoring and survival analysis appears to be the most appropriate. This is discussed in detail by Dennis Helsel from Practical Stats and is captured in the NADA package in R for environmental and hydrological data. regards David S

Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread David Winsemius
On 11/30/21 1:22 PM, Rich Shepard wrote: On Tue, 30 Nov 2021, David Winsemius wrote: Really? What was wrong with this? plot(1, 1, xlab=expression(32^degree) )  # the example given on ?plotmath David, Absolutely nothing. When there's no specific degree value in the label because the

Re: [R] Degree symbol as axis label superscript [RESOLVED]

2021-11-30 Thread David Winsemius
On 11/30/21 12:29 PM, Rich Shepard wrote: On Tue, 30 Nov 2021, Rich Shepard wrote: Thanks, Andrew. I will. plotmath didn't have the solution; Really? What was wrong with this? plot(1, 1, xlab=expression(32^degree) )  # the example given on ?plotmath -- David. the use o

[R] tsmp::find_discord help

2021-11-20 Thread David Katz via R-help
ndow_size) : ## 'window_size' must be at least 2. > *David Katz*, TIBCO Data Science 1.541.324.7417 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/m

[R] tsmp::find_discord failure

2021-11-20 Thread David Katz via R-help
e queries are different. ## Error in fast_avg_sd(data, window_size) : ## 'window_size' must be at least 2. > *David Katz*, TIBCO Data Science 1.541.324.7417 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] problem using tsmp::find_discord

2021-11-20 Thread David Katz via R-help
ing in dist_profile(data, data, nn, window_size = .mp$w, index = discord_idx) : ## Warning: Result may be inconsistent if the size of the queries are different. ## Error in fast_avg_sd(data, window_size) : ## 'window_size' must be at least 2. *David Katz*, TIBCO Data Science 1.541.32

Re: [R] Predictably puzzled.

2021-11-19 Thread David Carlson
All you need is predict(fit, data.frame(x)) or if you had started with a data frame: xy <- data.frame(x, y) fit <- lm(y~x, xy) predict(fit, xy) David Professor Emeritus of Anthropology Texas A&M University College Station, TX On Fri, Nov 19, 2021 at 8:45 PM Rolf Turner wrote: >

  1   2   3   4   5   6   7   8   9   10   >