Re: [R] display double dot over character in plotmath?

2017-05-12 Thread Daniel Nordlund
On 5/12/17 4:55 PM, Ranjan Maitra wrote: Hi, Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to. Here is an example of what I would like to do, but it is not

[R] display double dot over character in plotmath?

2017-05-12 Thread Ranjan Maitra
Hi, Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to. Here is an example of what I would like to do, but it is not quite there: require(ggplot2) data<-as.d

Re: [R] installing caret package

2017-05-12 Thread Duncan Murdoch
On 12/05/2017 4:21 PM, Elahe chalabi via R-help wrote: Hi all, I'm using Rstudio 64 bit version3.2.5 and I faced a problem installing caret package,the error is : Loading required package: lattice Loading required package: ggplot2 Error : object ‘sigma’ is not exported by 'namespace:stats' Err

Re: [R] installing caret package

2017-05-12 Thread David Winsemius
> On May 12, 2017, at 1:21 PM, Elahe chalabi via R-help > wrote: > > Hi all, > > I'm using Rstudio 64 bit version3.2.5 I'm guessing that means using R 3.2.5, at least if RStudio is keeping its different os versions numering in sync. I'm on R studio 1.0.136 and I don't think I'm that out of

[R] installing caret package

2017-05-12 Thread Elahe chalabi via R-help
Hi all, I'm using Rstudio 64 bit version3.2.5 and I faced a problem installing caret package,the error is : Loading required package: lattice Loading required package: ggplot2 Error : object ‘sigma’ is not exported by 'namespace:stats' Error: package or namespace load failed for ‘caret’ how sho

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-12 Thread peter dalgaard
> On 12 May 2017, at 16:40 , Tobias Christoph wrote: > > Hey guys, > > thanks a lot for your tips. The regression is finally running. As you > said, I had to integrate the column "year" in the function "time" in R. > > So I used the following formula: *plm(log(revenue) ~ log(supply) + > fact

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-12 Thread David Winsemius
> On May 12, 2017, at 7:40 AM, Tobias Christoph > wrote: > > Hey guys, > > thanks a lot for your tips. The regression is finally running. As you > said, I had to integrate the column "year" in the function "time" in R. > > So I used the following formula: *plm(log(revenue) ~ log(supply) + >

Re: [R] Matched Items in rows + issue with writing a table

2017-05-12 Thread Jeff Newmiller
Jim is generous enough that he might do this, but such assistance is not sustainable. Fortunately, you can type a ? in front of the name of a function and read about what goes in and what comes out. You can also type expressions like x[2] or which(matches) right before you execute the line of co

Re: [R] apply and cor()

2017-05-12 Thread Micha Silver
On 05/12/2017 06:53 PM, David L Carlson wrote: Actually, not using apply() would be faster and simpler cor(t(compare_data), t(test_data)) Worked just as I wanted, thanks! I first reshaped the data frames, then I didn't even need the t() David C -Original Message- From: R-help [mail

Re: [R] Matched Items in rows + issue with writing a table

2017-05-12 Thread abo dalash
Dear Jim.., Many thanks for your answer. As I'm a new R user, could you please provide a short explanation about what each line of the following does ? findMatches<-function(x,sep=",") { matchval<-NA x1bits<-unlist(strsplit(x[1],sep)) x2bits<-unlist(strsplit(x[2],sep)) matches<-x1bits %i

Re: [R] Drawing World map divided into 6 economic regions

2017-05-12 Thread MacQueen, Don
Well, you'll have to find the boundaries in some electronic GIS format such as a shapefile (though there are other options). I don't know where to find such a thing. Your chances of finding someone who does know are greater on the R-sig-geo mailing list, so I'd suggest asking there. You may al

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-12 Thread Rui Barradas
Hello, I have never used plm but the standard way of adding a quadratic term is I(time(year)^2) Hope this helps, Rui Barradas Em 12-05-2017 15:40, Tobias Christoph escreveu: Hey guys, thanks a lot for your tips. The regression is finally running. As you said, I had to integrate the column "

[R] Drawing World map divided into 6 economic regions

2017-05-12 Thread Christofer Bogaso
Hi again, I am trying to draw a World map which is divided into 6 Economic regions as available in below link http://www.worldbank.org/en/about/annual-report/regions I am aware of various R ways to draw World map based on Countries like one available in http://stackoverflow.com/questions/241368

Re: [R] visualization of KNN results in text classification

2017-05-12 Thread Elahe chalabi via R-help
Thanks for your reply. What I exactly have is a data frame with rows containing words which have been used in each speech and columns containing frequency of these words, I have an extra row showing the type of the speech whether it was from a control group or Alzheimer group. Then I create a

Re: [R] apply and cor()

2017-05-12 Thread David L Carlson
Actually, not using apply() would be faster and simpler cor(t(compare_data), t(test_data)) David C -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of David L Carlson Sent: Friday, May 12, 2017 10:48 AM To: Ismail SEZEN ; Micha Silver Cc: R-help@r-project.

Re: [R] apply and cor()

2017-05-12 Thread David L Carlson
Actually, r is a vector, not an index value. You need apply(compare_data, 1, function(r) cor(r, t(test_data))) - David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-

Re: [R] apply and cor()

2017-05-12 Thread Ismail SEZEN
> On 12 May 2017, at 17:57, Micha Silver wrote: > > I have two data.frames, one with a single row of 31 columns, and the second > with 269 rows and the same 31 columns. > > dim(compare_data) > [1] 269 31 > > dim(test_data) > [1] 1 31 > > I want to apply cor() between the one row of 'test_dat

[R] apply and cor()

2017-05-12 Thread Micha Silver
I have two data.frames, one with a single row of 31 columns, and the second with 269 rows and the same 31 columns. > dim(compare_data) [1] 269 31 > dim(test_data) [1] 1 31 I want to apply cor() between the one row of 'test_data', and each row of the 'compare_data' . I tried 'apply' but I get

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-12 Thread Tobias Christoph
Hey guys, thanks a lot for your tips. The regression is finally running. As you said, I had to integrate the column "year" in the function "time" in R. So I used the following formula: *plm(log(revenue) ~ log(supply) + factor(town)*time(year), data=R_Test_log_Neu)* So I have now sucessfully ad

Re: [R] How to plot a legend centered only on the x axis

2017-05-12 Thread Antonio Silva
Thanks a lot Duncan, Jim and Marc! 2017-05-11 22:59 GMT-03:00 Marc Schwartz : > > Bingo. > > The 'inset' argument is what I was missing. That allows this to be done > with one step, rather than the two that I had. > > Thanks Duncan. > > Mar [[alternative HTML version deleted]] _

Re: [R] visualization of KNN results in text classification

2017-05-12 Thread Ismail SEZEN
> On 12 May 2017, at 15:30, Elahe chalabi wrote: > > > > Thanks for your reply. What I exactly have is a data frame with rows > containing words which have been used in each speech and columns containing > frequency of these words, I have an extra row showing the type of the speech > whethe

Re: [R] Design matrix for species mixture

2017-05-12 Thread Bert Gunter
Please take this thread elsewhere(e.g. Stats.stackexchange.com) as it is largely about statistics and is therefore offtopic here (this list is about R programming). Cheers, Bert On May 12, 2017 1:21 AM, "Margot Neyret" wrote: Hi Jim, Sorry if my question was not clear. I will try to explain a

Re: [R] Design matrix for species mixture

2017-05-12 Thread Jim Lemon
Hi Margot, Very messy, like nature. One way is to do tests with dummy variables that compare: beans+anything vs anything without beans maize+anything vs anything without maize pumpkin+anything vs anything without pumpkin Then if you find that the "beans" comparison has the strongest effect, perha

Re: [R] Design matrix for species mixture

2017-05-12 Thread Margot Neyret
Hi Jim, Sorry if my question was not clear. I will try to explain again… I have one response variable Y, let’s say vegetation cover. Then I have my explanatory variable, let’s call it Crop. In my field I can have either Maize (m), Bean (b), Pumpkin (p) or mixtures : m+b, m+p, b+p, m+b+p. I also