Re: [R] scatter plot

2020-02-10 Thread John Kane
In line On Mon, 10 Feb 2020 at 15:12, Ana Marija wrote: > Hi, > > Thanks for getting back to me. I need to have there two groups: > > "nPDR.rg and "PDR.rg" > Your sample data only contains NoD.rg & nPDR.rg. To start with, I think we need some representative data supplied in dput format just

Re: [R] scatter plot

2020-02-10 Thread Rui Barradas
Hello, In the loop, try filtering out the values you do not want. Any of print(ggscatter(mds %>% dplyr::filter(cols != "NoD.rg"), etc)) print(ggscatter(subset(mds, cols != "NoD.rg"), etc)) tmp <- mds %>% filter(cols != "NoD.rg") print(ggscatter(tmp, etc)) The first two will create a tempora

Re: [R] scatter plot

2020-02-10 Thread Ana Marija
Hi, Thanks for getting back to me. I need to have there two groups: "nPDR.rg and "PDR.rg" can you please let me know how my loop would look like just with those two groups? Thanks Ana On Mon, Feb 10, 2020 at 2:03 PM John Kane wrote: > > I must admit that I do not understand what you are doin

Re: [R] scatter plot

2020-02-10 Thread John Kane
I must admit that I do not understand what you are doing but can you notm just subset the data? Note I am using a data.frame not a tibble. It would be helpful if you could supply sample data in dput() forest. library("ggpubr") mds <- structure(list(Dim.1 = c(0.41, 0.184, 0.394, -0.49, 0.635, -0

[R] scatter plot

2020-02-10 Thread Ana Marija
Hello, I have a code like this: mds <- (ar_diff) %>% dist() %>% cmdscale(k=3) %>% as_tibble() mds$cols <- as.factor(c(rep("nPDR.rg",7), rep("PDR.rg",8), rep("NoD.rg",7))) pdf(file = "RG.pdf") for (dim1 in 1:2){ for (dim2 in (dim1+1):3){ d1 = paste0("Dim.",dim1); d2 = paste0("Dim.",dim2

Re: [R] Help to do this exercise

2020-02-10 Thread Rui Barradas
Hello, R-help has a no homework policy. Please find help somewhere else, Rui Barradas Às 10:50 de 09/02/20, hương phạm escreveu: N1 Consider the database "LakeHuron" , containing the annual measurements of the level (in feet) of Lake Huron 1875{1972, see https://stat.ethz.ch/R-manual/Rdevel/l

Re: [R] [External Email] Help to do this exercise

2020-02-10 Thread Christopher W Ryan
Homework questions are generally frowned upon on R-help List. It is best to discuss those questions with your instructor. --Chris Ryan SUNY Upstate Medical University Clinical Campus at Binghamton On Mon, Feb 10, 2020 at 9:39 AM hương phạm wrote: > N1 Consider the database "LakeHuron" , contain

[R] Help to do this exercise

2020-02-10 Thread hương phạm
N1 Consider the database "LakeHuron" , containing the annual measurements of the level (in feet) of Lake Huron 1875{1972, see https://stat.ethz.ch/R-manual/Rdevel/library/datasets/html/LakeHuron.html. The general aim is to estimate the probability density of the level of the lake. (i) Construct the

Re: [R] k-nearest neighbours from distance matrix in spdep

2020-02-10 Thread Juan Antonio Rodriguez Perez
Dear all, I got a message from the spdep package developer and suggested me to open a GitHub issue for the problem. Please follow the discussion at: https://github.com/r-spatial/spdep/issues/38 Cheers, J De: Juan Antonio Rodriguez Perez Enviado: venres 07 f