Re: [R] Citing

2021-01-28 Thread Patrick (Malone Quantitative)
When you start up R, one of the opening messages is: 'citation()' on how to cite R or R packages in publications. Since it sounds like you're not using R yourself, here are the results for R, but you'd have to go one by one through packages. R Core Team (2020). R: A language and environment for

Re: [R] A question regarding 749 R[21525:2855847] Warning

2021-01-18 Thread Patrick (Malone Quantitative)
operating system and R 4.0.3). You can download the last R GUI at this address: https://mac.r-project.org/ The last version is now the 7905. It will probably work fine too. * On Mon, Jan 18, 2021 at 7:52 AM Patrick (Malone Quantitative) wrote: > > The current version of Big Sur is

Re: [R] A question regarding 749 R[21525:2855847] Warning

2021-01-18 Thread Patrick (Malone Quantitative)
The current version of Big Sur is 11.1, with 11.2 in public beta. So this may have been fixed. Maedeh, are you able to check? On Sun, Jan 17, 2021 at 4:10 PM Maedeh Kamali wrote: > > Dear Gregory Coast, > > Thanks for your reply. > I searched so much regarding how to fix this problem.

Re: [R] Error in contrasts adding bonferroni adjustment

2021-01-09 Thread Patrick (Malone Quantitative)
Looks like a misplaced right parenthesis. Try contrast.outcome <-contrast(emmeans.outcome, method = list("experimental_post1 - control_post1" = c(1, 0, -1, 0), "experimental_post2 - control_post2" = c(0, 1, 0, -1)), adjust = "bonf") Pat On Sat, Jan 9, 2021 at 3:10 AM Laura Coco wrote: > >

Re: [R] Fwd: Error in setting the parameter values of k

2020-12-29 Thread Patrick (Malone Quantitative)
Likely, yes. Your error message says k must be at least 1, so searching below 1 is probably your issue. Also, logically, zero nearest neighbors doesn't seem to make a lot of sense. Pat On Tue, Dec 29, 2020 at 11:01 AM Neha gupta wrote: > Thank you for your response. > > Are you certain that

Re: [R] Meta: R-Help reply-to

2020-12-15 Thread Patrick (Malone Quantitative)
76 Fax: 416.864.3016 > > > On 2020-12-15, 12:05 PM, "R-help on behalf of Patrick (Malone > Quantitative)" mal...@malonequantitative.com> wrote: > > EXTERNAL EMAIL: > > Ok. If this is a desirable change, of whom would we request it? I was >

Re: [R] Meta: R-Help reply-to

2020-12-15 Thread Patrick (Malone Quantitative)
Laboratoriemedicin, Östersunds sjukhus > > -Original Message- > From: R-help On Behalf Of Patrick (Malone > Quantitative) > Sent: Tuesday, December 15, 2020 4:52 PM > To: r-help > Subject: [R] Meta: R-Help reply-to > > Greetings. > > Something I've wondered fo

[R] Meta: R-Help reply-to

2020-12-15 Thread Patrick (Malone Quantitative)
Greetings. Something I've wondered for some time--is mailman configurable to have a default reply-to be set to the list or to reply-all? Many newcomers who reply to individual R-Help participants may not notice that they are doing so, and it seems a source of vexation to some of the more

Re: [R] Error: vector memory exhausted (limit reached?)

2020-11-02 Thread Patrick (Malone Quantitative)
The error probably means what it says. I'm guessing "25 GB available" is on the hard drive. But the issue is the data must be held in RAM, and a file >4GB (before de-compression) is quite a lot of RAM on laptop scales. Try taking a subset of the data in Stata before importing? Pat On Mon, Nov

Re: [R] Error: vector memory exhausted (limit reached?)

2020-11-02 Thread Patrick (Malone Quantitative)
Thank you! > > > Op 2 nov. 2020, om 21:16 heeft Patrick (Malone Quantitative) < > mal...@malonequantitative.com> het volgende geschreven: > > > > The error probably means what it says. I'm guessing "25 GB available" > > is on the hard drive. But the is

