search for: w_chris_carleton

Displaying 8 results from an estimated 8 matches for "w_chris_carleton".

2010 Nov 15
3
indexing lists
Hi List, I'm trying to work out how to use which(), or another function, to find the top-level index of a list item based on a condition. An example will clarify my question. a <- list(c(1,2),c(3,4)) a [[1]] [1] 1 2 [[2]] [1] 3 4 I want to find the top level index of c(1,2), which should return 1 since; a[[1]] [1] 1 2 I can't seem to work out the syntax. I've tried; which(a
2009 Sep 28
2
Polynomial Fitting
Hello All, This might seem elementary to everyone, but please bear with me. I've just spent some time fitting poly functions to time series data in R using lm() and predict(). I want to analyze the functions once I've fit them to the various data I'm studying. However, after pulling the first function into Octave (just by plotting the polynomial function using fplot() over
2010 Dec 06
0
npRmpi memory error
Hi List, I'm using npRmpi to run some density equality tests and place the output into a matrix. I've put together some crude functions for the purpose, but I'm receiving the following error when npdeneqtest() reached the bootstrap; FATAL ERROR: Memory allocation failure (type DBL_VECTOR). Program terminated. I'm running Ubuntu Lucid 64bit with 4 cores and 12GB of memory. My R
2009 Oct 17
0
More polyfit problems
Hi Everyone, I'm continuing to run into trouble with polyfit. I'm using the fitting function of the form; fit <- lm(y ~ poly(x,degree,raw=TRUE)) and I have found that in some cases a polynomial of certain degree can't be fit, the coefficient won't be calculated, because of a singularity. If I use orthogonal polynomials I can fit a polynomial of any degree, but I don't get
2009 Nov 27
1
Time Series Data
Hi All, I'm trying to analyze some time series data and I have run into difficulty. I have decadal sun spot data and I want to separate the very regular periodic function from the trend and noise. I looked into using stl(), but the frequency of the time series data must be greater than 1 for stl(). My data covers a 1000 year interval from 9095 BP to 8095BP and the frequency is, therefore, 0.1
2011 Feb 01
1
Rmpi; sample code not running, the slaves won't execute commands
Hi All, I'm trying to parallelize some code using Rmpi and I've started with a sample 'hello world' program that's available at http://math.acadiau.ca/ACMMaC/Rmpi/sample.html. The code is as follows; # Load the R MPI package if it is not already loaded. if (!is.loaded("mpi_initialize")) { library("Rmpi") } # Spawn as many slaves as possible
2010 Nov 17
1
efficient conversion of matrix column rows to list elements
Hi List, I'm hoping to get opinions for enhancing the efficiency of the following code designed to take a vector of probabilities (outcomes) and calculate a union of the probability space. As part of the union calculation, combn() must be used, which returns a matrix, and the parallelized version of lapply() provided in the multicore package requires a list. I've found that
2010 Nov 14
1
R package 'np' problems
Hi List, I'm trying to get a density estimate for a point of interest from an npudens object created for a sample of points. I'm working with 4 variables in total (3 continuous and 1 unordered discrete - the discrete variable is the character column in training.csv). When I try to evaluate the density for a point that was not used in the training dataset, and when I extract the fitted