Re: [R] How to represent the effect of one covariate on regression results?

2020-09-14 Thread David Winsemius
There is a user-group for PLINK, easily found by looking at the page you cited. This is not the correct place to submit such questions. https://groups.google.com/g/plink2-users?pli=1 -- David. On 9/14/20 6:29 AM, Ana Marija wrote: Hello, I was running association analysis using --glm geno

Re: [R] How to represent the effect of one covariate on regression results?

2020-09-14 Thread Abby Spurdle
I'm wondering if you want one of these: (1) Plots of "Main Effects". (2) "Partial Residual Plots". Search for them, and you should be able to tell if they're what you want. But a word of warning: Many people (including many senior statisticians) misinterpret this kind of information. Because, it

Re: [R] RIDIT scoring in R

2020-09-14 Thread Bert Gunter
Generally speaking, statistical questions like this are O/T here. This list is mostly about R programming issues. While there is a non-null intersection, I would nevertheless suggest that you post on stats.stackexchange.com instead. Cheers, Bert Bert Gunter "The trouble with having an open mind

[R] RIDIT scoring in R

2020-09-14 Thread Tom Woolman
Hi everyone. I'd like to perform RIDIT scoring of a column that consists of ordinal values, but I don't have a comparison dataset to use against it as required by the Ridit::ridit function. As a question of best practice, could I use a normally distributed frequency distribution table gen

Re: [R] Function that finds elements from matrix, and saves the indices of the elements to another matrix

2020-09-14 Thread Rui Barradas
Hello, This is simple: which(A == 1, arr.ind = TRUE) Hope this helps, Rui Barradas Às 12:03 de 14/09/20, Tuomas Koponen escreveu: Hi all dear R-list users, This might sound a silly problem, but but for one reason or another it has proved unsolvable to me. I need to solve the following ta

Re: [R] question including crossover trials in meta-analysis

2020-09-14 Thread Marc Schwartz via R-help
Hi, Bert has pointed you to some R specific packages for meta-analyses via the Task View. It sounds like you may need to first address some underlying conceptual issues, which strictly speaking, is off-topic for this list. That being said, a quick Google search came up with some possible resou

Re: [R] question including crossover trials in meta-analysis

2020-09-14 Thread Bert Gunter
Did you first try a web search? -- you should always do this before posting here. "meta-analysis in R" brought up this: https://CRAN.R-project.org/view=MetaAnalysis Have you looked at this task view yet? Bert Gunter "The trouble with having an open mind is that people keep coming along and st

Re: [R] Function that finds elements from matrix, and saves the indices of the elements to another matrix

2020-09-14 Thread Bert Gunter
Is this a homework problem? We try not to do others' homework here. Incidentally, this can easily be done much more efficiently without any for() loops. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed

[R] How to reduce the sparseness in a TDM to make a cluster plot readable?