Re: [R] Package recommendations for outputting table with cell formatting

2020-10-23 Thread Patrick (Malone Quantitative)
Will this need to be done many times? If not, it might be just as easy to apply conditional formatting to cells after they're already in Excel. On Fri, Oct 23, 2020 at 8:28 PM Dennis Fisher wrote: > > R 4.0.2 > OS X > > Colleagues > > I have the unfortunate need to create a large number of

Re: [R] Function of "matrix"

2020-10-22 Thread Patrick (Malone Quantitative)
(Neglected to cc the list--please reply-all to this version) What was the warning? I hazard a guess you've run into precision issues for binary representation, and the result of your division is not *exactly* 101. Pat On Thu, Oct 22, 2020 at 2:42 PM 奈良県奈良市 wrote: > > Dear R project team > > I

Re: [R] Question about the package "MatchIt"

2020-10-10 Thread Patrick (Malone Quantitative)
Maria Cristina, The MatchIt homepage at https://gking.harvard.edu/matchit has a link to a mailing list specific to the package and it has searchable archives. You will probably have better luck there than a general R programming list. Though a quick perusal of the user guide at that site makes me

Re: [R] System Requirements

2020-08-22 Thread Patrick (Malone Quantitative)
Try it and see? On Sat, Aug 22, 2020 at 11:44 AM Firpo, Mike via R-help < r-help@r-project.org> wrote: > Hello, > > Reading the FAQ, I'm confused about whether R 4.0.2 is tested on Windows > 7. I found the following: > > > 2.24 Does R run under Windows Vista/7/8/Server 2008? > > > > It does.

Re: [R] Dependent Variable in Logistic Regression

2020-08-01 Thread Patrick (Malone Quantitative)
Gunter > > "The trouble with having an open mind is that people keep coming along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sat, Aug 1, 2020 at 11:15 AM Patrick (Malone Quantitative) < >

Re: [R] Dependent Variable in Logistic Regression

2020-08-01 Thread Patrick (Malone Quantitative)
No, R does not. glm() does in order to do logistic regression. On Sat, Aug 1, 2020 at 2:11 PM Paul Bernal wrote: > Hi Bert, > > Thank you for the kind reply. > > But what if I don't turn the variable into a factor. Let's say that in > excel I just coded the variable as 1s and 0s and just

Re: [R] Modifying dataframe with mutate()

2020-07-25 Thread Patrick (Malone Quantitative)
Oh, right--I puzzled out my mistake. On Sat, Jul 25, 2020 at 4:17 PM Jeff Newmiller wrote: > False. Mutate is similar in structure to the base function `within`. Which > is why you have to assign the altered data frame back onto itself. > > On July 25, 2020 12:59:06 PM PDT, &quo

Re: [R] Modifying dataframe with mutate()

2020-07-25 Thread Patrick (Malone Quantitative)
Jeff, mutate(), which is I think part of dplyr, also violates this, for what it's worth. I suspect the breaking point is that mutate() is intended to create new columns in the dataframe, not alter existing ones. On Sat, Jul 25, 2020 at 3:52 PM Jeff Newmiller wrote: > R is largely a functional

Re: [R] Modifying dataframe with mutate()

2020-07-25 Thread Patrick (Malone Quantitative)
This seems needlessly complicated. df$v1 <- as.double(df$v1) Or as.numeric() On Sat, Jul 25, 2020 at 3:31 PM H wrote: > In a statement like: > > df %>% mutate(v1 = as.double(v1)) > > I expect the variable v1 in dataframe df to have been converted into a > double. However, when I do: > >

Re: [R] Inquiry for R software Licensing.

