Re: [R] [External] Re: Error in setwd(dir) when initializing R

2023-11-22 Thread Ana de las Heras Molina
, Michael Dewey () escribió: > Dear Ana > > When you installed R it gave you an option to put a shortcut on the > desktop. If you did that then you can start the R GUI by clicking on it. > You may need to customise it for your preferences. Specifically it > starts R with an option cd

Re: [R] [External] Re: Error in setwd(dir) when initializing R

2023-11-21 Thread Ana de las Heras Molina
Hello, I am sorry for my ignorance, but what is Rgui.exe? El mar, 21 nov 2023 a las 12:06, Ivan Krylov () escribió: > В Tue, 21 Nov 2023 10:51:59 +0100 > Ana de las Heras Molina пишет: > > > I uninstalled onedrive, I eliminated all the folders and then > > rein

Re: [R] [External] Re: Error in setwd(dir) when initializing R

2023-11-21 Thread Ana de las Heras Molina
Hi, I uninstalled onedrive, I eliminated all the folders and then reinstalled R and RStudio... but it is RStudio the one creating a folder called C:\Users\Ana\OneDrive - Universidad Complutense de Madrid (UCM)\Documentos. This is what I obtained with the debugging Error in setwd(dir) : no es

Re: [R] [External] Re: Error in setwd(dir) when initializing R

2023-11-20 Thread Ana de las Heras Molina
Hello, Thank you all for your responses. When I initialize R, the folder in which it starts is: getwd() [1] "C:/Users/Ana/OneDrive - Universidad Complutense de Madrid (UCM)/Documentos" So it seems a problem with OneDrive -Kevin: I do not really understand your question... You mean i

[R] Error in setwd(dir) when initializing R

2023-11-20 Thread Ana de las Heras Molina
Hello, I am Ana de las Heras, and I write to you because every time I open RStudio or R directly I have the following message, before I can do anything at all: Error in setwd(dir) : no es posible cambiar el directorio de trabajo At first I didn't pay much attention to it, but I am having lots

[R] horizontal grouped stacked plots and removing space between bars

2023-06-28 Thread Ana Marija
I have code like this: data <- read.csv("test1.csv", stringsAsFactors=FALSE, header=TRUE) # Graph myplot=ggplot(data, aes(fill=condition, y=value, x=condition)) + geom_bar(position="dodge", stat="identity", width=0.5) + scale_fill_manual(values=c("#7b3294", "#c2a5cf", "#a6dba0",

[R] Issue with crammed Y axis

2023-06-16 Thread Ana Marija
", "18.7", "19", "6.4", "8.4", "20", "20.6"), PIE.3D.FFT = c("6", "8.6", "5.7", "4.3", "1 .0", "1 .1", "7.6", "8.4"), PIE.3D.FFT.comm. = c

Re: [R] log transform a data frame

2023-06-13 Thread Ana Marija
orical data, but not continuous, numeric data which are better > 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. > >

[R] log transform a data frame

2023-06-13 Thread Ana Marija
end= rownames(data2), beside= TRUE,las=2,cex.axis=0.7,cex.names=0.7,ylim=c(0,80), col=c("#9e9ac8", "#6a51a3")) If I don't log transform my code runs. Please advise, Ana [[alternative HTML version deleted]] __ R-help@r-pro

Re: [R] how to do inverse log of every value in every column in data frame

2021-10-14 Thread Ana Marija
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 Thu, Oct 14, 2021 at 10:10 AM Ana Marija > wrote: > >> Hi All, >> >> I hav

[R] how to do inverse log of every value in every column in data frame

2021-10-14 Thread Ana Marija
uct of natural log. I have to do inverse of it. So for example do do inverse of 0.6931472 I would do: > 2.718281828^0.6931472 [1] 2 How do I perform this operation for every single value in this data frame? The original data frame is this dimension: > dim(b) [1] 1441 18 T

Re: [R] calculate power-linear mixed effect model

2021-09-17 Thread Ana Marija
gt; -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > On Fri, Sep 17, 2021 at 12:22 PM Ana Marija > wrote: > > > > Hi All, > > > > I plan to identify metabolite levels that differ between individuals > > with various retinopa

[R] calculate power-linear mixed effect model

2021-09-17 Thread Ana Marija
. Can you please help, Thanks Ana __ 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 commented

Re: [R] unable to remove NAs from a data frame

