Re: [R] Mapping of countries

2020-03-30 Thread Bert Gunter
Probably better posted to the r-sig-geo list, where you are more likely to find the relevant expertise. Perhaps see also https://cran.r-project.org/web/views/Spatial.html, depending on what you plan to do with your maps. Bert Gunter "The trouble with having an open mind is that people keep

Re: [R] Mapping of countries

2020-03-30 Thread Erin Hodgess
Hello George! Do you mean to have a map of the world with these countries filled in, or to have just those countries on the map, please? Thanks, Erin Erin Hodgess, PhD mailto: erinm.hodg...@gmail.com On Mon, Mar 30, 2020 at 7:38 PM george brida wrote: > Dear R users, > > i would like to

Re: [R] How to match strings in two files and replace strings?

2020-03-30 Thread Ana Marija
HI Jim, thank you so much for getting back to me, I think the issue is with reading that csv file > marker_info<-read.csv("marker-info",header=F,stringsAsFactors=FALSE) > head(marker_info) V1 1 #Column Description: 2 #Column is separated by '

Re: [R] How to match strings in two files and replace strings?

2020-03-30 Thread Jim Lemon
Hi Ana, This seems to work. It shouldn't be too hard to do the renaming and reordering of columns. output11.frq<-read.table(text="CHR SNP A1 A2 MAF NCHROBS 1 1:775852:T:CTC 0.1707 3444 1 1:1120590:A:CCA 0.08753 3496 1 1:1145994:T:CCT

[R] Mapping of countries

2020-03-30 Thread george brida
Dear R users, i would like to plot the maps of the Gulf Cooperation Council (GCC) countries (KSA, Qatar, Bahrain, Kuwait, UAE and Oman) with these constraints: i/ KSA , Qatar and Bahrain have the same face color , ii/ Kuweit and UAE with the same face color and iii/Oman with another face color.

[R] How to match strings in two files and replace strings?

2020-03-30 Thread Ana Marija
I have a file like this: (has 308545 lines) head output11.frq CHR SNP A1 A2 MAF NCHROBS 1 1:775852:T:CTC 0.1707 3444 1 1:1120590:A:CCA 0.08753 3496 1 1:1145994:T:CCT 0.1765

Re: [R] custom function insite dlys::mutate

2020-03-30 Thread Rasmus Liland
On 2020-03-30 13:21 +, SIMON Nicolas wrote: | Apparently the condition " if ( var1 > tt ) " | cannot be evaluated correcty. | | Could you please give me an advice to write it | properly? Hi! To understand what you wanted to do, I tried to recreate your example in classic R indexing of a

Re: [R] custom function insite dlys::mutate

2020-03-30 Thread Rasmus Liland
On 2020-03-30 13:21 +, SIMON Nicolas wrote: > Could you please give me an advice to write it > properly? Hi! To understand what you wanted to do, I tried to recreate your example in classic R indexing of a data.frame, then converting it to a tibble: var1 <- seq(0, 20, 1) var2 <-

Re: [R] [FORGED] Not seeing the results of a function

2020-03-30 Thread Rolf Turner
On 30/03/20 7:55 am, David wrote: I’m trying to write a function that will add items to two vectors, and then to create a third vector that is of the form 1, 2, 3, …, length of one of the newly modified vectors.  My problem is that what I’ve written doesn’t seem to return any of those

Re: [R] Error in robdist.hbrfit(x) : x is probably collinear

2020-03-30 Thread varin sacha via R-help
Hi Bert, Many thanks for your response. Yes, my toy example is not representative of the reality. You are right without colinearity my R code works. As you say, it may be overfitting and there must be colinearity, even if for me colinearity is not really a problem it is more a nuisance. It

Re: [R] Error in robdist.hbrfit(x) : x is probably collinear

2020-03-30 Thread Bert Gunter
I know nothing about the packages in question, but do you know what "collinear" means and how/why it can mess up model fitting? If no, that may be the problem. See also "overfitting." Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it."

[R] Error in robdist.hbrfit(x) : x is probably collinear

