[R] PLM falling into the dummy variable trap -- how to fix?

2014-03-11 Thread Andrew Crane-Droesch
Dear list, CC Dr Croissant, I'm tryng to use plm with timeXgroup effects (in addition to the twoway effects), and running into problems with dummy variables. Eventually I want to take advantage of pgmm as well, but first I'd like to solve the problem with the non-dynamic version. An

[R] Deletion of rows

2014-03-11 Thread dila radi
Hi, I would like to ask about the deletion of rows in the data. Assuming I have this kind of data set, which you can refer through the attachment. As in the attachment, I have 31 days for each month which is I want to delete some of the rows according to the real days per month. For example:

Re: [R] Deletion of rows

2014-03-11 Thread PIKAL Petr
Hi No attachments allowed (mostly). Use ?dput and copy to email directly. How you can have more than 29 rows in February if each row is one day? I believe that merging your data with date column made by ?seq.POSIXt can remove any nonexistent row but it all depends on how your data are

Re: [R] Performance issue with attributes

2014-03-11 Thread Smart Guy
Apologies for the late reply. I was out on vacation. I tried setattr() from data.table package and it worked like a magic. Thanks a lot for the help. setattr() is really faster than attributes. Regards, SG On 22 February 2014 12:29, Philippe Grosjean phgrosj...@sciviews.orgwrote: You can use

[R] How to set up the plot size and fonts in ggplot2

2014-03-11 Thread 张以春
Dear R experts, I am trying to plot some figures using ggplot2. But, I do not know how to set up the plot size. (par(fig=)) seems not work in ggplot2 environment. Also, I do not know how to use Arial fonts in the plot. I have tried to load the package extrafont, but I can not install this

Re: [R] catering for rescaling

2014-03-11 Thread Geoffrey
Thanks Jim. I see you maintain the package. What r primitive do those functions use to do font metrics so that the margin can adjusted? Geoff. On 11/03/14 06:27, Jim Lemon wrote: On 03/10/2014 10:34 PM, Geoffrey wrote: My barplot has nicely left justified horizontal labels, the names of

Re: [R] catering for rescaling

2014-03-11 Thread Geoffrey
Jim, I read the code - strwidth(). is the function i needed. Geoff. __ R-help@r-project.org mailing list 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,

[R] grab values in R

2014-03-11 Thread catalin roibu
Hello all! I have a problem with R. How can I do this assemble the ELM PRP for each ua. My data is like this: ua ELM PRP 122C MO 5 122C BR 3 122C FA 1 122C MO 1 122D BR 7 122D MO 2 122D BR 1 and I want to obtain something like this: ua ELM PRP 122C MO 6 122C BR 3 122C FA 1 122D BR 8

Re: [R] software R

2014-03-11 Thread Rui Barradas
Hello, It's better if you send the questions to R-help@r-project.org, the odds of you getting more and better answers are greater. As for your questions, see inline. Em 10-03-2014 23:34, agustin purciariello escreveu: Good night Rui, I´m in the mailing list of R help. i recently sent an

Re: [R] grab values in R

2014-03-11 Thread Pascal Oettli
Hello, To me, and maybe for others, it is beyond understanding. Please clarify. Regards, Pascal On Tue, Mar 11, 2014 at 7:02 PM, catalin roibu catalinro...@gmail.com wrote: Hello all! I have a problem with R. How can I do this assemble the ELM PRP for each ua. My data is like this: ua ELM

[R] summarize data

2014-03-11 Thread catalin roibu
Hello again, I have a problem with R. How can I do this summarize the proportion (PRP) of unique species (ELM )for each ua. My data is like this: uaELMPRP122CMO5122CBR3122CFA1122CMO1122DBR7122DMO2122DBR1 and I want to obtain something like this: uaELMPRP122CMO6122CBR3122CFA1122DBR8122DMO2

Re: [R] summarize values in R

2014-03-11 Thread Rui Barradas
Hello, Please send your questions to r-help@r-project.org, the odds of you getting more and better answers are greater. And, why don't you use ?dput to post your data? As for your question, it seems that ?aggregate solves the problem. dat - read.table(text = ua ELM PRP 122C MO 5 122C BR 3

Re: [R] grab values in R

2014-03-11 Thread David Winsemius
if you post in HTML you loose the line-ends and create confusion. Please learn to post in plain text. -- David. On Mar 11, 2014, at 5:02 PM, catalin roibu catalinro...@gmail.com wrote: Hello all! I have a problem with R. How can I do this assemble the ELM PRP for each ua. My data is

Re: [R] ts instead of xts object