2021-09-16 Thread Ana Marija
) > #[1] 145092258 > > df[14509227,] # beyond nrow(df) by 2 > > > Hope this helps, > > Rui Barradas > > > Às 15:12 de 16/09/21, Ana Marija escreveu: > > Hi All, > > > > I have lines in file that look like this: > > > >> df[14

[R] unable to remove NAs from a data frame

2021-09-16 Thread Ana Marija
N "numeric" "integer" > dim(df) [1] 145092258 Tried: > df=na.omit(df) > dim(df) [1] 145092258 and: > library(tidyr) > d=df %>% drop_na() > dim(d) [1] 145092258 Please advise, Thanks Ana ___

[R] Error in n * rvec : non-numeric argument to binary operator

2021-04-19 Thread Ana Marija
ec[df1] oavec<-tausqvec*avec buw<-sum(oavec*beta1vec)/sum(oavec) lamvec<-cvec*sum(oavec*(beta1vec-buw)^2)/sigsq ep<-ep+sum(wcpdf*pf(fcrit,df1,df,lamvec,lower.tail=FALSE)) } kbpower<-ep/repn } kbpower<-kbpowerf()

[R] how to quantify outliers on multi-dimensional scaling plot?

2021-03-31 Thread Ana Marija
for minfi package including making MDS plots: https://www.bioconductor.org/packages/release/workflows/vignettes/methylationArrayAnalysis/inst/doc/methylationArrayAnalysis.html Thanks Ana __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

Re: [R] making code (loop) more efficient

2020-12-16 Thread Ana Marija
rsplit(names, ":")[-2]] out <- data[, .(rsid, ref_allele, eff_allele)][, WGT := files[i]][] } return(out) rm(data) gc() } parallel::stopCluster(cl) big_data <- rbindlist(lst_out, fill = TRUE) On Wed, Dec 16, 2020 at 9:31 AM Ana Marija wrote: >

Re: [R] making code (loop) more efficient

2020-12-16 Thread Ana Marija
ster(cl) big_data <- rbindlist(lst_out) and i got: Error in { : task 4 failed - "$ operator is invalid for atomic vectors" > parallel::stopCluster(cl) I uploaded 3 RDat file here if you want to try it https://github.com/montenegrina/sample Thank you for looking into this Ana On Tue, D

Re: [R] making code (loop) more efficient

2020-12-15 Thread Ana Marija
names(a) data <- data.table(names, a["blup"]) nm1 <- c("rsid", "ref_allele", "eff_allele") any idea how I can rewrite this? On Tue, Dec 15, 2020 at 8:30 PM Jim Lemon wrote: > > Hi Ana, > I would look at "data" in your second example

Re: [R] making code (loop) more efficient

2020-12-15 Thread Ana Marija
parallelized version. On Tue, Dec 15, 2020 at 7:35 PM Jim Lemon wrote: > > Hi Ana, > My guess is that in your second code fragment you are assigning the > rownames of "a" and the _values_ contained in a$blup to the data.table > "data". As I don't have

[R] making code (loop) more efficient

2020-12-15 Thread Ana Marija
quot;, "eff_allele") data[, (nm1) := tstrsplit(names, ":")[-2]] return(data[, .(rsid, weight = blup, ref_allele, eff_allele)][, WGT := files[i]][]) } parallel::stopCluster(cl) big_data <- rbindlist(lst_out) I am getting this Error: Error in { : t

Re: [R] how to order variables on correlation plot

2020-11-06 Thread Ana Marija
lp page, ?corrplot . > > -- > > David. > > On 11/6/20 6:08 AM, Ana Marija wrote: > > sorry forgot to attach the plot. > > On Fri, Nov 6, 2020 at 8:07 AM Ana Marija wrote: > > Hello > > I have data like this: > > head(my_data) > > subjects DIABDUR HB

Re: [R] how to order variables on correlation plot

2020-11-06 Thread Ana Marija
sorry forgot to attach the plot. On Fri, Nov 6, 2020 at 8:07 AM Ana Marija wrote: > > Hello > > I have data like this: > > > head(my_data) > subjects DIABDUR HBA1C ESRD SEX AGE PHENO C1 C2 > 1 fam0110_G110 38 9.41 2 51 2 -

[R] how to order variables on correlation plot

2020-11-06 Thread Ana Marija
uot;correlation.pdf") corrplot(res, type = "upper", order = "hclust", tl.col = "black", tl.srt = 45) dev.off() and I am getting the plot in attach. How to make it so that my variables are shown on the plot in the order they are in my_data data frame? Th

Re: [R] how do I remove entries in data frame from a vector

2020-10-21 Thread Ana Marija
Makes sense, thank you! On Wed, 21 Oct 2020 at 17:46, Rolf Turner wrote: > > On Wed, 21 Oct 2020 16:15:22 -0500 > Ana Marija wrote: > > > Hello, > > > > I have a data frame with one column: > > > > > remove > > > >

Re: [R] how do I remove entries in data frame from a vector

2020-10-21 Thread Ana Marija
e %in% as.character(remove$V1)] > > > > > > Hope this helps, > > > > Rui Barradas > > > > Às 22:15 de 21/10/20, Ana Marija escreveu: > >> Hello, > >> > >> I have a data frame with one column: > >> &g