2020-09-14 Thread Andrew
Hello all I am doing some text mining on a set of five plain text files and have run into a snag when I run hclust in that there are just too many leaves for anything to be read. It returns a solid black line. The texts have been converted into a TDM which has a dim of 5,292 and 5 (as per 5 do

[R] question including crossover trials in meta-analysis

2020-09-14 Thread Belgers, V. (Vera)
Dear sir/madam, Thank you in advance for taking the time to read my question. I am currently trying to conduct a meta-analysis combining parallel and crossover trials. According to the Cochrane Handbook, I can include crossover trials by using t-paired statistics. So far, I have managed to condu

[R] Function that finds elements from matrix, and saves the indices of the elements to another matrix

2020-09-14 Thread Tuomas Koponen
Hi all dear R-list users, This might sound a silly problem, but but for one reason or another it has proved unsolvable to me. I need to solve the following task. I have tried to use two nested for loops as a solution, but have not been able to made it work. It would be great, if someone could for

Re: [R] how to replace values in a named vector

2020-09-14 Thread Rui Barradas
Hello, Please Ana, post data in dput format. And the expected output too. Hope this helps, Rui Barradas Às 17:37 de 14/09/20, Ana Marija escreveu: sorry not replace with NA but with empty string for a name, for example for example this: geneSymbol["Ku8QhfS0n_hIOABXuE"] Ku8QhfS0n_hIOABXuE

Re: [R] [External] Re: how to replace values in a named vector

2020-09-14 Thread Richard M. Heiberger
I can't understand non-words with that many letters. I think this is what you are looking for: > tmp <- c(A="a",B="b",C="c",D="d") > names(tmp) [1] "A" "B" "C" "D" > tmp A B C D "a" "b" "c" "d" > ## change values of B and C to "x" and "y" > names(tmp) %in% c("B","C") [1] FALSE TRUE TRUE

Re: [R] how to replace values in a named vector

2020-09-14 Thread Ana Marija
sorry not replace with NA but with empty string for a name, for example for example this: > geneSymbol["Ku8QhfS0n_hIOABXuE"] Ku8QhfS0n_hIOABXuE "MACC1" would go when I subject it to > geneSymbol["Ku8QhfS0n_hIOABXuE"] Ku8QhfS0n_hIOABXuE On Mon, Sep 14, 2020 at 11:35 AM Ana Marija w

[R] how to replace values in a named vector

2020-09-14 Thread Ana Marija
Hello, I have a vector like this: > head(geneSymbol) Ku8QhfS0n_hIOABXuE Bx496XsFXiAlj.Eaeo W38p0ogk.wIBVRXllY QIBkqIS9LR5DfTlTS8 BZKiEvS0eQ305U0v34 6TheVd.HiE1UF3lX6g "MACC1""GGACT" "A4GALT" "NPSR1-AS1""NPSR1-AS1" "AAAS" it has around 15000 en

Re: [R] monthly mean for each month and each year in the data frame

2020-09-14 Thread Stefano Sofia
Thank you again. I finally used aggregate because it build a data frame straight away. Stefano (oo) --oOO--( )--OOo Stefano Sofia PhD Civil Protection - Marche Region Meteo Section Snow Section Via del Colle Ameno 5 60126 Torrette di Ancona, Ancona Uff: 071 806 7743 E-mai

[R] How to represent the effect of one covariate on regression results?

2020-09-14 Thread Ana Marija
Hello, I was running association analysis using --glm genotypic from: https://www.cog-genomics.org/plink/2.0/assoc with these covariates: sex,age,PC1,PC2,PC3,PC4,PC5,PC6,PC7,PC8,PC9,PC10,TD,array,HBA1C. The result looks like this: #CHROMPOSIDREFALTA1TESTOBS_CTB

Re: [R] monthly mean for each month and each year in the data frame

2020-09-14 Thread Rui Barradas
Hello, Here are two aggregate options, the first base R only, the second one with package zoo. year_month <- format(df$data_POSIX, "%Y-%m") aggregate(value ~ year_month, df, mean)# or even value ~ format(etc) # year_monthvalue #12019-01 6.430922 #22019-02 4.846731 #32019-

Re: [R] monthly mean for each month and each year in the data frame

2020-09-14 Thread Stefano Sofia
Yes, perfect. Thank you. Stefano (oo) --oOO--( )--OOo Stefano Sofia PhD Civil Protection - Marche Region Meteo Section Snow Section Via del Colle Ameno 5 60126 Torrette di Ancona, Ancona Uff: 071 806 7743 E-mail: stefano.so...@regione.marche.it ---Oo-oO---

Re: [R] monthly mean for each month and each year in the data frame

2020-09-14 Thread Jim Lemon
Hi Stefano, What about this? df$months<-format(df$data_POSIX,"%Y-%m") snow_means<-by(df$value,df$months,mean) Jim On Mon, Sep 14, 2020 at 8:19 PM Stefano Sofia wrote: > > Dear R-list users, > I know that this is a trivial question, but I already wasted quite a large > amount of time on that. >

[R] monthly mean for each month and each year in the data frame

2020-09-14 Thread Stefano Sofia
Dear R-list users, I know that this is a trivial question, but I already wasted quite a large amount of time on that. I have a data frame with daily data of snow fall. I need to evaluate the monthly mean for each month and each year in the data frame. Could you help me to find an eficient way for