2014-03-11 Thread Joshua Ulrich
On Tue, Mar 11, 2014 at 12:14 AM, Bill william...@gmail.com wrote: Hello. I have a dataframe that has a date column. The intervals between dates vary. I want to convert this to a ts object. I was able to convert it to an xts object but the package I want to analyse this data with (called

[R] Read text file

2014-03-11 Thread Alaios
Hi all I am trying to read some text files with the following format: 1377262633.948000    $GPRMC,125708.00,A,5047.66107,N,00603.65528,E,0.203,247.36,230813,,,A*60 1377262633.958000    $GPVTG,247.36,T,,M,0.203,N,0.377,K,A*3B 1377262633.968000   

Re: [R] ts instead of xts object

2014-03-11 Thread Pascal Oettli
Hello, On Tue, Mar 11, 2014 at 8:45 PM, Joshua Ulrich josh.m.ulr...@gmail.com wrote: On Tue, Mar 11, 2014 at 12:14 AM, Bill william...@gmail.com wrote: Hello. I have a dataframe that has a date column. The intervals between dates vary. I want to convert this to a ts object. I was able to

Re: [R] Read text file

2014-03-11 Thread Pascal Oettli
Hello, See the fill option of the read.csv function. But be careful, it might lead to erroneous results, as explained in the help page... And there is neither $GPGLL nor $GPGLA in your example. Regards, Pascal On Tue, Mar 11, 2014 at 9:00 PM, Alaios ala...@yahoo.com wrote: Hi all I am trying

Re: [R] R Help

2014-03-11 Thread David McPearson
On Mon, 10 Mar 2014 18:26:38 + William Dunlap wdun...@tibco.com wrote You probably want to read the Introduction to R that comes with R (menu: HelpManuals (in PDF)Introduction to R). When I first started using R I found it easier to work through some of the contributed documentation.

Re: [R] grab values in R

2014-03-11 Thread arun
Hi, Use ?aggregate(), ?ddply() from library(plyr) etc. dat - read.table(text=ua ELM PRP   122C MO 5   122C BR 3   122C FA 1   122C MO 1   122D BR 7   122D MO 2 122D BR 1,sep=,header=TRUE,stringsAsFactors=FALSE) library(plyr)  ddply(dat,.(ua,ELM),summarize,PRP=sum(PRP)) #    ua ELM PRP #1 122C 

[R] fitting a bivariate model using the copula package

2014-03-11 Thread Charles Thuo
require(copula) # I specify the copula gmb-gumbelCopula(4,dim=2) # The bivariate CDF is generated myCDF-mvdc(gmb,margins=c(lnorm,nbinom),paramMargins=list(list(meanlog=11.69,sdlog=0.7781),list(mu=16,size=2.6))) # A random sample of the bivariate risk data is generated as a matrix. The

Re: [R] Read text file

2014-03-11 Thread David Carlson
If you read the manual page for read.csv (?read.csv), you will see that the default for the header argument is TRUE, but your example has no header. You do not need sep=, because that is the default for read.csv. Also, the default is to convert character strings to factors which you probably do

Re: [R] Read text file

2014-03-11 Thread jim holtman
Since you don't have a header on the first line, just use 'read.table'. x - read.table(text = 1377262633.948000 $GPRMC,125708.00,A,5047.66107,N,00603.65528,E,0.203,247.36,230813,,,A*60 + 1377262633.958000$GPVTG,247.36,T,,M,0.203,N,0.377,K,A*3B + 1377262633.968000

Re: [R] Performance issue with attributes

2014-03-11 Thread luke-tierney
You can also upgrade to R-devel or to R 3.1.0 due out in a month or so -- those will run this code much more efficiently. Using setattr is OK if you really know what you are doing, but if you are not careful using it can modify objects you do not intend to modify. Best, luke On Tue, 11 Mar

Re: [R] summarize data

2014-03-11 Thread Jeff Newmiller
I cannot understand your data. I suspect that is related to the fact that you have posted (yet again) to the list using HTML email. Please try again using plain text email and use the dput command to insure that we can put your data into R as you have it.

[R] two maps with different color legends in spplot: PART 2

2014-03-11 Thread Gianluca Filippa
Hi all, following my previous post on the subject which I paste here: ## Hi all, I am using spplot to plot two maps in the same device. In my case, I have a map of a certain variable and the same map of the standard deviation of the same variable. The range of the

Re: [R] Read text file

2014-03-11 Thread arun
Hi, There is no GPGLL or GPGLA entries in the data.  You can use ?grep to read those lines. ##Modifying the input data lines1 - readLines(textConnection(1377262633.948000    $GPRMC,125708.00,A,5047.66107,N,00603.65528,E,0.203,247.36,230813,,,A*60 1377262633.958000   

[R] ezmlm warning

2014-03-11 Thread 956-help
Bonjour ! Je suis le programme ezmlm. Je m'occupe de la liste de diffusion 9...@trebasgi.com. Un certain nombre de messages provenant de la liste de diffusion #l n'ont pas pu vous etre remis correctement. En attachement, vous trouverez une copie du premier message de retour a l'envoyeur que j'ai

[R] Revolutions blog: February roundup

2014-03-11 Thread David Smith
Revolution Analytics staff write about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R from

[R] Calling .NET from within R

2014-03-11 Thread Adrian Mejia
Hello, I'd like to know of any ways to call an independently-built .NET assembly from within R. I've been using the .C function to call an assembly I built in C++, but I'd like to migrate that assembly into .NET if I can get it to work with R. I can't find documentation to do so, are there any

[R] novice questions

2014-03-11 Thread agustin purciariello
Good morning, i'm new in R and i have two questions, i hope someone could help me please: 1) For example if i put alfa-X*Y, is there any way that when i put run line on selection (or ctrl+R) the result appears without having to write again alfa and then again run line on selection to see the

[R] How to draw oncoprint style plot in R?

2014-03-11 Thread ying chen
Hi guys, I tried to draw plots similar to cbioportal's oncoprint plot, but have no success yet. Here is an example of the oncoprint plot:

Re: [R] novice questions

2014-03-11 Thread David Carlson
1. (alfa - X*Y) # Sends the result of the expression to print() 2. Y - datos[,2, drop=FALSE] # see the bracket manual page: ?[ - David L Carlson Department of Anthropology Texas AM University College Station, TX 77840-4352 -Original Message- From:

Re: [R] novice questions

2014-03-11 Thread Bert Gunter
Your English isn't the problem. It's your failure to do your homework first: Please read An Introduction to R, the tutorial that ships with R, or one of the many tutorials on the web (including in your native language, very likely), so search. Here also is another possible resource:

Re: [R] Calling .NET from within R

2014-03-11 Thread Qiang Kou
There is a pacage rClr can do that. However, I heard but never used it before. https://rclr.codeplex.com/ https://r2clr.codeplex.com/ On Tue, Mar 11, 2014 at 12:40 PM, Adrian Mejia ame...@factset.com wrote: Hello, I'd like to know of any ways to call an independently-built .NET assembly

Re: [R] plotting tripgrid on PBSmapping

2014-03-11 Thread Trevor Davies
Dear Michael, Thank you so much for the help. What I ended up doing was this: image(x2009.final) addPolys(worldLLhigh) So obvious is hindsight but most of these things are. Thank you again for the help. All the best -- Trevor On Mon, Mar 10, 2014 at 8:27 PM, Michael Sumner

[R] R seems to mangle LD_LIBRARY_PATH

2014-03-11 Thread Ross Boylan
I am trying to ensure that a directory is searched first, but it gets stuck at the end of LD_LIBRARY_PATH: $ export LD_LIBRARY_PATH=~/install/lib $ R R version 3.0.2 (2013-09-25) -- Frisbee Sailing Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu

[R] qvalue error

2014-03-11 Thread ChiragUark
I am trying to convert pvalues to qvalues. Here's the command I give: qvals.sample1= qvalue(pvals.sample1) q.vals.sample1= qvals.sample1$qvalues and it returns [1] ERROR: The estimated pi0 = 0. Check that you have valid p-values or use another lambda method. Error in qvals.LEC1RT$qvalues : $

[R] RTools and previous Cygwin installation--conflict?

2014-03-11 Thread Brent
Background:     --I already had the latest 64 bit cygwin (1.7.28) installed on my Windows 7 box     --I am a new R user; I just installed the latest 64 bit R today (3.0.3)     --a coworker told me that I also need to install RTools, so, I also installed the latest RTools (3.1) from         

Re: [R] RTools and previous Cygwin installation--conflict?

2014-03-11 Thread Richard M. Heiberger
when I am on Windows, I use the msdos cmd shell and the Rtools when I am building an R package. It doesn't know anything about cygwin, doesn't need to know anything about cygwin, and bypasses the need to coordinate the two. For everything else I use the cygwin bash. the cygwin shell doesn't

Re: [R] R seems to mangle LD_LIBRARY_PATH

2014-03-11 Thread Rolf Turner
Can't hazard a guess as to why R is tacking on those other components to LD_LIBRARY_PATH but it seems that if you use Sys.setenv() from within R you can put your personal directory first. Something like: Sys.setenv(LD_LIBRARY_PATH=paste(~/install/lib,