search for: miller_2555

Displaying 10 results from an estimated 10 matches for "miller_2555".

2010 Nov 12
3
Replicate Excel's LOGEST worksheet function in R
Hi - I have a dataframe of (x,y) values. I'd like to fit an exponential curve to the data for further statistical analysis (pretty much the same functionality provided by Excel's LOGEST worksheet array function). Can someone point me to the (set of) functions/ package that is best suited to provide this functionality? Admittedly, I am a novice in the use of R statistical functions,
2009 Nov 25
3
Feature request for as.Date() function
Hello - I have a csv file with a few date columns. Some of the records have an "NA" character string instead of the date. When I attempt to use read.csv() and typecast the columns using colClasses, I receive the following error: Error in charToDate(x) : character string is not in a standard unambiguous format Similarly, the following command produces the same error:
2009 Nov 15
2
Segmentation faults on SEXP conversion
Hello - I am making a first attempt at writing a simple C++ routine to print out R objects (this is a simple proof-of-concept as part of a larger package development). The relevant C++ routine is as follows: void Rwrite(SEXP fd, SEXP msg) { int *ofd = INTEGER(fd); const char * omsg = CHAR(asChar(msg)); printf("[%i] %s",*ofd,omsg); } And the corresponding interface in R is as
2010 Jan 19
2
Memory usage in read.csv()
I'm sure this has gotten some attention before, but I have two CSV files generated from vmstat and free that are roughly 6-8 Mb (about 80,000 lines) each. When I try to use read.csv(), R allocates all available memory (about 4.9 Gb) when loading the files, which is over 300 times the size of the raw data. Here are the scripts used to generate the CSV files as well as the R code: Scripts (run
2009 Aug 26
1
Applying do.call to a data.frame using function arguments
I'm trying to convert a data.frame to a series of strings (row-wise). There was a very good discussion awhile back (2002) entitled "[R] string concatenate across rows of a matrix??" where Tony Plate recommended the following two alternatives (x2 is an R object of type data frame -- a matrix also works for solution #1): 1) apply(format(x2), 1, paste, collapse=" ");
2009 Jun 12
1
Masked user input
Hi - I'm creating a package of database tools. A function in the package requires the username and password as input to the function in order to initially connect to the target database(s). Of course, this poses a significant security issue given the possible retention of the function statement in cleartext. I did not readily encounter a package meant to mask input from the user nor do I
2009 Jul 11
1
Passing arguments to forked children
Hi - I have attempted to use the fork::fork() function to perform parallel processing. However, the child R function called needs to know a given set of parameters to complete its task. Specifically, I iterate through a vector, and output values based on the elements of that vector to a database. The output strings contain elements of the iterated vector. I mocked-up the following code as an
2010 Jan 09
0
[Lattice] panel.levelplot - shrink argument to highlight absolute z-values
Hi - I have a levelplot with positive and negative z-values. I'd like to scale the levelplot rectangles proportional to the *absolute* z-values to highlight the z-value extremes (while retaining the color difference to track the positive/negative attribute). I've likely missed something in the documentation, but have been at it a couple days without finding a solution (other than
2008 Nov 28
0
Passing bigint (8-byte) values from Postgres to R using RPostgreSQL
Hi - I have a simple R script that inserts values into a Postgres table to generate a record that autogenerates a bigint unique ID (basically, a customized bigserial value). When I query the table to retrieve the bigint value, the value returned is not the same as the value created in the database (as evidenced by a direct query of the database table via pgAdmin). e.g. the value created should
2009 Jul 21
0
Accessing list object from within a function as a list element
Hi - I have a list (call it 'mylist') with the following elements: (i) a function (call it 'myfunc' and expressed as 'mylist$myfunc') and (ii) a variable (call it 'myvar' and expressed as 'mylist$myvar'). Since I use mylist as a pseudo-class (I assign mylist to multiple different R objects), I would like to access the mylist R object from within the