[R] how do I remove entries in data frame from a vector

2020-10-21 Thread Ana Marija
ied doing this: b= celFiles[!basename(celFiles) %in% as.character(remove$V1)] but none of the 8th entries in "remove" data frame have been removed. Please advise, Ana __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https:

Re: [R] 2 D density plot interpretation and manipulating the data

2020-10-09 Thread Ana Marija
. > And if it's a good idea, then how much to trim. > > > On Sat, Oct 10, 2020 at 5:47 AM Ana Marija > wrote: > > > > Hi Bert, > > > > Another confrontational response from you... > > > > You might have noticed that I use the word "outl

Re: [R] 2 D density plot interpretation and manipulating the data

2020-10-09 Thread Ana Marija
interpret the plot. I was hoping someone here knows that and can help me. Ana On Fri, Oct 9, 2020 at 11:31 AM Bert Gunter wrote: > > I recommend that you consult with a local statistical expert. Much of what > you say (outliers?!?) seems to make little sense, and your statistical > k

Re: [R] 2 D density plot interpretation and manipulating the data

2020-10-09 Thread Ana Marija
sd FQC.10090295 0.0327 0.002678 0.0517 FQC.10119363 0.0220 0.000978 0.0313 FQC.10132112 0.0275 0.002088 0.0457 FQC.10201128 0.0169 0.000289 0.0170 FQC.10208432 0.0443 0.004081 0.0639 FQC.10218466 0.0116 0.000131 0.0115 ... the distribution is not normal, it is right-skewed. Cheers, Ana On Fr

Re: [R] 2 D density plot interpretation and manipulating the data

2020-10-08 Thread Ana Marija
NP[SNP$density>400,] and plot it again: p <- ggplot(a, mapping = aes(x = mean, y = var)) p <- p + geom_density_2d() + geom_point() + my.theme + ggtitle("SNPS_red") On Thu, Oct 8, 2020 at 3:52 PM Ana Marija wrote: > > Hello, > > I have a data frame like this: > >

[R] 2 D density plot interpretation and manipulating the data

2020-10-08 Thread Ana Marija
e ellipses-contours? 2. how do I extract from my data frame the points which are outside of ellipses? Thanks Ana snps.pdf Description: Adobe PDF document __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mail

Re: [R] how to turn column into column names and fill it with values

2020-09-29 Thread Ana Marija
4:ncol(mt)) mt[,i] <- 1 + (names(mt)[i]== mt$PLATE) Thanks! On Tue, Sep 29, 2020 at 12:08 PM Ana Marija wrote: > > HI Bert, > > thank you for getting back to me. > I tried this: > > > dat <- cbind(mc, matrix(0,ncol = 34)) > > head(dat) > FID IID PLATE 1

Re: [R] how to turn column into column names and fill it with values

2020-09-29 Thread Ana Marija
NA NA NA NA NA NA NA ... so this gives me the correct columns. Now is the question of how to replace NA with 2 id column name matches the rownname in PLATE column with 2 otherwise it is 1. Cheers, Ana On Tue, Sep 29, 2020 at 11:46 AM Bert Gunter wrote: > >

[R] how to turn column into column names and fill it with values

2020-09-29 Thread Ana Marija
se value.var to override. Please advise, Ana __ 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 commented, m

Re: [R] help with nesting if else statements

