[R] retrieve path analysis coefficients (package agricolae)

2010-05-23 Thread Zack Holden
Dear list, I'd like to use path.analysis in the package agricolae in batch format on many files, retrieving the path coefficients for each run and appending them to a table. I don't see any posts in the help files about this package or the path.analysis package. I've tried creating an object out

[R] subset dataframe by rows using character vector?

2009-04-14 Thread zack holden
Dear List, I'm stuck on what seems like a simple indexing problem, I'd be very grateful to anyone willing to help me out. I queried a dataframe which returns a character vector called plot. I have another dataframe from which I want to subset or select only those rows that match plot.

Re: [R] download/retain text file structure with RCurl/getURL(): Solution

2009-01-21 Thread zack holden
this helps. - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spec...@stat.berkeley.edu On Mon, 19 Jan 2009, zack holden wrote: Dear list, I'm trying to download a text file directly from the internet using the RCurl package and the command getURL. Duncan

[R] download/retain text file structure with RCurl/getURL()

2009-01-19 Thread zack holden
Dear list, I'm trying to download a text file directly from the internet using the RCurl package and the command getURL. Duncan Lang graciously helped me solve the first step in this problem using the following command: # txtfile -

Re: [R] problems with download.file() from ftp?

2009-01-14 Thread zack holden
are on Windows, using --internet2 (see the rw-FAQ) might work. On Mon, 12 Jan 2009, zack holden wrote: Dear list, I am trying to download a text file from an ftp site using download.file(). I used the following code: url - ftp://ftp.wcc.nrcs.usda.gov/data/snow/snow_course/table/history/idaho

[R] problems with download.file() from ftp?

2009-01-12 Thread zack holden
Dear list, I am trying to download a text file from an ftp site using download.file(). I used the following code: url - ftp://ftp.wcc.nrcs.usda.gov/data/snow/snow_course/table/history/idaho/13e19.txt; dest - c:/test/downloadtest.txt download.file(url, dest) I get this error message,

[R] Plot multiple lines, same plot, different axes?

2008-12-17 Thread zack holden
Dear list, I would like to plot 2 series of numbers with very different ranges/scales as lines on the same plot. I assumed this is commonly done and easy, but I have not found any help files (e.g. axis() or matplot() that show how. I've searched many old posts to no avail. I'll be very

[R] regexpr syntax question

2008-09-30 Thread zack holden
Greetings R list, I am stuck on a simple syntax problem. I want to list all files in a directory, excluding files of a certain type. I have tried pattern matching as follows: a - list.files(data, full.name = TRUE, pattern != .xml) # exclude all .xml files The warning returns that my

[R] Index alternative to nasty FOR loop?

2008-08-06 Thread zack holden
Dear R wizards, I have a folder containing 1000 files. For each file, I need to extract the first row of each file, paste it to a new file, then write out that file. Then I need to repeat this operation for each additional row (row 2, then row 3, etc) for 23 rows in each file. I can do

[R] backslash in character string?

2008-08-04 Thread zack holden
Dear list, After searching many old posts, I can't find the solution to a simple problem. can someone tell me how to create a character string with multiple backslashes, as in: file_dir - c(C:\files\data\) I need to create this string and then paste it to many files names for batch

[R] 64 bit Linux/Ubuntu memory limit problem?

2008-04-23 Thread zack holden
Dear list, I've recently installed R on a 64 bit machine with 8 GB of RAM. I set this computer up as a dual-boot system, with windows XP 64 and Ubuntu 7.10. I downloaded the Linux 64 bit version of R and installed it. I'm trying to run rather large Random forest models and was running into

[R] APPLY as alternate to FOR loop?

2008-03-30 Thread zack holden
Dear list, Below I've written a clunky for loop that counts NA's in a row, replacing all with NA if there are more than 3 missing values, or keeping the values if 4 or more are present. This is sample code from a very large dataframe I'm trying to clean up. I know there are many simpler

[R] FOR LOOP w/IFELSE statement help

2008-03-05 Thread zack holden
Dear list, I'm trying to query a string of numbers to identify where in the string the numbers stop increasing (where x[i] == x[i+1]). In example 1 below, I've adapted code from Jim Holt to do this. However, I run into situations where the condition is not met, as in example 2, where the

[R] while loop syntax help

2008-02-29 Thread zack holden
Dear list, I'm trying to write my first looping function in R. After many hours of searching help files and previous posts, I'm at wits end. Please forgive my programming ignorance...any help is greatly appreciated. I need to sort through a vector (x) and identify the point at which 2