similar to: combining lists with same names with 'c'

Displaying 20 results from an estimated 7000 matches similar to: "combining lists with same names with 'c'"

2007 Sep 26
1
Area of overlap between polygon and circle
R-listers, Given a polygon and a circle defined by its center coordinates and a radius, I would like to calculate the area of overlap. I know that I can create a polygon from the circle and then use available packages to get the area of the intersection. However, because the polygon is of a fixed size and I will be doing this for circles of varying sizes, I'm concerned about
2006 Feb 10
1
Creating multiple copies of rows in data frames
ListeRs, Within the last two months, I thought I saw mention of an R function that would create a new data frame composed of duplicates or multiple copies of rows of an input data frame given one or several columns of values indicating how many times each row should be copied. As a simple example, given a dataframe: > in.df x y 1 A 1 2 B 2 3 C 3 "func.name (in.df, in.df$y)"
2006 Apr 14
1
Adding values to top of bars in barchart
Given the following data frame ("freq.sp"), > str(freq.sp) `data.frame': 42 obs. of 4 variables: $ behav : Factor w/ 6 levels "approach","bowride",..: 1 1 1 1 1 1 1 2 2 2 ... $ species: Factor w/ 7 levels "COAST_SPOT","EAST_SPINR",..: 1 2 3 4 5 6 7 1 2 3 ... $ n : int 193 194 563 357 570 369 74 194 208 633 ... $ pct :
2005 May 13
0
randomForest partialPlot x.var through function
All, I'm trying to set up a function which calls the partialPlot function but am getting an error that I can't seem to solve. Here's a simplified version of the function and error... > pplot <- function(rf,pred.var){partialPlot(x=rf,pred.data=acoust,x.var=pred.var)} > > attach(acoust) > acoust.rf <-
2005 Aug 03
1
passing variable to formula environment
List gurus, I'm trying to code a Gompertz growth curve function as part of a larger project and have run across a problem due to my ignorance of environments. Some sample data and the function are as follows: growth <- data.frame(age = c(1.92, 3, 5.83, 3.17, 15.5, 1.17, 5.58, 13.33, 14.29, 5.83, 13.79, 6.33, 13.75, 16.83, 13, 11.67, 0.25, 1.73, 9.46, 5.67), length = c(157, 165, 179,
2006 May 03
1
Vector searching and counting speed optimization
R-users, I'm seeking any suggestions on optimizing some code for speed. Here's the setup: the code below is part of a larger chunk that is calculating Fst values across loci and alleles. This chunk is designed to calculate the proportion ('p.a') of an allele ('a') at a locus in each population ('p') and the proportion of individuals heterozygous for that
2009 May 20
1
combining xYplot with map
I'm using xYplot to create a bubble plot of values that I'd like to visualize on top of a filled-in map of the coast, but I'm too much of a lattice (which I understand xYplot is built on) and mapping newbie to figure out how to begin to make this happen. Below is some sample code that doesn't work but illustrates my goal. Any pointers anyone has would be much appreciated.
2006 Mar 20
2
subsetting and NAs
R-help, I'm getting some unexpected behavior with subsetting a data frame (aircraft flight data) that I can't sort out. Here is a simplified version of my data frame and problem: > flight FlightID TailNo FlightDate HobbsTime FlightCost Date year 1 4497 6009K <NA> 2.2 330.0 <NA> NA 2 4498 6009K <NA>
2007 Oct 29
1
meaning of lenwrk value in adapt function
R-listers, In using the adapt function, I am getting the following warning: Ifail=2, lenwrk was too small. -- fix adapt() ! Check the returned relerr! in: adapt(ndim = 2, lower = lower.limit, upper = upper.limit, functn = pr.set, Would someone explain what the 'lenwrk' value indicates in order to help diagnose this issue. Also, what are the possible codes for Ifail, so I can set
2007 Nov 05
0
vector graphics/ SVG plots via RSvgDevice
System: Linux Ubuntu 7.10 Gibbon kernel 2.6.22-14-generic Emacs ver. 22.1.1 ESS ver. 5.3.0 R version 2.6.0 (2007-10-03) ------------------------------------------------ Colleagues This is a follow-up note to my earlier post under this header, giving my solution. First, with some trepidation I upgraded my ubuntu distro, and this time did a full reinstall, so I did not break my system, as I have
2007 Jan 07
2
creating a list of lists
Hello, I'm trying to create a series of randomForest objects, basically in a loop like this: forests <- list(); for (level in 1:10) { # do some other things here # create a random forest forest <- randomForest( x = x.level, y = z.level, ntree = trees ); forests <- c(forests, forest); } But instead of creating a list of 10 forests, this creates a list
2007 Apr 26
1
spatial/ patches and gaps/ SADIE
System: Linux kernel 2.6.15 Ubuntu dapper R version 2.4.1 ESS on Emacs 21.4.1 ------------------------- Colleagues I have some spatial patterns of sardine eggs (presence /absence) over 50 years (270 surveys) and I'd like to quantify the patches and gaps to determine how many patches (i.e. spawning areas) there were before the fishery collapse (1951-1965) and during recovery (post 1985).
2002 Jul 05
2
Increase memory size
I read FAQ (2.6 and 2.2) about increasing memory size, but it is not clear to me. Coule anyone give me an example? My computation exceeds 256Mb. Thank you for your time. Nancy -- Nancy C.H. Lo, Ph.D Southwest Fisheries Science Center NMFS, NOAA 8604 La Jolla Shores Drive La Jolla CA 92037 858-546-7123(o) 858-546-5656(x) Nancy.Lo at NOAA.GOV -------------- next part -------------- A non-text
2008 Feb 28
0
use of step.gam (from package 'gam') and superassignment inside functions
Hello, I am using the function step.gam() from the 'gam' package (header info from library(help=gam) included below) and have come across some behavior that I cannot understand. In short, I have written a function that 1) creates a dataframe, 2) calls gam() to create a gam object, then 3) calls step.gam() to run stepwise selection on the output from gam(). When I do this, gam()
2007 Oct 18
5
vector graphics/ ungroup and edit in CorelDraw
System: Linux kernel 2.6.15 Ubuntu dapper R version 2.5.1 ESS 5.2.11 on Emacs 21.4.1 ------------------------- Colleagues Having read the posts on producing perfect graphs in R, or using inkscape to edit R graphics output, I have a related question. Lately I am publishing in a journal that is very picky about their graphics formats. It is more efficient for me to get the final picky details
2006 Mar 29
0
R for Windows crash on new laptop - corrected script
I realized that the script I included in my original post (see below) was written for an older version of rmetasim and will not work with the current version. The only change that need be made to get my script to run with the latest release of rmetasim is to change the command 'simulate.landscape()' to 'sim.landscape()'. My apologies to anyone who tried to use my script and
2006 May 15
2
A question on memory size
Hi, I am using a note book computer to do simulation. Even I added a commend line in the shortcut on my desktop for R. I still get a message saying reached total memory allocation of 502 Mb. Any suggestions will be welcome. Nancy -- Nancy C.H. Lo, Ph.D Southwest Fisheries Science Center 8604 La Jolla Shores Dr. La Jolla, CA 92037 858-546-7123(o) 858-546-5656(x)
2005 Aug 30
3
64 bit R for Windows
I am assisting in the purchase of 64-bit Windows XP system for researchers who run R. These systems will have AMD Opteron processors and at least 4GB of RAM. I'd appreciate advice on whether there is a working version of R that can take full advantage of such systems. Milton F. L?pez IT Guy Inter-American Tuna Commission (IATTC) 8604 La Jolla Shores Drive La Jolla, CA 92037 Tel: (858)
2005 Oct 21
1
Single vs. dual CPUs
I've posted this earlier and have not heard much so far. I'd really appreciate any guidance on this as we are about to order new hardware. We are buying Dell workstations with Red Hat Linux and 64-bit Xeon CPUs to run R. We could add a second processor to each system, or buy slightly faster single CPU systems. Is it possible to make a generalized statement as to what kind of performance
2006 Mar 29
0
R for Windows crash on new laptop
I'm trying to use a contributed package (rmetasim) to generate simulated genetic datasets. My scripts work fine when I run them on a Sun workstation running Solaris 7 and when I run them on a ~4 year old laptop PC that I have. However, when I run them on my new laptop (Dell Latitude D410 purchased in August 2005), the simulation will run for a short (variable) period of time, then R