Re: [R] igraph_vertex

2024-02-24 Thread David Winsemius
On 2/24/24 12:10, Kimmo Elo wrote: Hi, first of all, your example was not reproducible! But once I added "library(igraph)" and "library(scico)" plus generally replaced "aes_collapsed" by "edge_list", I started to work :-) After copying your lead in that replacement the error I got was:

Re: [R] igraph_vertex

2024-02-24 Thread David Winsemius
The reason html is specifically advised against as a format is that it does things like mangling data such as is happening in your example. You should repost using settings on you mail client for plain-text. Your code should start by loading necessary packages. You should also not post screen

Re: [R] Rtools and things dependent on it

2024-02-23 Thread David Winsemius
search; > > Division of Gerontology and Paliative Care, > 10 North Greene Street > GRECC (BT/18/GR) > Baltimore, MD 21201-1524 > Cell phone 443-418-5382 > > > > > > From: David Winsemius > Sent: Friday, February 23

Re: [R] Rtools and things dependent on it

2024-02-23 Thread David Winsemius
>> Baltimore, MD 21201-1524 >> (Phone) 410-605-711 9 >> (Fax)410-605-7913  (Please call phone number above >> prior to faxing) > >> On Feb 23, 2024, at 7:01 PM, David Winsemius >> wrote: >> >>  >> On 2/23/24 14:34, avi.e.gr...@gmail.com wrote: &g

Re: [R] Rtools and things dependent on it

2024-02-23 Thread David Winsemius
On 2/23/24 15:39, Sorkin, John wrote: Avi , Your question is not dumb. Let me ask a more fundamental question. What is R tools, what does it do, and how is it used. From time to time, I receive a message when I down load a package saying I need R tools. When I receive the message, I don’t

Re: [R] Rtools and things dependent on it

2024-02-23 Thread David Winsemius
On 2/23/24 14:34, avi.e.gr...@gmail.com wrote: > This may be a dumb question and the answer may make me feel dumber. > > I have had trouble for years with R packages wanting Rtools on my machine > and not being able to use it. Many packages are fine as binaries are > available. I have loaded

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

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

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