2020-07-11 Thread Patrick (Malone Quantitative)
There's only one version and it's free. On Sat, Jul 11, 2020 at 1:46 PM Sachin Patil wrote: > > Dear R Software Team, > > > > We want to know about R software Licensing to procure it. Do you have R > software License version or any professional version? > > > > Regards, > > Sachin Patil > > IT

Re: [R] Help with locating error on import of data

2020-06-23 Thread Patrick (Malone Quantitative)
It looks like it's looking for column names in the first row of your Excel sheet and not finding them. What does the first row contain? On Tue, Jun 23, 2020 at 10:57 AM Ahson via R-help wrote: > I have imported data from an Excel file and I am getting errors: > > > library(readxl) > >

Re: [R] access for free more than 500 essential Springer Nature textbooks

2020-05-23 Thread Patrick (Malone Quantitative)
Thanks, Rich! I found several books to peruse. On Fri, May 22, 2020 at 12:29 PM Richard M. Heiberger wrote: > Springer has just made available free access to many books through July. > This is part of their global program to support educators, students > and academics > affected by coronavirus

Re: [R] My dream ...

2020-05-11 Thread Patrick (Malone Quantitative)
This isn't an R code question and you posted in HTML, but briefly: Simulate data that could arise from your study, including missing and outliers, then write code that runs th analyses. Put the code in an open-science archive. Then run it as is when you actually have the data. There will

Re: [R] calculating t-score/t-stats as my zscores

2020-05-06 Thread Patrick (Malone Quantitative)
Guessing for Ana, but no, that's a different meaning. Beta/StdErr is a z statistic--a test statistic against (usually) the tails of the unit normal distribution. So like a t-test with infinite df. On Wed, May 6, 2020 at 10:41 AM Rui Barradas wrote: > > Hello, > > By z-scores do you mean

Re: [R] if else statement

2020-05-04 Thread Patrick (Malone Quantitative)
"I tried this but I am not sure if this is correct:" Does it provide the expected result for all possible combinations of 1/2/NA for both variables? On Mon, May 4, 2020 at 1:16 PM Ana Marija wrote: > Hello, > > I have a data frame like this: > > > head(b) >FID IID FLASER PLASER > 1:

Re: [R] how to create a new column from two columns with conditions

2020-04-29 Thread Patrick (Malone Quantitative)
If you don't mind using tidyverse, you can do this easily with if_else. b$PHENO<-if_else(... On Wed, Apr 29, 2020 at 3:21 PM Ana Marija wrote: > Hello, > > I have a data frame like this: > > > head(b) >FID IID FLASER PLASER > 1: fam1000 G1000 1 1 > 2: fam1001 G1001

Re: [R] Automating package updates after major version change

2020-04-26 Thread Patrick (Malone Quantitative)
A package on github called yamlpack appears to do a lot of the work involved. I can't vouch for it personally. https://github.com/combiz/yamlpack On Sun, Apr 26, 2020 at 1:12 PM Sarah Goslee wrote: > Not so coincidentally, I just worked thru this for myself. > > I did want to rebuild and

Re: [R] Difference in offset values in R and STATA

2020-04-14 Thread Patrick (Malone Quantitative)
Also, is the default base for "log" the same in both programs? On Tue, Apr 14, 2020 at 3:36 PM Sorkin, John wrote: > > Your question is unlikely to be answered unless you post code demonstrating > the problem > J > > John David Sorkin M.D., Ph.D. > Professor of Medicine > Chief, Biostatistics

Re: [R] Extracting p value from bootstrap in R

2020-01-03 Thread Patrick (Malone Quantitative)
Also, note that the p-values will probably not exactly correspond to conclusions drawn from the bootstrapped confidence limits. They are two different approaches to the research question. Broadly speaking, the bootstrapped limits avoid the assumption of a symmetric sampling distribution that

Re: [R] Time intervals is converted into seconds after converting list of dfs into a single Df.

