[R] Complexity parameter in rpart

2009-08-30 Thread Andrew Aldersley
Hi all, I'm currently using the 'rpart' function to run some regression analysis and I am at the point where I wish to prune my overfitted trees. Having read the documentation I understand that to do this requires the use of the complexity parameter. My question is how to go about choosing

[R] Creating new data frame using loop

2009-07-27 Thread Andrew Aldersley
Hi all, I sent a request round last week asking for help with using a for loop to read and separate a large dataset. The response I got worked great, but now I have another problem with using my loop. Basically I have a number of different files containing columned data. There are 132

[R] Creating a loop to read 3D dataset

2009-07-23 Thread Andrew Aldersley
Dear all, I have in my possession a netcdf from which I want to extract some data files. I have used the ncdf package to read the netcdf file and used the get.var.ncdf function to identify the variable i wish to use. The data is in the form of a time-series of geographical data points that

[R] Problems with bilinear interpolation of a grid

2009-06-21 Thread Andrew Aldersley
Dear all, I'm having trouble interpolating a number of gridded datasets that I have. I'm quite new to R so any help/advice that can be offered would be much appreciated! Firstly I'll describe my dataset. The data is a grid of the planet at 1 degree spatial resolution, with each grid cell