[R] apply with multiple references and database interactivity

2015-08-15 Thread Steve E.
Hi R Colleagues, I have a small R script that relies on two for-loops to pull data from a database, make some edits to the data returned from the query, then inserts the updated data back into the database. The script works just fine, no problems, except that I am striving to get away from loops,

[R] modifying a package installed via GitHub

2015-07-17 Thread Steve E.
Hi Folks, I am working with a package installed via GitHub that I would like to modify. However, I am not sure how I would go about loading a 'local' version of the package after I have modified it, and whether that process would including uninstalling the original unmodified package (and, convers

[R] operations on columns when data frames are in a list

2015-04-13 Thread Steve E.
Hello R folks, I have recently discovered the power of working with multiple data frames in lists. However, I am having trouble understanding how to perform operations on individual columns of data frames in the list. For example, I have a water quality data set (sample data included below) that c

Re: [R] help incorporating data subset lengths in function with ddply

2014-04-17 Thread Steve E.
Jeff - Thanks so very much for the solution and tips, all very much appreciated! Regards, Stevan -- View this message in context: http://r.789695.n4.nabble.com/help-incorporating-data-subset-lengths-in-function-with-ddply-tp4688926p4688999.html Sent from the R help mailing list archive at Nabbl

Re: [R] help incorporating data subset lengths in function with ddply

2014-04-16 Thread Steve E.
Hi Frede - Thank you for responding. Not quite what I am after. Notice that I included two data sets in my post, the first is the raw data whereas the second (the desired df) is similar but has a column of sequential numbers in another column at the end - that column of sequential numbers for each

[R] help incorporating data subset lengths in function with ddply

2014-04-16 Thread Steve E.
Dear R Community, I am having some trouble with a task that I hope you might be able to help with. I have a dataset that includes the time and corresponding stream discharge from numerous storms (example of structure with simplified data below). I would like to produce a field that details the dur

[R] help with rle function on paired data

2012-06-08 Thread Steve E.
Dear R Community - I hope you might be able to provide some guidance regarding the use of the rle function. I have a set of time-series data where a measured value is recorded every 30 seconds after the start of an experiment. Many of the measured values repeat and I am interested only in the value

Re: [R] help wrapping findInterval into a function

2011-12-08 Thread Steve E.
Michael (and others) - Right, 'within' did work, I had placed it in the wrong location previously, which your example code made clear. I wrapped several of these functions within a function to address all the desired flags in a single pass (probably horribly inefficient but it works). Thanks agai

Re: [R] help wrapping findInterval into a function

2011-12-07 Thread Steve E.
forgot to attach the data set http://r.789695.n4.nabble.com/file/n4170695/WaterData.txt WaterData.txt -- View this message in context: http://r.789695.n4.nabble.com/help-wrapping-findInterval-into-a-function-tp4165464p4170695.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] help wrapping findInterval into a function

2011-12-07 Thread Steve E.
Thanks to everyone for continued assistance with this problem. I realize that I had not included enough information, hopefully I have done so here. I attached a dput output of a sample of the data titled 'WaterData' (and str output below). Below are dput outputs of the function I am trying to ge

Re: [R] help wrapping findInterval into a function

2011-12-06 Thread Steve E.
Bill (and David), Thank you very much for taking the time to respond to my query. You were right, I was creating and calling the function exactly as you had predicted. I revised the structure based on your suggestion. It runs but the output is an array of the flags that are not attached to the

[R] help wrapping findInterval into a function

2011-12-06 Thread Steve E.
Dear R Community, I hope you might be able to assist with a small problem creating a function. I am working with water-quality data sets that contain the concentration of many different elements in water samples. I need to assign quality-control flags to values that fall into various concentrati

[R] help subsetting data based on date AND time

2011-09-08 Thread Steve E.
Dear R Community, I am new to R, and have a question that I suspect may be quite simple but is proving a formidable roadblock for me. I have a large data set that includes water-quality measurements collected over many 24-hour periods. The date and time of sample collection are in a combined Dat