2020-09-23 Thread Ana Marija
osition 1 taken as TRUE when assigning to type 'logical' (column 6 named 'PHENO') Please advise, Ana On Wed, Sep 23, 2020 at 2:48 PM Jeremie Juste wrote: > > > Hello Ana Marija, > > I cannot reproduce your error, > > with a$PHENO=ifelse(a$PLASER==2 |a$RTNPTHY==2, 2, ifelse(

Re: [R] help with nesting if else statements

2020-09-23 Thread Ana Marija
, 2020 at 11:43 AM Ana Marija wrote: > > Hello, > > I have a data frame as shown bellow. > I want to create a new column PHENO which will be defined as follows: > if CURRELIG==1 -> PHENO==1 > in the above subset those that have: > PLASER==2 -> PHENO==2 > and >

[R] help with nesting if else statements

2020-09-23 Thread Ana Marija
1 1 2 fam5709 G57091 1 1 fam5713 G57131 1 1 fam5715 G57151 1 1 fam5718 G57181 1 1 Please advise, Ana __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

Re: [R] how to overlay two histograms

2020-09-17 Thread Ana Marija
HI Jim, fantastic solution! Thank you so much!!! Ana On Thu, Sep 17, 2020 at 6:01 PM Jim Lemon wrote: > > Hi Ana, > Sorry it's not in ggplot, but it may help: > > d<-read.table(text="CHR counts name > 1 193554 old > 2 220816 old > 3 174350 old > 4

[R] how to overlay two histograms

2020-09-17 Thread Ana Marija
show counts per CHR in "old" and "new" side by side. Please advise, Ana __ 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://

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

2020-09-15 Thread Ana Marija
% had Type 1. (my TD covariate is reference for the type of diabetes) In the attach is the description of the data. Cheers, Ana On Tue, Sep 15, 2020 at 7:59 PM David Winsemius wrote: > > > On 9/15/20 8:57 AM, Ana Marija wrote: > > Hi Abby and David, > > > > Th

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

2020-09-15 Thread Ana Marija
ect or what kind of conclusion I can draw from that? Thanks for all your help Ana On Tue, Sep 15, 2020 at 1:26 AM David Winsemius wrote: > > 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. > >

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,

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

2020-09-14 Thread Ana Marija
better way to do this from the data I already have? Thanks Ana __ 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.h

Re: [R] How to extract information from .Rdata format

2020-07-31 Thread Ana Marija
ed for tutorials also. This list cannot > substitute for such homework on your own. > > Bert 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&qu

Re: [R] How to extract information from .Rdata format

2020-07-31 Thread Ana Marija
It seems that "treatment" and "patient" are just vectors. > treatment [1] "treat" "treat" "treat" "treat" "treat" "control" "control" [8] "control" "control" "cont

Re: [R] How to extract information from .Rdata format

2020-07-31 Thread Ana Marija
uot;treatment" > str(treatment) chr [1:10] "treat" "treat" "treat" "treat" "treat" "control" "control" ... but this is not the format I need. On Fri, Jul 31, 2020 at 9:18 PM Ana Marija wrote: > > Hello, > >

[R] How to extract information from .Rdata format

2020-07-31 Thread Ana Marija
Hello, I have this file: > a=load("paired_example.Rdata") > a [1] "rawdata" "treatment" "patient" I can extract "rawdata" with: dat<-local(get(load("paired_example.Rdata"))) Can you please advise how

[R-es] pedido de ayuda

2020-07-12 Thread Ana Kohan Cortada
aparecen en la pestaña de Análisis y empezar a aplicar algunos análisis. Yo sé que tal vez se dediquen sólo a trabajar con R (pero yo recién descubro esta interfase del RCmdr y me resulta más amigable, soy psicóloga y hago psicometría) Desde ya, muchísimas muchas gracias desde Argentina!  Dra. Ana

Re: [R-es] problemas con el comando "twoway.plots"

2020-07-10 Thread Ana Kohan Cortada
dediquen sólo a trabajar con R (pero yo recién descubro esta interfase del RCmdr y me resulta más amigable, soy psicóloga y hago psicometría) Desde ya, muchísimas gracias desde Argentina!  Dra. Ana Kohan Cortada     CIIPME-CONICET        155 0441827 El viernes, 10 de julio de 2020 07:25:50

Re: [R] How to loop over two files ...

2020-06-22 Thread Ana Marija
Thank you so much as.character(r) indeed resolved the issue! On Sat, Jun 20, 2020 at 3:47 AM Ivan Krylov wrote: > > On Fri, 19 Jun 2020 19:36:41 -0500 > Ana Marija wrote: > > > Error in cat(x, file = file, sep = c(rep.int(sep, ncolumns - 1), > > "\n"),

Re: [R] How to loop over two files ...

2020-06-19 Thread Ana Marija
but I try to avoid extras > > make your for statements: > > for ( a in rownames(f1) ) { > > # a will now be a row number rather than the value, so replace ' a ' in > the paste0 with: f1[ a, 1] > > so > > ext <- paste0( "/ld/human/pairwise/", >

Re: [R] How to loop over two files ...

2020-06-19 Thread Ana Marija
SNPs at the time and I need to do that for 300 pairs On Fri, Jun 19, 2020 at 6:42 PM Rasmus Liland wrote: > > On 2020-06-19 14:34 -0500, Ana Marija wrote: > > > > I have two files (each has 300 lines)like this: > > The example looks quite similar to the R example in &g

Re: [R] How to loop over two files ...

2020-06-19 Thread Ana Marija
u may have something that adds it but better to use > something that works. So try using: > > library(readr) > f1 <- read_tsv("1g.txt", col.names=F) > > This will give you a tibble with f1$X1 with the file in it > > then loop it with (a in as.list(f1[,1]) > > Ot

Re: [R] How to loop over two files ...

2020-06-19 Thread Ana Marija
en compressed file '1000GENOMES:phase_3:KHV.rds', probable reason 'No such file or directory' > lapply(r[1:4], function(x) { + jsonlite::fromJSON(jsonlite::toJSON(httr::content(x))) + }) Error in lapply(r[1:4], function(x) { : object 'r' not found Am I am doing here some

Re: [R] How to loop over two files ...

2020-06-19 Thread Ana Marija
> > r <- GET(paste(server, ext, sep = ""), > content_type("application/json")) > > # You presumably need to do something with 'r' at the > moment its over written by the next loop.. were > # you appending

[R] How to loop over two files ...

2020-06-19 Thread Ana Marija
and output every line of result in list.txt The process is illustrated in the attachment. Please help, Ana lists.pdf Description: Adobe PDF document __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/

Re: [R] comparing variances/distributions

2020-06-17 Thread Ana Marija
proximate in the presence of ties as I understand high p-values here say I cannot claim statistical support for a difference, but low p-values are not evidence of sameness? D should be the maximum difference between the two probability distributions? On Wed, Jun 17, 2020 at 3:06 PM Ana Marija wrote: > &g

[R] comparing variances/distributions

2020-06-17 Thread Ana Marija
99937, num df = 1454159, denom df = 1454159, p-value = 0.7057 alternative hypothesis: true ratio of variances is not equal to 1 95 percent confidence interval: 0.9970808 1.0016750 sample estimates: ratio of variances 0.9993739 Or some other test makes more sense? Thanks Ana qq-plots-c

Re: [R] how to change manhattan plot code to get a different color per chromosome

2020-06-16 Thread Ana Marija
np="MARKER",suggestiveline = F, genomewideline = F,main = "Gokind old",col = c("red2", "orange", "gold1","springgreen4", "dodgerblue", "darkorchid1","orchid1"),ylim=c(0,9),cex = 0.6) in this qqman function. C

[R] how to change manhattan plot code to get a different color per chromosome

2020-06-15 Thread Ana Marija
og,chr="CHR",bp="POS",p="META_pval",snp="MARKER",ylim = c(0, 10)) dev.off() Thanks Ana __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

Re: [R] if else statement adjustemtn

2020-06-15 Thread Ana Marija
HI Jim thank you so much! This is amazing answer!!! Ana On Sat, Jun 13, 2020 at 4:09 AM Jim Lemon wrote: > > Right, back from shopping. Since you have fourteen rows containing NAs > and you only want seven, we can infer that half of them must go. As > they are neatly divided int

Re: [R] if else statement adjustemtn

2020-06-12 Thread Ana Marija
opriate logic to get rid of only the > ones you don't want. > > Jim > > On Sat, Jun 13, 2020 at 12:50 PM Ana Marija > wrote: > > > > Hi Rasmus, > > > > thank you for getting back to be, the command your provided seems to > > add all 11 NAs to 2s > &

Re: [R] if else statement adjustemtn

2020-06-12 Thread Ana Marija
; > > On Sat, Jun 13, 2020 at 10:46 AM Ana Marija wrote: > > > > > > > > I am trying to make a new column > > > > "pheno" so that I reduce the number > > > > of NAs > > > > > > it looks like those two NA values in >

Re: [R] if else statement adjustemtn

2020-06-12 Thread Ana Marija
exclude = NULL) 12 859 828 11 Am I am doing something wrong? Thanks Ana On Fri, Jun 12, 2020 at 8:06 PM Jim Lemon wrote: > > Hi Ana, > From your desired result, it looks like those two NA values in PLASER > are the ones you want to drop. > If so, try this: > > b

[R] if else statement adjustemtn

2020-06-12 Thread Ana Marija
,1) > table(b$pheno, exclude = NULL) 12 859 828 11 I would like to reduce this number of NAs to be 7 so I would like to have in "pheno column" 7 NAs 825 2s (825=691+14+70+7+43) and the rest would be 1s (866=1698-7-825) How can I change the above command t

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
some shown on the x-axis? On Thu, Jun 11, 2020 at 4:39 PM wrote: > > Your dots are too big! > > Add > > geom_points(... , size = 1 > > May need to play... 0.5 or 0.1? > > On 11 Jun 2020 22:26, Ana Marija wrote: > > I tried it, > ggplot( data = tmp.tidy) +geom

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
I tried it, ggplot( data = tmp.tidy) +geom_point( aes(y = BP,x = CHR,color=key) ,position = "jitter" ) I got the attached On Thu, Jun 11, 2020 at 4:18 PM wrote: > > Try adding > position = "jitter" to the geom_point(... > > > > On 11 Jun 2020 21:41, Ana M

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
Hello, I tried your code and this is what I got I really need two groups side by side shown per chromosome as it is here: https://imgur.com/a/pj40c on the image there are 4 groups I do have only two On Thu, Jun 11, 2020 at 11:52 AM wrote: > > On 2020-06-11 15:59, Ana Marija wrote: >

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
me, and CHR would go from 1 to 22 On Thu, Jun 11, 2020 at 9:26 AM wrote: > > On 2020-06-11 14:54, Ana Marija wrote: > > Hello, > > > > I expected it to look like this: > > https://imgur.com/a/pj40c > > > > Ah - so all on the one plot? - so you don't want a

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
m 0.952 0.475 0.529 0.255 0.295 ... Unfortunately qqman doesn't do this kind of overlay of two plots On Wed, Jun 10, 2020 at 11:24 PM John wrote: > > On Wed, 10 Jun 2020 15:36:11 -0500 > Ana Marija wrote: > > > Hello, > > > > I have a data frame like this: > &g

Re: [R] How to stack two Stack manhattan plots?

2020-06-10 Thread Ana Marija
ssoc.logistic.jpeg") manhattan(results_log,chr="CHR",bp="BP",p="P",snp="SNP", main = "Manhattan plot:logistic") dev.off() this code does work with another data set, the jpeg() does work. I will try now with PNG On Wed, Jun 10, 2020 at 5:17 PM Jim Le

[R] Error in plot.window(...) : need finite 'ylim' values

2020-06-10 Thread Ana Marija
t;SNP", main = "Manhattan plot: logistic") dev.off() but I am getting: Error in plot.window(...) : need finite 'ylim' values Calls: manhattan ... do.call -> plot -> plot.default -> localWindow -> plot.window Execution halted Please advise, Thanks Ana _

Re: [R] how to filter variables which appear in any row but do not include

2020-06-03 Thread Ana Marija
Hi Rui, thank you so much, that is exactly what I needed! Cheers, Ana On Wed, Jun 3, 2020 at 11:50 AM Rui Barradas wrote: > > Hello, > > If you want to filter out rows with any of the values in a 'unwanted' > vector, try the following. > > First, create a test data se

Re: [R] how to filter variables which appear in any row but do not include

2020-06-03 Thread Ana Marija
created just remove any row that contains any of those variables. Thanks Ana On Wed, 3 Jun 2020 at 11:00, Bert Gunter wrote: > I suggest that you forget all that fancy stuff (and this is not a use > case for regular expressions). > Use %in% with logical subscripting instead -- basic R func

[R] how to filter variables which appear in any row but do not include

2020-06-03 Thread Ana Marija
('^E11', x, value = TRUE)) d1=unlist(s1) d11=unique(d1) > d11 [1] "E11" "E119" "E113" "E115" "E111" "E114" "E110" "E118" "E116" "E112" [11] "E117" I need help with changing this command

Re: [R] is there is a way to extract lines in between 3 files that are in common based on one column?

2020-06-01 Thread Ana Marija
Hi Jim, not in this case, but thanks for asking! Ana On Mon, Jun 1, 2020 at 10:04 PM Jim Lemon wrote: > > So recombination sticks out its foot before us. Do you want to account > for gene linkage? > > JIm > > On Tue, Jun 2, 2020 at 11:55 AM Ana Marija > wrote: >

Re: [R] is there is a way to extract lines in between 3 files that are in common based on one column?

2020-06-01 Thread Ana Marija
r","Chr")) nn2<-merge(nn1,ret1,by=c("Marker","Chr")) > Marker3<-nn2$Marker > length(Marker3) [1] 3742962 > Marker4<-nn1$Marker > length(Marker4) [1] 373 On Mon, Jun 1, 2020 at 8:50 PM Ana Marija wrote: > > Hi David, > > that is a

Re: [R] is there is a way to extract lines in between 3 files that are in common based on one column?

2020-06-01 Thread Ana Marija
43494 9 How would I rewrite this code so that is merging by Chr and Marker column? It seems that a Marker can be under a few Chr. On Mon, Jun 1, 2020 at 8:41 PM David Winsemius wrote: > > > On 6/1/20 5:40 PM, Ana Marija wrote: > > Hi Jim, > > > > thank you so m

Re: [R] is there is a way to extract lines in between 3 files that are in common based on one column?

2020-06-01 Thread Ana Marija
. Cheers Ana On Mon, Jun 1, 2020 at 7:31 PM Jim Lemon wrote: > Hi Ana, > Not too hard, but your example has all the "marker" fields in common. > So using a sample that will show the expected result: > > neu1<-read.table(text="Chr BP Marker MAF A1 A2 Directio

[R] is there is a way to extract lines in between 3 files that are in common based on one column?

2020-06-01 Thread Ana Marija
:A 0.0982587 A G - 0.272936 1608 2234642 1 14726 1:14726:G:A 0.1340170 A G - 0.594538 1608 Is there is a way to create another 3 data frames, say neu2, nep2, ret2 which would only contain lines that have the same entries in Marker column for all 3 data frames? Thanks Ana

Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread Ana Marija
0.4156 G A + 0.484813 1641 2 10 10645 10:10645:A:C 0.216027 C A + 0.73597 1641 Can you please tell me what colClasses=colClassvec suppose to do? Thanks Ana On Mon, Jun 1, 2020 at 4:13 PM David Winsemius wrote: > > On 6/1/20 1:37 PM, Ana Marija wrote: &g

Re: [R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread Ana Marija
ple keep coming along and > sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Mon, Jun 1, 2020 at 1:38 PM Ana Marija > wrote: > >> Hello, >> >> I have a dataframe like this: >> >> Chr

[R] how to load data frame where numeric will be numeric instead of character

2020-06-01 Thread Ana Marija
ble("gokind.neuropathy.fin", header=T,stringsAsFactors=FALSE) and every column is numeric. How to say have all numeric ones stay numeric like: Chr, BP, MAF, pValue, N Thanks Ana [[alternative HTML version deleted]] __ R-help@r-projec

Re: [R] How to only show two numbers on bar_plot with ggplot

2020-05-22 Thread Ana Marija
ous(breaks = unique(d)) ed where: > head(e) ESRD pheno 11 1 21 1 31 2 41 1 51 1 > sapply(e,class) ESRD pheno "integer" "factor" On Fri, May 22, 2020 at 1:52 PM Ana Marija wrote: > > Hello, > > I made t

[R] How to only show two numbers on bar_plot with ggplot

2020-05-22 Thread Ana Marija
Hello, I made the plot in attach via: ed<-ggplot(e) + geom_bar(aes(x = ESRD, fill = factor(pheno,labels=c("control","case"+scale_fill_manual(values=c("#56B4E9","#E7B800"))+labs(fill="pheno")

Re: [R] how to show percentage of individuals for two groups on histogram?

2020-05-22 Thread Ana Marija
()) I am getting the plot in attach, while my results should be more in this range like on the plot here: https://www.ncbi.nlm.nih.gov/projects/gap/cgi-bin/variable.cgi?study_id=phs18.v2.p1=19980=154=2864=62=1==1 On Fri, May 22, 2020 at 12:18 AM Eric Berger wrote: > >

Re: [R] how to show percentage of individuals for two groups on histogram?

2020-05-22 Thread Ana Marija
ou the whole dataset if you would like to try with it On Thu, May 21, 2020 at 11:14 PM Jim Lemon wrote: > > Hi Ana, > Just noticed a typo from a hasty cut-paste. Two lines should read: > > casehist<-table(cut(aafd$HBAIC[aafd$pheno=="case"],breaks=0:15)) > cont

Re: [R] how to show percentage of individuals for two groups on histogram?

2020-05-21 Thread Ana Marija
the result would basically look something like this on in attach or the overlay of those two plots On Thu, May 21, 2020 at 5:23 PM Ana Marija wrote: > > Hello, > > I have a data frame like this: > > head(a) > FID IID FLASER PLASER DIABDUR HBA1C ESRD pheno

[R] how to show percentage of individuals for two groups on histogram?

2020-05-21 Thread Ana Marija
dth=.5, position="dodge") there is 848 who have "case" in pheno column and 892 who have "control" in pheno column. I would like to have on y-axis shown percentage of individuals which have either "case" or "control" in pheno instead of count. Please advis

Re: [R] text annotation on Manhattn plot in qqman

2020-05-20 Thread Ana Marija
5,annotatePval = 0.0001) but I am getting this error: Error in textxy(topSNPs$pos, -log10(topSNPs$P), offset = 0.625, labs = topSNPs$SNP, : formal argument "cex" matched by multiple actual arguments Do you by any chance know how to do this? Cheers Ana On Wed, May 20, 2020 at 4:1

Re: [R] text annotation on Manhattn plot in qqman

2020-05-19 Thread Ana Marija
Hi Michael, can you please send me code how that would be done? Thanks Ana On Tue, May 19, 2020 at 11:18 AM Michael Dewey wrote: > > Dear Ana > > Perhaps paste together SNP and GENE using paste() and then supply that > as the snp parameter. > > Michael > > On 19/05/2

[R] text annotation on Manhattn plot in qqman

2020-05-19 Thread Ana Marija
SNP=="rs4081570",] SNPP CHR BP GENE 1 rs4081570 6.564447e-05 19 15918647 UCA1 > a[a$SNP=="rs11867934",] SNPP CHR BP GENE 1021 rs11867934 6.738066e-06 17 16933404 FLCN Right now my plot only has SNP name for those 2

Re: [R] how to extract strings in any column and in any row that start with

2020-05-15 Thread Ana Marija
Hi Rui, thank you so much that is exactly what I needed! Cheers, Ana On Fri, May 15, 2020 at 5:12 PM Rui Barradas wrote: > > Hello, > > I have tried several options and with large dataframes this one was the > fastest (in my tests, of the ones I have tried). > > > s1 &

Re: [R] how to extract strings in any column and in any row that start with

2020-05-15 Thread Ana Marija
ith E10. Thanks Ana On Fri, May 15, 2020 at 12:13 PM Jeff Newmiller wrote: > > Read about regular expressions... they are extremely useful. > > df1 <- tot %>% filter_all(any_vars(grepl( '^E10', .))) > > It is bad form not to put spaces around the <- assignment. > &

[R] how to extract strings in any column and in any row that start with

2020-05-15 Thread Ana Marija
s that start with E10... it would look something like this: [1] "E102" "E109" "E108" "E103" "E104" "E105" "E101" "E106" "E107" Thanks Ana __ R-help@r-project.o

[R] Error: Cannot use `+.gg()` with a single argument.

2020-05-07 Thread Ana Marija
uot;Populations in millions (log scale)")+ +ylab("Total number of murders (log scale)")+ +ggtitle("US Gun Murders in US 2010")+ +scale_color_discrete(name="Region")+ +theme_economist() Is this an issue with my d

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

2020-05-06 Thread Ana Marija
> > t.test(x, mu = beta0)$statistic > > > But in this case the estimator is the estimator for the mean value. > > Hope this helps, > > Rui Barradas > > Às 15:54 de 06/05/20, Ana Marija escreveu: > > Thanks Patrick, so in conclusion this is fine? > > z-sco

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

2020-05-06 Thread Ana Marija
Thanks Patrick, so in conclusion this is fine? z-score=Beta/StdErr On Wed, May 6, 2020 at 9:52 AM Patrick (Malone Quantitative) wrote: > > 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

  1   2   3   4   >