2019-12-24 Thread Patrick (Malone Quantitative)
You didn't provide a reproducible example for testing (or post in plain text), but lubridate has an as.interval() function. You'll need to be able to extract the start time, though, for use in the function. On Tue, Dec 24, 2019 at 11:54 AM Allaisone 1 wrote: > > > Hi dear group , > > I have list

Re: [R] help with if statement with two conditions

2019-12-23 Thread Patrick (Malone Quantitative)
What does the error message say? On Mon, Dec 23, 2019, 3:33 PM Steinmann, Kimberly@CDPR < kimberly.steinm...@cdpr.ca.gov> wrote: > Hi - i am not super familiar with R, but need to modify my predecessor's R > code so that if a variable is >0 and < 0.5, it will be replaced with <1. I > have looked

Re: [R] script execution stops and give the error

2019-12-20 Thread Patrick (Malone Quantitative)
Per the posting guide, post your script and use plain text. There's no way anyone can possibly help with only this information. On Fri, Dec 20, 2019 at 5:33 PM Neha gupta wrote: > > When I run my code, I get the following error and suddenly the execution > of the script stops. Where in my data

Re: [R] date

2019-12-17 Thread Patrick (Malone Quantitative)
Try putting / instead of - in your format, to match the data. On Tue, Dec 17, 2019 at 5:52 PM Val wrote: > > Hi All, > > I wanted to to convert character date mm/dd/yy to -mm-dd > The sample data and my attempt is shown below > > gs <-read.table(text="ID date > A1 09/27/03 > A2

Re: [R] QQ plot

2019-11-12 Thread Patrick (Malone Quantitative)
I agree with Abby. That would defeat the purpose of a QQ plot. On Mon, Nov 11, 2019, 9:54 PM Abby Spurdle wrote: > Hi > > I'm not familiar with the qqman package, or GWAS studies. > However, my guess would be that you're *not* supposed to change the > position of the line. > > On Tue, Nov 12,

Re: [R] Train and testing in caret package

2019-11-04 Thread Patrick (Malone Quantitative)
This isn't an R language question, but there are many tutorials, blogs, and videos on the web that address this sort of thing, in addition to StackExchange. On Mon, Nov 4, 2019 at 11:58 AM Neha gupta wrote: > > Hello to all. I am new to R language, just read few tutorials. > > I have a question,

Re: [R] ggpubr: order of non-numeric x-axis items

2019-10-26 Thread Patrick (Malone Quantitative)
, "b")) > [1] c b a c b a > > See also ?reorder for a useful way of reordering the levels, > especially in plots. > > -Deepayan > > > Cheers, > > Bert > > > > Bert Gunter > > > > "The trouble with having an open mind is that peop

Re: [R] ggpubr: order of non-numeric x-axis items