2020-03-30 Thread varin sacha via R-help
Hi, A google search does not give me any hint :=( Maybe somebody can help me to fix the error message I get : Error in robdist.hbrfit(x) : x is probably collinear # # # # # # # # # # # # # # # # # # # ## # # # # # # # # # # # # # #

Re: [R] RODBC Multiple Results

2020-03-30 Thread Law, Jason
Harold, I have dealt with this problem over the years and after much experimenting, I can say that I *think* what you want is impossible. For RODBC, you need a stored proc that uses SET NOCOUNT ON and that only returns a single result set. You may want to try experimenting with the odbc

Re: [R-es] Tareas interactivas en R

2020-03-30 Thread Manuel Spínola
Muchas gracias Javier. Voy a ver la información. Manuel El lun., 30 mar. 2020 a las 9:43, Javier Marcuzzi (< javier.ruben.marcu...@gmail.com>) escribió: > Estimado Manuel Spíndola > > No es justo R, pido disculpas por eso, hoy veo en una publicación española > algo que puede servir para dar

Re: [R] Posting: R-Project Code/Package for a Stepwise Multiple Regression Analysis

2020-03-30 Thread Mitchell Maltenfort
Also see the 'rms' package. If you use validate with bw=TRUE you can see often a given predictor will be retained. On Mon, Mar 30, 2020 at 11:57 AM stephen sefick wrote: > Please search archives and Google. There are many resources. I think that > the MASS package has stepwise regression, but

Re: [R] Posting: R-Project Code/Package for a Stepwise Multiple Regression Analysis

2020-03-30 Thread stephen sefick
Please search archives and Google. There are many resources. I think that the MASS package has stepwise regression, but please confirm yourself. On Mon, Mar 30, 2020, 09:45 Jastine bugayong wrote: > Statistics newbie over here getting her feet wet into the research realm. > > I will be using

Re: [R] Error message using boot.ci function

2020-03-30 Thread Rui Barradas
Hello, David is right, the response is named 'crp', not 'fastMM'. And there is no need to run the regression twice. Try # function to obtain MSE MSE <- function(data, indices, formula, method) { d <- data[indices, ] # allows boot to select sample fit <- lmrob(formula, data = d, method =

Re: [R] Error message using boot.ci function

2020-03-30 Thread varin sacha via R-help
Hi David, Yes, you are right but it does not change anything to my problem. According to the error message, what I understand is that there is/are NAs values in "t". Using newdata <- na.omit(Dataset) I create new dataset without missing data, so I don't understand what is going on with these

Re: [R-es] Tareas interactivas en R

2020-03-30 Thread Javier Marcuzzi
Estimado Manuel Spíndola No es justo R, pido disculpas por eso, hoy veo en una publicación española algo que puede servir para dar sus clases, no se más que eso. Link: https://www.genbeta.com/web/ensena-casa-google-unesco-lanzan-centro-recursos-educativos-para-profesores-alumnos Javier Rubén

Re: [R] custom function insite dlys::mutate

2020-03-30 Thread Jeff Newmiller
You are comparing a 21-element vector with a 1-element vector, which gives you 21 answers. Which one of those answers are you actually interested in? I am not sure what you are trying to accomplish here, so cannot offer further advice. On March 30, 2020 6:21:45 AM PDT, SIMON Nicolas wrote:

Re: [R] Not seeing the results of a function

2020-03-30 Thread Eric Berger
There is also the possibility that the OP believes that the function calls are passing by reference. On Mon, Mar 30, 2020 at 5:55 PM Richard M. Heiberger wrote: > You need one more line In your function. > > addday <- function(stp,mcp,stpos,mcpos){ > stpos<-c(stpos,stp) > mcpos<-c(mcpos,mcp) >

Re: [R] Program to produce multiple plots

2020-03-30 Thread Eric Berger
Another comment: if you are running your program in RStudio, it will create the sequence of plots but you need to "page back" to see them. Click the "Plots" tab and notice there are two arrows: back (pointing to the left) and forward (pointing to the right) HTH, Eric On Mon, Mar 30, 2020 at

Re: [R] Error message using boot.ci function

2020-03-30 Thread David Winsemius
On 3/30/20 2:45 AM, varin sacha wrote: Many thanks David, But I am not sure the Dataset and newdata are the real problem. I have solved, at least I think so, what you were asking. Here below my new R code but still the same error message. IMHO the problem is with "boot.ci" function... # #

Re: [R] Not seeing the results of a function

2020-03-30 Thread Richard M. Heiberger
You need one more line In your function. addday <- function(stp,mcp,stpos,mcpos){ stpos<-c(stpos,stp) mcpos<-c(mcpos,mcp) days<-c(1:length(stpos)) list(mcpos=mcpos, days=days) } This and the other question I just answered together say that you need to re-read an introduction to R. On Mon,

Re: [R] Program to produce multiple plots

2020-03-30 Thread Richard M. Heiberger
you probably forgot the print() statement. Both lattice and ggplot require a print() in this situation. See the help files. On Mon, Mar 30, 2020 at 10:04 Ashim Kapoor wrote: > Dear David, > > Try this :- > par(mfrow=c(1,2)) > hist(rnorm(100)) > hist(rnorm(100,100,1)) > > Best Regards, > Ashim

Re: [R] Program to produce multiple plots

2020-03-30 Thread Ashim Kapoor
Dear David, Try this :- par(mfrow=c(1,2)) hist(rnorm(100)) hist(rnorm(100,100,1)) Best Regards, Ashim On Mon, Mar 30, 2020 at 7:16 PM David wrote: > I wrote a little program that asked to produce two plots, but when I ran > it, I saw only the second plot. Is there a way to write a program

[R] Program to produce multiple plots

2020-03-30 Thread David
I wrote a little program that asked to produce two plots, but when I ran it, I saw only the second plot.  Is there a way to write a program that will produce multiple visible plots? David __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

[R] Posting: R-Project Code/Package for a Stepwise Multiple Regression Analysis

2020-03-30 Thread Jastine bugayong
Statistics newbie over here getting her feet wet into the research realm. I will be using the R-project to analyze the predictability of some data using a stepwise multiple regression analysis. I would also like to have a forced entry method option to avoid any methodology flaws, if possible,

[R] Not seeing the results of a function

2020-03-30 Thread David
I’m trying to write a function that will add items to two vectors, and then to create a third vector that is of the form 1, 2, 3, …, length of one of the newly modified vectors.  My problem is that what I’ve written doesn’t seem to return any of those modifications.  How can I get the new

[R] custom function insite dlys::mutate

2020-03-30 Thread SIMON Nicolas
Hi, I tried to use mutate from dplyr with a personal function to create a new variable of a data.frame. All examples I found are such as myfunction(x){...}. In my script, the function calls: - one variable coming from the data.frame - variables coming from lists or constant outside the

Re: [R] Error message using boot.ci function

2020-03-30 Thread varin sacha via R-help
Many thanks David, But I am not sure the Dataset and newdata are the real problem. I have solved, at least I think so, what you were asking. Here below my new R code but still the same error message. IMHO the problem is with "boot.ci" function... # # # # # # # # # # # # # # # # # # # ## # # #