[R] rpart - Export rpart object branch splits

2014-02-10 Thread Jared Stabach
I am trying to export the tree splitting results from a rpart object. I can visualize the splits by printing the rpart object (shown below for my rpart object, model.prune). However, this printed result is not a dataframe and I am unable to export this information in .csv format. I can view the

[R] Subset POSIXlt Field

2010-10-05 Thread Jared Stabach
Hello All I, for the life of me, can't figure out to subset my dataframe by my Date field. The field has been formatted as POSIXlt. str(wild) .. $ Date: POSIXlt, format: "2010-05-28" "2010-05-28" "2010-05-28" ... This doesn't work: test <-subset(wild,ID=="2830" & Date=="2010-08-17"

Re: [R] invalid factor level, NAs generated

2010-07-16 Thread Jared Stabach
Yes, this is problem. Thanks for the suggestion. I had deleted the N/A values later in the script but should have taken care of them in this first step. Thanks very much Jared On Fri, Jul 16, 2010 at 4:11 PM, Peter Ehlers wrote: > On 2010-07-16 13:38, Jared Stabach wrote: > >>

[R] invalid factor level, NAs generated

2010-07-16 Thread Jared Stabach
I've seen a few threads about this, but none that seem to answer my problem I have a list of .txt files in a directory that I am reading into R and row binding together. I am using the following code to do so: # Directory where files are found my.txt.file.directory <- "C:/Jared/Data/Kenya/Wildeb

[R] Write value to PHP webpage

2010-07-13 Thread Jared Stabach
I have a series of animals that are being radio-tracked. I have written some code that goes through each animal and calculates the total distance that each animal is traveling. I will need to run these data on a regular basis and want to write the result to a .php webpage file so that the page up

[R] Time value not sorting properly

2010-07-08 Thread Jared Stabach
I have a dataframe of animal locations that I need to have in incremental order so that I can calculate the distance traveled between each time step. However, I have identified a few values that don't seem to sort properly. For instance, the last value in the table below should be the first value a