similar to: Recursive function calls

Displaying 20 results from an estimated 100 matches similar to: "Recursive function calls"

2012 Jul 31
1
Ubuntu installation
I just followed the instructions on CRAN<http://cran.r-project.org/bin/linux/ubuntu/README> to install R on an Ubuntu instance. sudo apt-get install r-base Why does it install an old version of R? Can I install version 15.1? I changed my sources.list to be a current cran mirror. I believe that I have entered the URL correctly because at first I had it wrong (there was a trailing
2007 May 12
1
function similar to "get" that works for both an object, and elements of an object?
#Is there a single function similar to "get" that works for both an object, and elements of an object ? #(I want the function to be able to return objects, and/or the deeper elements of an object.) #(i.e. elements of a dataframe and/or list)? #e.g. tempdf = data.frame(a=c(4,5,6) , b=c(10,11,12) ) templist= list(x=tempdf, y=c(1,2)) get('tempdf') #works as desired
2012 Jul 29
1
Zoo panel function
I would really like some help with understanding the panel function, in zoo. Thank you. R 15.1 and zoo 1.7-7. library(zoo) x = seq(0,3*pi,length.out=100) y = sin(x) zobj = zoo(y, x) ########################################################### ## EXAMPLE 1 - GLOBAL ARGUMENT ## This panel function works ## But, it relies on mycol, which is a global variable
2012 May 29
1
need help to find type I error rate for modified F statistic
Hello everyone, I want to calculate type I error rate for modified F statistic for one way robust anova. I need to find the j group trimmed mean and winsorized sum of squared deviations. Here I attached my code for j=2 to make it simple. Originally I have j=4. Hope you can help. I need to run it for 1000 times My problem is: i) the value of F-test obtain from my simulation below is in negative
2010 Oct 13
4
Change global env variables from within a function
Hi, I've looked all over for a solution to this, but haven't had much look in specifying what I want to do with appropriate search terms. Thus I'm turning to R-help. In the process of trying to write a simple function to rename individual column names in a data frame, I ran into the following problem: When I rename the columns within my function, I can't seem to get it to
2011 Jan 14
4
test
Hi, i have that table Thesis Day A B C 1 0 83.43 90.15 22.97 1 0 85.50 94.97 16.62 1 0 83.36 95.38 20.70 1 0 84.47 92.16 23.58 1 0 83.98 95.33 19.39 1 0 82.86 93.78 24.55 1 0 83.39 92.67 19.56 1 0 85.17 95.24 17.95 1 0 81.62 93.32 28.49 1 0 82.99 92.85 19.73 1 0 81.11 95.67 27.20 1 0 83.39 94.69 16.51 1 0 79.56 89.87 30.39 1 0 80.54 93.32 21.76 1 0 82.11 92.58 22.17 1 14 85.65 94.00 19.19 1 14
2013 Mar 13
2
Extract letters from a column
Dear list: I would like to extract three letters from first and second elements in one column and make a new column. For example below, > tempdf = read.table("clipboard", header=T, sep='\t') > tempdf name var1 var2 abb 1 Tom Cruiser 1 6 TomCru 2 Bread Pett 2 5 BrePet 3 Arnold Schwiezer 3 7 ArnSch > (p1 =
2011 Jun 28
1
lattice multiple y-scale possible?
Hi I am attempting to use the lattice bwplot function to generate boxplots of numerous parameters (1-panel/parameter) by site (x-axis). The parameters have quite different ranges of values, so it would be best to have a separate y-axis range for each panel. Below is a basic example of what I am trying to do. As is seen, the y-axes need to be scaled individually to make this useful. Any
2013 Feb 11
1
Putting an array from excel into R Studio
Dear All, I have been using RExcel for some time and find two features especially useful: i) The ability to select part of a worksheet and put it into R ii) The way of viewing the code, the output and the alerts in separate panes. The rest of R Excel I don't really use. The major benefit for me is i) as I can use the excel as a sort of fast access database which is convenient to edit. I can
2011 May 19
1
Creating a "shifted" month (one that starts not on the first of each month but on another date)
Hello! I have a data frame with dates. I need to create a new "month" that starts on the 20th of each month - because I'll need to aggregate my data later by that "shifted" month. I wrote the code below and it works. However, I was wondering if there is some ready-made function in some package - that makes it easier/more elegant? Thanks a lot! # Example data:
2009 Apr 03
2
Help pasting string as object name
I have a data frame containing monthly observations of the 'density' of each US state, recorded in variables named "density.AL", "density.AK", "density.AZ", and so on for all 50 states. The data frame (called d) also contains a variable called "Date" which is encoded as a string in the format "Jan-09", "Feb-09", etc. I also have
2007 Jul 15
1
Looping through a series of (csv) files
Dear Colleagues. This should be a very common operation and I believe there should be a nice way in R to handle it. I couldn't find it in the manual or by searching online. I am wondering if I could ask for some help in this community. I have 48 csv files; each stores the data for a specific month. The 48 corresponding months are consecutively from January, 2001 to December, 2004. I name
2010 Jan 18
3
Using the output of strsplit
I successfully combined my data frames, and am now on my next hurdle. I had combined the data and quarter, and used tapply to count the entries for each unique date/quarter pair. ar= tapply(ewrgnd$gw, list(ewrgnd$dq), sum) #for each date/quarter combination sums the gw (which are all 1) dq=row.names(ar) spl=strsplit(dq) But I need to split them back into the separate date and quarter. So I used
2007 Jan 08
3
strange file sizes in log
Hello everyone, I'm getting strange module sizes in the logs. (2.6.9) This is the command: rsync -anr --delete --omit-dir-times --stats -e "ssh -i access.key -l pluto -p 22" --files-from=config\templist "/cygdrive/C/" sv_rs@192.168.10.49::Accounts After updating all the files on the "Accounts" module, the size is reported correctly on the receiver log file
2016 Jan 14
2
JDataFrame API
Hi Folks, If you need to send data from Java to R you may consider using the JDataFrame API -- which is used to convert data into JSON which then can be converted into a data frame in R. Here's the project page: https://coherentlogic.com/middleware-development/jdataframe/ and here's a partial example which demonstrates what the API looks like: String result = new JDataFrameBuilder()
2008 May 05
3
merge numerous columns of unequal length
I have numerous objects, each containing continuous data representing the same variable, movement rate, yet each having a different number of rows. e.g. d1<-as.matrix(rnorm(5)) d2<-as.matrix(rnorm(3)) d3<-as.matrix(rnorm(6)) How can I merge these three columns side-by-side in order to create a table regardless of the difference in length? I wish to analyze the output in a spreadsheet
2008 Aug 14
2
Determining cause of error?
This is both a specific question and a general one. First, I am running 'fitdistr' from library(MASS) and I get the following: Error in fitdistr(templist, "weibull") : optimization failed What is the cause of the error? How can I tell? Can I just catch this error, report it and move to the next set of data (eat the exception)? Thank you. Kevin
2009 Dec 08
1
Printing 'k' levels of factors 'n' times each, but 'n' is unequal for all levels ?
Dear List, I need to print out each of 'k' levels of a factor 'n' times each, where 'n' is the number of elements belonging to each factor. I know that this can normally be done using the gl() command, but in my case, each level 'k' has an unequal number of elements. Example with code is as below: vc<-read.table("P:\\Transit\\CORRECT
2009 Jul 30
3
Looping through R objects with $ operator and tags
Hi all, Suppose I want to set the values in a column to the log of the values of another column like so: object$LogDist <- log10(object$Distance) How do I loop through the objects if I have object1, object2, etc to perform this function? object1$LogDist <- log10(object1$Distance) object2$LogDist <- log10(object2$Distance) object3$LogDist <- log10(object3$Distance) I was trying to
2016 Jan 15
2
JDataFrame API
Hi Simon, Thanks for your feedback. -- this is an observation that I wasn't considering when I wrote this mainly because I am, in fact, working with rather small data sets. BTW: There is code there, it's under the bitbucket link -- here's the direct link if you'd still like to look at it: https://bitbucket.org/CoherentLogic/jdataframe Re "for practical purposes is