[R] Computing growth rate

2016-12-14 Thread Brijesh Mishra
Hi, I am trying to calculate growth rate (say, sales, though it is to be computed for many variables) in a panel data set. Problem is that I have missing data for many firms for many years. To put it simply, I have created this short dataframe (original df id much bigger) df1<-data.frame(co_code1

Re: [R] R studio Problem

2016-12-14 Thread Bert Gunter
You may get a reply here, but this is the wrong place for you to post. RStudio is a separate commercial entity and product from the noncommercial R foundation and R software that runs this list. This list is about R programming; for questions about RStudio, you should consult the RStudio website an

Re: [R] R studio Problem

2016-12-14 Thread K. Elo
Hi! Maybe this helps: http://r.789695.n4.nabble.com/Error-in-normalizePath-path-with-McAfee-td2532324.html Best, Kimmo 15.12.2016, 08:18, Amelia Marsh via R-help wrote: Hi I had installed R studio Desktop 1.0.44. However whenever I wanted to write any command, before I could complete, I was

[R] R studio Problem

2016-12-14 Thread Amelia Marsh via R-help
Hi I had installed R studio Desktop 1.0.44. However whenever I wanted to write any command, before I could complete, I was getting following error Error in normalizePath(dir, winslash = "/", mustWork = TRUE) : unused argument(s) (winslash = "/", mustWork = TRUE) I had uninstalled RStudio and

Re: [R] how to show a plot without overlaying the text on top of the another text?

2016-12-14 Thread Jim Lemon
Hi Marna, Your request made me think that a simple manual label placing function might be useful to some people. placeLabels<-function(pointer=TRUE,cex=1,labelcol=par("fg"), bg="white",border=par("fg"),pointercol=par("fg")) { cat("Enter a blank label to finish\n") nextlabel<-"XXX" while(nchar

Re: [R] "Safe" use of iterator (package iterators)

2016-12-14 Thread Rich Calaway via R-help
Hi, Harold-- The short answer is "Yes"--in your example, the nextElem will always be a list with the i component equal to the next element of itx1 and the j component equal to the next element of itx2. I posted a more detailed explanation in response to a query from David on the Microsoft Tech

Re: [R] how to show a plot without overlaying the text on top of the another text?

2016-12-14 Thread Adams, Jean
The ggrepel package might help. http://blog.revolutionanalytics.com/2016/01/avoid-overlapping-labels-in-ggplot2-charts.html Jean On Tue, Dec 13, 2016 at 5:37 PM, Marna Wagley wrote: > Hi R user, > I have created using metaNMDS (Nonmetirc Multidimensional Scaling, MDS) to > show species composi

Re: [R] data manipulation

2016-12-14 Thread Rui Barradas
OK, to the op: don't use read.csv, use read.table. Like this: URL <- "https://web.archive.org/web/20130501161812/http://staff.elena.aut.ac.nz/Paul-Cowpertwait/ts/cbe.dat"; xx <- read.table(URL, header = TRUE) str(xx) Hope this helps, Rui Barradas Em 14-12-2016 20:03, David Winsemius escreveu

Re: [R] data manipulation

2016-12-14 Thread David Winsemius
> On Dec 14, 2016, at 7:17 AM, David L Carlson wrote: > > It seems to be a data set for use with Introductory Time Series with R by P S > Cowpertwait and A V Metcalfe. It is not just the file that is missing, the > whole folder is missing: > > The requested URL /~pscoperwait/ was not found on

Re: [R] weird behavior of DoubleMetaphone

2016-12-14 Thread Dimitri Liakhovitski
No real need to answer. I found that function 'metaphone' from package "phonics" doesn't misbehave this way! library(phonics) mymetaphone = function(x){ temp <- strsplit(x, split=" ")[[1]] for(word in 1:length(temp)){ temp[word]<-metaphone(temp[word]) } return(paste(temp, coll

[R] weird behavior of DoubleMetaphone

2016-12-14 Thread Dimitri Liakhovitski
I was wondering if anyone can answer this question. library(PGRdup) Both lines below return "NTFL". DoubleMetaphone("netflix")$primary DoubleMetaphone("net flex")$primary Now, I modify the function a bit - I first split the string on "space", then merge back together: mymetaphone = function(x){

Re: [R] data manipulation

2016-12-14 Thread David L Carlson
It seems to be a data set for use with Introductory Time Series with R by P S Cowpertwait and A V Metcalfe. It is not just the file that is missing, the whole folder is missing: The requested URL /~pscoperwait/ was not found on this server. The Springer website for the book indicates the data s

Re: [R] Question regarding package deSolve and R versions

2016-12-14 Thread Shirley R
My apologies. When I found the r-help email, I entirely missed the posting guide. I will try just update my version of R to be current. If I need to ask another qustion, I will be sure to look up the posting guide, first. Thank you very much!! Shirley On Dec 14, 2016 12:28 AM, "Jeff Newmiller"

Re: [R] data manipulation

2016-12-14 Thread Rui Barradas
Hello, Please cc your mails to the list. As for your data, your url is wrong, you need to contact Massey or maybe the source of your information and get a valid internet address. Without one there's not much we can do. Rui Barradas Em 14-12-2016 12:16, Farshad Fathian escreveu: Hello, Thank

Re: [R] data manipulation

2016-12-14 Thread Rui Barradas
Hello, What do you mean by "gives me something"? xx <- read.csv("http://massey.ac.nz/~pscoperwait/ts/cbe.dat";) Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open URL 'http://massey.ac.nz/~pscoperwait/ts/cbe.dat': HTTP status

Re: [R] data manipulation

2016-12-14 Thread John Kane via R-help
xx <- read.csv("http://massey.ac.nz/~pscoperwait/ts/cbe.dat";) gives me something. Since we have no idea of what you are doing I don't know if the data has downloaded correctly On Tuesday, December 13, 2016 1:38 PM, Farshad Fathian wrote: Hi, I couldn't access to data file about PS

Re: [R] Unable arrange the functions according to the requirement in the help page of my package.

2016-12-14 Thread Michael Dewey
Dear Pijush When you say your package demands the functions in a particular order what exactly do you mean by that? On 13/12/2016 10:19, Pijush Das wrote: Hello Sir, I am trying to create my package in R. I have few functions for this package. After including all the functions in the packag

Re: [R] Unable arrange the functions according to the requirement in the help page of my package.

2016-12-14 Thread Jim Lemon
Hi Pijush, Don't worry about the "arrangement" of the functions in the help file. They are ordered alphabetically and this has nothing to do with the order in which they are actually used. The more serious problem is probably your help files. There should be a "man" (help) file for each function, u