2019-10-26 Thread Patrick (Malone Quantitative)
Try using relevel() to organize the categories in your factor in the desired order. You may need to use relevel(as.factor()) . On Sat, Oct 26, 2019 at 6:51 AM April Ettington wrote: > > Hi, > > When I use ggpubr with an x-axis utilizing descriptive categories (eg. bar > chart for different

Re: [R] The "--slave" option

2019-09-18 Thread Patrick (Malone Quantitative)
For what it's worth, this is an ongoing conversation in computer science and engineering. And has been so for decades. Not R, but related to this it's only in the past few months that a fork of the photo-manipulation software GIMP (slur for handicapped) renames it (GLIMPSE). Note, I am not

Re: [R] Large mixed & crossed-effect model looking at educational spending on crime rates with error messages

2019-09-03 Thread Patrick (Malone Quantitative)
(And post in plain text) On Tue, Sep 3, 2019 at 10:34 AM Bert Gunter wrote: > > You should post this on the R-sig-mixed-models list, not here. When you do > so, use ?dput to include data, not cut and paste. > > Cheers, > Bert > > > On Tue, Sep 3, 2019 at 6:10 AM Ades, James wrote: > > > > > I

Re: [R] New Work Based on R

2019-08-29 Thread Patrick (Malone Quantitative)
Perhaps rather than re-inventing the wheel, some current open science repository(ies) would work, just with an encouragement to use subject tagging to indicate the software. Pat On Thu, Aug 29, 2019 at 9:38 AM Eric Berger wrote: > > Rich writes: " I've been out of academia for a very long time

Re: [R] filter and add a column

2019-08-06 Thread Patrick (Malone Quantitative)
This should get you going: Add a vector of 1s to controls before joining the datasets. On Tue, Aug 6, 2019 at 3:01 PM Ana Marija wrote: > > I really don't know how I would implement this > > On Tue, Aug 6, 2019 at 1:42 PM Patrick (Malone Quantitative) > wrote: >> >

Re: [R] filter and add a column

2019-08-06 Thread Patrick (Malone Quantitative)
Can you please tell em what means to post in "plain text" ? > > Thanks > Ana > > On Tue, Aug 6, 2019 at 1:33 PM Patrick (Malone Quantitative) > wrote: >> >> Do you have some kind of ID variable? If so, it should be >> straightforward with the approp

Re: [R] filter and add a column

2019-08-06 Thread Patrick (Malone Quantitative)
Do you have some kind of ID variable? If so, it should be straightforward with the appropriate joining function. What have you tried? Also, please post in plain text. On Tue, Aug 6, 2019 at 2:16 PM Ana Marija wrote: > > Hello, > > I am filtering my data frame "tot" via: > > controls=tot %>%

Re: [R] function sample: diferences across R versions

2019-07-30 Thread Patrick (Malone Quantitative)
Poorly phrased--makes it act differently with respect to set.seed() . On Tue, Jul 30, 2019 at 6:55 PM Patrick (Malone Quantitative) wrote: > > My understanding is that sample() in 3.6.0 did, in fact, change in > ways that detach it from set.seed(). > > You can use RNGkind(

Re: [R] function sample: diferences across R versions

2019-07-30 Thread Patrick (Malone Quantitative)
My understanding is that sample() in 3.6.0 did, in fact, change in ways that detach it from set.seed(). You can use RNGkind() or RNGversion() to recapture the old behavior. See https://cran.rstudio.com/bin/windows/base/NEWS.R-3.6.1.html in the section CHANGES IN R 3.6.0 . Also, please do not

Re: [R] Regarding R licensing usage guidance

2019-07-23 Thread Patrick (Malone Quantitative)
Again, consult an IP lawyer whom you are paying for legal advice. On Tue, Jul 23, 2019 at 4:15 PM Duncan Murdoch wrote: > > On 23/07/2019 2:38 p.m., ANAMIKA KUMARI wrote: > > Hi Team > > > > Thank you for your reply. I do not intend to use hard work of community and > > earn profit on it. I do

Re: [R] Regarding R licensing usage guidance

2019-07-22 Thread Patrick (Malone Quantitative)
You're in the wrong place. This is for help with R programming. But you shouldn't be asking us either way, as we (at least most of us) aren't lawyers. Get your attorney to study the GNU-GPL-2.0 and tell you what you need to and can do for your purposes. Pat On Mon, Jul 22, 2019 at 1:23 PM

Re: [R] Dataframe columns are accessible by incomplete column names, is this a bug?

2019-07-18 Thread Patrick (Malone Quantitative)
But it's also a convenience feature. Note that $E returned null because there was an ambiguity. By the time you got to $Ex the column you were referencing was unambiguous and you didn't have to type out the whole thing. Useful if you have very long column names, for example imported from a

Re: [R] tidyr gather(function)

2019-07-15 Thread Patrick (Malone Quantitative)
What happens if you use key=year? Also, tables get mangled when you post in HTML to plain-text list. On Mon, Jul 15, 2019 at 6:47 PM wrote: > > r-help > > > > Needing to transform some data for a time series (1930 - 2018). > > > > > tempDat > # A tibble: 89 x 13 > Year Jan Feb Mar

Re: [R] R Update

2019-07-13 Thread Patrick (Malone Quantitative)
Please re-send as plain text. The HTML version is unreadable. On Sat, Jul 13, 2019 at 12:25 PM shetumi--- via R-help wrote: > > I tried to update R in my Windows machine from 3.4.2 to latest one. But it is > showing error as follows. Can anyone please help me where the problem is ? > >

Re: [R] Call `rlang::last_error()` to see a backtrace

2019-07-10 Thread Patrick (Malone Quantitative)
ll the same error: >> > library(ukbtools) >> > my_ukb_data <- ukb_df("ukb31212") >> > ukb_icd_diagnosis(my_ukb_data, id = "117", icd.version = 10) >> Error: Column 1 must be named. >> Use .name_repair to specify repair. >> Call `rlan

Re: [R] Call `rlang::last_error()` to see a backtrace

2019-07-10 Thread Patrick (Malone Quantitative)
On Wed, Jul 10, 2019 at 4:52 PM David Winsemius wrote: > > Did you read the bug report from three weeks ago and the suggested fix > documented on the webpage you cited? > > — > David > > > Sent from my iPhone > > > On Jul 10, 2019, at 1:09 PM, Patri

Re: [R] Call `rlang::last_error()` to see a backtrace

2019-07-10 Thread Patrick (Malone Quantitative)
> Error in ukb_icd_diagnosis(my_ukb_data, eid = "117", icd.version = 10) > : > unused argument (eid = "117") > > > > On Wed, Jul 10, 2019 at 3:09 PM Patrick (Malone Quantitative) < > mal...@malonequantitative.com> wrote: > >> First respon

Re: [R] Call `rlang::last_error()` to see a backtrace

2019-07-10 Thread Patrick (Malone Quantitative)
First response: The ID column in your data is labeled "eid" but your function call refers to "id". On Wed, Jul 10, 2019 at 1:38 PM Ana Marija wrote: > > Hello, > > I am trying to use this program: > https://github.com/kenhanscombe/ukbtools > > > my_ukb_data[1:3,1:3] > eid sex_f31_0_0

Re: [R] Using options(max.print = 1000000) to read in data

2019-07-09 Thread Patrick (Malone Quantitative)
Spencer, what prints into your console is not the point. As others have said, the best way to find it if an R object is the type matrix is is.matrix() . That will return TRUE or FALSE. [[alternative HTML version deleted]] __

Re: [R] interpretation of R output for exact permutation test

2019-06-07 Thread Patrick (Malone Quantitative)
I suspect Massimo meant to refer to the output z as "critical ratio," vs. "critical value." But I agree with Massimo there's no interpretation of it with an exact test. The p-value is the meaningful output. Pat On Fri, Jun 7, 2019 at 5:40 AM Duncan Murdoch wrote: > > On 07/06/2019 3:08 a.m.,

Re: [R] Fwd: high p values

2019-03-19 Thread Patrick (Malone Quantitative)
We've had this conversation. A) This is off-topic for R-Help. Your question is about the statistical test, not about the R coding. B) A difference in sample statistics, whether or not it "looks" large, is not sufficient for statistical significance. On 3/19/19, 12:48 PM, "R-help on behalf of

Re: [R] About wilcox test

2019-03-11 Thread Patrick (Malone Quantitative)
First, I'm pretty sure this is a statistics question, not an R question. But you're asserting there is a difference in the data. The statistical test is telling you that this apparent difference is within the range of chance variation. There's not a contradiction there, unless you mean there is

Re: [R] faster execution of for loop in Fishers test

2019-02-11 Thread Patrick (Malone Quantitative)
Point 1 confirmed. It's an exhaustive permutation test. On 2/11/19, 8:46 PM, "R-help on behalf of Bert Gunter" wrote: 1. I believe Fisher's exact test is computationally intensive and takes a lot of time for large structures, so I would say what you see is what you should expect!