2023-11-01 Thread David Winsemius
> On Nov 1, 2023, at 6:06 AM, Kim Emilia wrote: > > Hello all, > > I would like to take down my packages posted/created on the website rdrr.io. > [https://rdrr.io/] Is there any way to take down packages from the website? > It would be appreciated if you suggested/offered a way to remove the

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

2023-11-01 Thread David Winsemius
> On Oct 22, 2023, at 4:01 PM, Bert Gunter wrote: > > No error message shown Please include the error message so that it is > not necessary to rerun your code. This might enable someone to see the > problem without running the code (e.g. downloading packages, etc.) > > -- Bert > > On Sun,

Re: [R] RQuantLib installation problem

2023-09-24 Thread David Winsemius
On 9/24/23 08:23, Ivan Krylov wrote: On Sun, 24 Sep 2023 02:19:20 + Naresh Gurbuxani wrote: install.packages("RQuantLib", repos = "https://cran.r-project.org;) Installing package into ‘/usr/local/lib/R/4.1/site-library’ (as ‘lib’ is unspecified) trying URL

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

2023-09-23 Thread David Winsemius
That's embarrassing. Apologies for the garbles HTML posting. I'll see if this is more readable: On 9/23/23 05:30, Rui Barradas wrote: Às 11:12 de 22/09/2023, Milbert, Sabine (LGL) escreveu: Dear R Help Team, My research group and I use R scripts for our multivariate data screening routines.

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

2023-09-23 Thread David Winsemius
On 9/23/23 05:30, Rui Barradas wrote: > Às 11:12 de 22/09/2023, Milbert, Sabine (LGL) escreveu: >> Dear R Help Team, >> >> My research group and I use R scripts for our multivariate data >> screening routines. During routine use, we encountered some >> inconsistencies within the predict()

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

2023-07-16 Thread David Winsemius
On 7/16/23 14:51, Maria Lathouri via R-help wrote: Dear all, I am having the following dataset fc<- ID    values    databases Al    0.15    phreeqc Al    0.6    carbfix Al    0.47    actual Ca    7.2    phreeqc Ca    7.2    carbfix Ca    0.3    actual Na    14.4    phreeqc Na    84   

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

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

2023-04-12 Thread David Winsemius
I thought replacing the spaces following instances of +++,++,+,- with "\n" and then reading with scan should succeed. Like Ivan Krylov I was fairly sure that you meant the minus sign to be "-" rather than "–", but perhaps your were using MS Word as an editor which is inconsistent with effective

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

2023-04-09 Thread David Winsemius
> On Apr 9, 2023, at 5:46 AM, palad...@trustindata.de wrote: > > Hello! > I want to calculate simultaneous confidence intervals for a nominal variable > with three categories: "yes", "no", "partially" and I expect that far more > than 5 samples fall into each category. > I have read that

Re: [R] "prob" package alternative

2023-04-06 Thread David Winsemius
On 4/6/23 02:15, Martin Maechler wrote: >> peter murage >> on Tue, 4 Apr 2023 06:24:56 + writes: > > Which package in R replaced package prob? > > Well, if you google that you should quickly be lead to > (something I even think makes sense to memorize as "rule" >

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

2023-04-06 Thread David Winsemius
On 4/6/23 03:49, Steven Yen wrote: The RStudio list generally does not respond to free version users. I was hoping someone one this (R) list would be kind enough to help me. I don't think that is true. It is perhaps true that you cannot get personalized help from employed staff, but you

Re: [R] Problems with foreign

2023-03-30 Thread David Winsemius
On 3/30/23 10:36, José Oscar Delgado Bautista wrote: Good day My name is José Oscar, I'm from Mexico and I have some questions about foreign in your write.foreig( ) function. We know that this function generates the inputs to be able to run them or execute them in another program like SPSS,

Re: [R] Failing to install the rgl package

2023-01-26 Thread David Winsemius
On 1/26/23 11:04, Tunga Kantarcı wrote: Hi, I try to execute the seven lines of code below to plot a graph. But I am failing as the messages below show. Where am I going wrong? install.packages("rgl") library(rgl) y_hat = X%*%B_hat open3d(windowRect = c(100,100,900,900),family = "serif")

Re: [R] Error 3221226505

2022-12-18 Thread David Winsemius
I cannot tell whether it would happen to me for two reasons: I don't use Windows anymore and R's current version is 4.2.1. You can determine whether it is the core packages that are throwing the error (rather unlikely) or perhaps something you have in your (invisible) .Rdata file. You should

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") -- David. On

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

2022-11-14 Thread David Winsemius
On 11/14/22 15:22, Ragia . wrote: >dear group , > cant install r base into ubuntu 22. > the msg is > The following packages have unmet dependencies: > r-base-core : Depends: libicu70 (>= 70.1-1~) but it is not installable Have you tried looking up the package that would contain libicu70? 

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 this email) which

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: > > Hello!

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

2022-11-06 Thread David Winsemius
To Thierry; When you omit an intercept you require that the line in multivariate space that represents the ‘predictions’ go through the (0,0,0,…) I.e. the origin. It’s a fairly restrictive requirement. There IS an intercept, even though it’s not explicitly seen in the model. If it’s not

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

2022-11-05 Thread David Winsemius
On 11/5/22 09:58, Amarjit Chandhial via R-help wrote: Hi Jeff, Please see my original question. You were told that RGui is not an editor. Are you implying that your initial message contained an implicit request for instructions on how to get R code in an .R file to be opened

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

2022-10-12 Thread David Winsemius
First one needs to remove the extraneous line-ends that you created by using an editor that inserts those line-ends (or perhaps it was your mail-client that added them because you failed to post in plain-text. I removed those files "by hand" and then created a text "file". txt <- "2015-01-01

Re: [R] Help with steam graph

2022-10-02 Thread David Winsemius
, year, com_num)  10. └─dplyr:::group_by.data.frame(., year, com_num)  11.   └─dplyr::group_by_prepare(.data, ..., .add = .add, caller_env = caller_env())  12.     └─rlang::abort(bullets, call = error_call) Any suggestions on how I can fix it ?? On Sun, 2 Oct 2022 at 09:12, David Winsemius wrote: I

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 combing the year and

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

2022-09-11 Thread David Winsemius
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 Winsemius Cc: r-help

Re: [R] confidence intervals

2022-09-08 Thread David Winsemius
e interval and thereby get some context to explain >> why the equation is correct. >> >> Tim >> >> -Original Message- >> From: R-help On Behalf Of Bogdan Tanasa >> Sent: Sunday, August 28, 2022 8:55 PM >> To: David Winsemius >>

Re: [R] About spDataLarge Package

2022-08-29 Thread David Winsemius
On 8/29/22 09:30, Paul Bernal wrote: Dear friends, I have just installed R version 4.2.1 for Windows on my machine, and was trying to install package spDataLarge, but the console threw the following error message: Warning in install.packages : package 'spDataLarge' is not available for

Re: [R] confidence intervals

2022-08-27 Thread David Winsemius
You cross-posted this to StackOverflow and did not say so.  ... and you posted in HTML Bad dog squared. I cast one of the close votes on SO, but here I can only say ... READ the Posting Guide. You also give no citation other than someone's Github files with minimal comments in that material.

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

2022-07-27 Thread David Winsemius
On 7/27/22 17:26, Rolf Turner wrote: I have a data frame with a numeric ("TrtTime") and a categorical ("Lifestage") predictor. Level "L1" of Lifestage occurs only with a single value of TrtTime, explicitly 12, whence it is not possible to estimate a TrtTime "slope" when Lifestage is "L1".

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

2022-07-13 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-13 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 PM,

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:5) {for(j in 1:5) > {cat(j)} >

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,

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] 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

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

2022-04-06 Thread David Winsemius
On 4/6/22 16:17, Ebert,Timothy Aaron wrote: Based on the OP's submission I pasted the following into R and tried to run it. Here is what I think was posted (comments removed): my_data <- 1:5 my_data my_subset_criteria <- c( F, F, T, NA, NA) my_subset_criteria equals TRUE

Re: [R] ggplot2

2022-04-04 Thread David Winsemius
On 4/4/22 04:39, Ebert,Timothy Aaron wrote: install.packages("ggplot2") Depending on your OS, there might be a better chance of success with install.packages("ggplot2", dependencies=TRUE) The Linux install process doesn't need this but the binary install on MacOS or Windows may need

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 quantitative predictor

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
I’m wondering if this is an X-Y problem. (A request to do X when the real problem should be doing Y. ) You haven’t explained the goals in natural or mathematical language which is leaving me to wonder why you are doing either sampling or replication (much less doing both within each iteration

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

2021-12-21 Thread David Winsemius
On 12/21/21 6:00 PM, Kai Yang via R-help wrote: Hi team,I'm trying to pass macro variable into R script in Proc iml. I want to do change variable in color= and export the result with different file name.If I don't use macro, the code work well. But when I try to use macro below, I got error

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 axis

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 of the

Re: [R] Error: unexpected symbol in "read.csv(12agosto.csv after installing Monterey

2021-11-08 Thread David Winsemius
There is a dedicated mailing list for Mac specific questions. You should subscribe before posting further but your first posting will still get moderated so don't send second postings because you think it's taking too long: r-sig-...@r-project.org And I'm a Mac user but do not understand

Re: [R] bootstrap confidence intervals

2021-11-05 Thread David Winsemius
On 11/5/21 1:16 PM, varin sacha via R-help wrote: Dear R-experts, Here is a toy example. How can I get the bootstrap confidence intervals working ? Many thanks for your help library(DescTools) library(boot) A=c(488,437,500,449,364) dat<-data.frame(A)

Re: [R] How to install package meta on Linux Ubuntu 21?,

2021-09-29 Thread David Winsemius
On 9/29/21 8:04 PM, Jeff Newmiller wrote: This is called hijacking a thread. Bad etiquette. You need to pay attention to column types and NA values. Only do regular expression manipulations on character data, and NA is never something you can do string operations on. To Giuseppa; When

Re: [R] Improvement: function cut

2021-09-18 Thread David Winsemius
On 9/18/21 5:28 AM, Leonard Mada via R-help wrote: Hello Andrew, I add this info as a completion (so other users can get a better understanding): If we want to perform a survival analysis, than the interval should be closed to the right, but we should include also the first time point (as

Re: [R] R: Many package imports have issues related to 'pillar'

2021-09-08 Thread David Winsemius
On 9/8/21 3:13 AM, Sigurjón Þorsteinsson wrote: Hi I am looking for a solution to this problem library(geepack) Error: package or namespace load failed for ‘geepack’: .onLoad failed in loadNamespace() for 'pillar', details: call: readRDS(nsInfoFilePath) error: unknown input format

Re: [R] [External] Package for "design graphs"

2021-08-18 Thread David Winsemius
The only person who got the image was Richard. The rest of us got the posting from the list server which stripped you image. If it had been a pdf or png I think it might have survived the digital journey rather than being blown to bits. On 8/18/21 7:29 AM, mad...@gmail.com wrote: I have

Re: [R] substitute column data frame based on name stored in variable in r

2021-08-09 Thread David Winsemius
On 8/9/21 12:22 PM, Luigi Marongiu wrote: Thank you! it worked fine! The only pitfall is that `NA` became ``. This is essentially the same thing anyway... It's not "essentially the same thing". It IS the same thing. The print function displays those '<>' characters flanking NA's when the

Re: [R] Issue regarding specifying pdBlocked matrix for random effects vcov in nlme package

2021-08-08 Thread David Winsemius
language itself. -- David Winsemius Volunteer moderator. On 8/2/21 1:43 PM, Benjamin Davis wrote: > > Hello, > > ��� I have come across an issue regarding specifying the > vcov of the random effects while using the /medrc/ package, which I > believe is very l

Re: [R] Help with package EasyPubmed

2021-08-04 Thread David Winsemius
> On Aug 3, 2021, at 11:20 AM, bharat rawlley via R-help > wrote: > > Hello, > When I try to run the following code using the package Easypubmed, I get a > null result - >> batch_pubmed_download(query_7) > NULL > #query_7 <- "Cardiology AND randomizedcontrolledtrial[Filter] AND

Re: [R] How to create a matrix from a list without a for loop

2021-07-09 Thread David Winsemius
On 7/9/21 10:40 AM, Laurent Rhelp wrote: Dear R-Help-list,   I have a list init_l containing 16 dataframes and I want to create a matrix 4 x 4 from this list with a dataframe in every cell of the matrix. I succeeded to do that but my loop is very uggly (cf. below). Could somebody help me

Re: [R] Some difficulties to use the apply command on an array

2021-07-05 Thread David Winsemius
> On Jul 5, 2021, at 7:56 AM, Laurent Rhelp wrote: > > Dear R-Help, > > I have an array x made up of three matrices of 5 rows and 3 columns of > complex numbers (the complex numbers are not the problem) > > ## my array > x <- structure(c(5.6196790161893828+0i, 5.7565523942393364+0i, >

Re: [R] Plotting the ASCII character set.

2021-07-03 Thread David Winsemius
Sent from my iPhone > On Jul 3, 2021, at 7:00 PM, Rolf Turner wrote: > >  >> On Sat, 3 Jul 2021 09:40:28 +0200 >> Ivan Krylov wrote: >> >> Hello Rolf Turner, >> >> On Sat, 3 Jul 2021 14:02:59 +1200 >> Rolf Turner wrote: >> >>> Can anyone suggest how I might get my plot_ascii() function

Re: [R] Special characters in cell names

2021-06-23 Thread David Winsemius
On my keyboard the key is share with the tilde symbol and is up on the left hand corner. Sent from my iPhone > On Jun 23, 2021, at 2:45 PM, David Winsemius wrote: > > Backticks. NOT apostrophes. > > — David > > Sent from my iPhone > >> On Jun 23, 2021, at 2

Re: [R] Special characters in cell names

2021-06-23 Thread David Winsemius
Backticks. NOT apostrophes. — David Sent from my iPhone > On Jun 23, 2021, at 2:40 PM, Mahmood Naderan wrote: > > Hi Bert, > I don't know what does "check.names" do here, but my commands look like > > >> mydata <- read.csv('r.3080..csv', header=T,row.names=1) > >> head(mydata) >

Re: [R] Data is not properly written in csv file

2021-06-21 Thread David Winsemius
This was an exact duplicate of a posting to StackOverflow where it has a response. You are asked in the Posting Guide not to crosspost. -- David. On 6/20/21 8:03 AM, Sri Priya wrote: location <- '

Re: [R] RINLA

2021-06-09 Thread David Winsemius
On 6/9/21 8:48 PM, peri He wrote: Dear Friends, I am running a simple code for rinla. The INLA package is installed successfully on Rstudio. Techinically, the package is installed in an R library. You are using Rstudio as your IDE, but it does not run packages. But when I run inla

Re: [R] Need help to fix the max date filter problem in the date input

2021-06-09 Thread David Winsemius
On 6/9/21 5:06 AM, Biplab Nayak wrote: Hi Greg, Please find the objective of the code(bold) and code mentioned below. I was trying to do to achieve the below objective but somehow it's not working. The phrase "somehow not working" is not a useful description of an outcome. 1.Order

Re: [R] Help for Use of R software

2021-06-06 Thread David Winsemius
I get the sense that you need further background on statistical testing issues and suggest this resource: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3510268/ -- David Winsemius, MD, MPH On 6/6/21 10:06 AM, Lee Simon wrote: Dear Sir/Madam, May I seek for your kind help for the use of R

Re: [R] Help for Use of R software

2021-06-06 Thread David Winsemius
A google-search of the term brings up as its first hit a link to a page on the rdocumentation.org website that indicates that theTrialSize package(version1.4) has a function named "TwoSampleProportion.NIS". If you executed

Re: [R] Help in modifying code to extract data from url

2021-05-22 Thread David Winsemius
Several authors hav addressed this problem with names that resemble "rbindfill". In my machine I find four instances: ??rbindfill Help pages: ffbase::ffdfrbind.fill        rbind for ffdf where missing columns are added if not available in one of the ffdf objects plyr::rbind.fill       

Re: [R] COXPH: How should weights be entered in coxph, as the log of the weight or as the weight on its original scale?

2021-05-19 Thread David Winsemius
Perhaps this package could be considered https://cran.r-project.org/web/packages/hrIPW/hrIPW.pdf That packages author also has a 2016 article in Statistics in Medicine on the properties of estimates from such analyses that might be useful. — David Winsemius, MD, MPH Sent from my iPhone

Re: [R] series of densities

2021-05-17 Thread David Winsemius
On 5/17/21 7:44 AM, Troels Ring wrote: Dear friends I'm trying to plot in silico derived values of 3 types of buffer-capacities  over pH values and want densities of the three types together at each pH with the pH values on the abscissa. I have generated some data set.seed(2345) pHs <-

Re: [R] series of densities

2021-05-17 Thread David Winsemius
On 5/17/21 7:44 AM, Troels Ring wrote: Dear friends I'm trying to plot in silico derived values of 3 types of buffer-capacities  over pH values and want densities of the three types together at each pH with the pH values on the abscissa. I have generated some data set.seed(2345) pHs <-

Re: [R] grep

2021-05-08 Thread David Winsemius
On 5/8/21 10:00 AM, Steven Yen wrote: Below, the first command simply creates a list of 16 names (labels) which can be ignore. In the 2nd and 3rd commands, I am able to identify names containing "black". In line 4, I am trying to identify names containing "black" or "conserv" but

Re: [R] calculating area of ellipse

2021-05-06 Thread David Winsemius
On 5/6/21 6:29 PM, Jim Lemon wrote: Hi James, If the result contains the major (a) and minor (b) axes of the ellipse, it's easy: area<-pi*a*b ITYM semi-major and semi-minor axes. -- David try using str() on the result you get. Jim On Fri, May 7, 2021 at 3:51 AM james meyer wrote:

Re: [R] Question about using R sample datasets

2021-05-02 Thread David Winsemius
for material copied from CRAN sources. Acknowledgment alone might >> not be an acceptable use. You may need to seek appropriate legal counsel or >> get opinions from the creators of the licensing language, since there are a >> variety of license. >> >> David Winsemius

Re: [R] Question about using R sample datasets

2021-05-01 Thread David Winsemius
ppropriate legal counsel or get opinions from the creators of the licensing language, since there are a variety of license. David Winsemius, MD, (IANAL) > On May 1, 2021, at 12:17 PM, Maja Analytics > wrote: > > Hello! > > I would like to make tutorials for non-da

Re: [R] evil attributes

2021-04-11 Thread David Winsemius
On 4/11/21 11:46 AM, Viechtbauer, Wolfgang (SP) wrote: The is.vector() thing has also bitten me in the behind on a few occasions. When I want to check if something is a vector, allow for it to possibly have some additional attributes (besides names) that would make is.vector() evaluate to

Re: [R] Assigning several lists to variables whose names are contained in other variables

2021-04-09 Thread David Winsemius
On 4/9/21 5:21 AM, Wolfgang Grond wrote: Greg, here I get the error message: Error my_function(val) : cannot find function my_function. I'm guessing that you are following someone else's blog and have failed one of two things: - understand that what was meant by the author was that you

Re: [R] Unable to extract gene list from chromosome

2021-04-08 Thread David Winsemius
h? Alternatively, you might want to post this instead at the BioConductor mailing list. They are the people who have a better chance of spotting obvious errors. I've found two likely code-related errors but I'm not a computational biostatistician. David > > > Thanks, > Puja >

Re: [R] Unable to extract gene list from chromosome

2021-04-08 Thread David Winsemius
On 4/8/21 2:30 PM, pooja sinha wrote: Hi All, I am trying to extract gene list from chromosome number and position, for that I am using biomaRt in R but I am getting error messages as shown below. Also below is the code I am using for extraction. library("biomaRt") listMarts() ensembl <-

Re: [R] Contrasts in coxph

2021-04-06 Thread David Winsemius
On 4/5/21 8:28 PM, Sorkin, John wrote: I would like to define contrasts on the output of a coxph function. It appears that the contrast function from the contrast library does not have a method defined that will allow computation of contrasts on a coxph object. How does one define and

Re: [R] using MAP and PURR to compute characteristic roots

2021-03-31 Thread David Winsemius
] 4.5615528 3.7320508 [2,] 0.4384472 0.2679492 Do note that the values are returned column-wise. (I see that you noted in an earlier (duplicate) rhelp posting that you were expecting "younger" respondents. Since I'm in my eighth decade, I probably don't qualify.) -- David Winsemius,

Re: [R] Thank you 4 Davide

2021-03-22 Thread David Winsemius
On 3/22/21 8:24 AM, francesca brun via R-help wrote: Hello, The problem was that version 4.0.4 did not support the package so I tried with several old versions until 3.6.2 installs both climtrend and Rcmdr with its graphical interface !! solved and thanks again Davide !!Francesca I'm glad

Re: [R] Help Package 'CLIMTRENDS' from Archive

2021-03-22 Thread David Winsemius
> On Mar 22, 2021, at 4:54 AM, francesca brun via R-help > wrote: > > Hello, > I need to run the 'climtrend' library It's a package, not a library. Libraries are directory locations and typically hold multiple packages. > which is no longer available, I downloaded and installed it from

Re: [R] about a p-value < 2.2e-16

2021-03-19 Thread David Winsemius
Sent from my iPhone > On Mar 18, 2021, at 10:26 PM, Bogdan Tanasa wrote: > > Dear Spencer, thank you very much for your prompt email and help. When > using : > >> wilcox.test(rnorm(100), rnorm(100, 2), exact=TRUE) > W = 698, p-value < 2.2e-16 > >> wilcox.test(rnorm(100), rnorm(100, 2),

Re: [R] hist from a list

2021-03-08 Thread David Winsemius
On 8/3/20 11:48 AM, Pedro páramo wrote: Hi Rasmus, Josh and Rui, First of all many thanks in advance about your help. The first thig is sometimes you say " you are posting in HTML and that makes the post unreadable as this is a plain text list" how can I put the code in the correct way, not

Re: [R] quantile from quantile table calculation without original data

2021-03-06 Thread David Winsemius
On 3/6/21 1:02 AM, Abby Spurdle wrote: I came up with a solution. But not necessarily the best solution. I used a spline to approximate the quantile function. Then use that to generate a large sample. (I don't see any need for the sample to be random, as such). Then compute the sample mean

Re: [R] quantile from quantile table calculation without original data

2021-03-05 Thread David Winsemius
On 3/5/21 1:14 AM, PIKAL Petr wrote: Dear all I have table of quantiles, probably from lognormal distribution dput(temp) temp <- structure(list(size = c(1.6, 0.9466, 0.8062, 0.6477, 0.5069, 0.3781, 0.3047, 0.2681, 0.1907), percent = c(0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99)),

Re: [R] Out from an R package

2021-02-25 Thread David Winsemius
On 2/25/21 7:24 AM, Göran Djurfeldt wrote: Help! I am going crazy for a very simple reason. I can’t access the output from for instance the lme4 package in R. I have been able to import an SPSS file into an R data frame. I have downloaded and installed the Lme4 package and I think I have

Re: [R] Plotting world maps with locations.

2021-02-12 Thread David Winsemius
Sent from my iPhone > On Feb 12, 2021, at 9:01 PM, David Winsemius wrote: > >  > > Sent from my iPhone > >> On Feb 12, 2021, at 1:35 PM, Jibrin Alhassan >> wrote: >> >> Hello Romanus, >> You are to post only the code and the error m

Re: [R] Plotting world maps with locations.

2021-02-12 Thread David Winsemius
Sent from my iPhone > On Feb 12, 2021, at 1:35 PM, Jibrin Alhassan > wrote: > > Hello Romanus, > You are to post only the code and the error messages and not all the > information from your terminal in R session. That’s not actually the best practice for rhelp questions. More info is

Re: [R] dependent nested for loops in R

2021-02-01 Thread David Winsemius
Sent from my iPhone > On Feb 1, 2021, at 10:16 PM, David Winsemius wrote: > > Or perhaps: > > W <- 1:2000 > W[z>4|z<2] <- 0 Another way: W <- (1:2000)*(z>4|z<2) As I said earlier you really should study logical class vectors and the operat

Re: [R] dependent nested for loops in R

2021-02-01 Thread David Winsemius
Or perhaps: W <- 1:2000 W[z>4|z<2] <- 0 Sent from my iPhone > On Feb 1, 2021, at 9:56 PM, David Winsemius wrote: > > Or perhaps you wanted: > > W <- z > W[z>4|z<2] <- 0 > > Sent from my iPhone > >>> On Feb 1, 2021, at 9:41 P

Re: [R] dependent nested for loops in R

2021-02-01 Thread David Winsemius
Or perhaps you wanted: W <- z W[z>4|z<2] <- 0 Sent from my iPhone > On Feb 1, 2021, at 9:41 PM, David Winsemius wrote: > > Just drop the “+” if you want logical. > > Sent from my iPhone > >>> On Feb 1, 2021, at 9:36 PM, Shaami wrote: >>

Re: [R] dependent nested for loops in R

2021-02-01 Thread David Winsemius
ue. I want index of z > for which the condition is true (instead of 1) else zero. Could you please > suggest? > > Thank you > > Shaami > >> On Tue, Feb 2, 2021 at 10:16 AM David Winsemius >> wrote: >> Cc’ed the list as should always be your practice. >>

Re: [R] dependent nested for loops in R

2021-02-01 Thread David Winsemius
IMTS length 2000 Sent from my iPhone > On Feb 1, 2021, at 9:16 PM, David Winsemius wrote: > > Cc’ed the list as should always be your practice. > > Here’s one way (untested): > > W <- +(z>4| z<2) # assume z is of length 20 > > — > David > &

Re: [R] dependent nested for loops in R

2021-02-01 Thread David Winsemius
(1:2000)[z >4|z<2) > > Could you please guide how I can assign zero if condition is not satisfied? > > Best Regards > > Shaami > >> On Mon, 1 Feb 2021, 11:01 am David Winsemius, wrote: >> >> On 1/31/21 1:26 PM, Berry, Charles wrote: >>

Re: [R] dependent nested for loops in R

2021-01-31 Thread David Winsemius
On 1/31/21 1:26 PM, Berry, Charles wrote: On Jan 30, 2021, at 9:32 PM, Shaami wrote: Hi I have made the sample code again. Could you please guide how to use vectorization for variables whose next value depends on the previous one? I agree with Charles that I suspect your results are not

  1   2   3   4   5   6   7   8   9   10   >