[R] Automated Start for new Rgui within existing R code?

2013-01-31 Thread Brigid Mooney
Is there a way to start multiple instances of R in an automated manner? Since I'm not sure that question makes tons of sense, here's my scenario: I have a number of data updates that need to be completed on an ongoing basis with the data pulled from and then stored to another location. The

[R] Numeric Label of Factor value?

2012-10-10 Thread Brigid Mooney
Sorry, I'm sure I'm not using the appropriate vocab here, which is undoubtedly why I can't seem to find a fix to this (hopefully very easy) problem. Suppose you have a factor abc - factor(c(2,2,3,4,7,7)) And you want to know what the number in the nth spot in that would be abc[1] [1] 2 Levels:

[R] Add rank column to data frame as in SQL...

2012-06-01 Thread Brigid Mooney
Hopefully this is an easy problem... I'm trying to add a partitioned rank column to a data frame where the rank is calculated separately across a partition by categories, the way you could easily do in SQL. I found this solution in the archives that looked like it might work:

[R] Decimal Accuracy Loss?

2011-04-06 Thread Brigid Mooney
This is hopefully a quick question on decimal accuracy. Is any decimal accuracy lost when casting a numeric vector as a matrix? And then again casting the result back to a numeric? I'm finding that my calculation values are different when I run for loops that manually calculate matrix

Re: [R] Decimal Accuracy Loss?

2011-04-06 Thread Brigid Mooney
Thanks, Bert. That's a big help. -Brigid On Wed, Apr 6, 2011 at 11:45 AM, Bert Gunter gunter.ber...@gene.com wrote: Confirmed. Casting just adds/removes the dim attribute to the numeric vector/matrix. -- Bert On Wed, Apr 6, 2011 at 8:33 AM, Brigid Mooney bkmoo...@gmail.com wrote

[R] Performance Difference? Windows vs. Linux

2011-03-18 Thread Brigid Mooney
I'm not trying to start a Windows vs. Linux debate, but I've been using R on a Windows machine for a while, and was recently wondering if R's performance would be faster on a Linux machine. And similarly, if any incremental increase in processing speed would be worth the time it would take me to

[R] randomness using runif

2010-07-23 Thread Brigid Mooney
I'm working on a problem where I'm introducing random error and have been using the built in function runif to provide that random error. However, I realized that I seem to be getting some unexpected behavior out of the function and was hoping someone could share some insight. I don't know the

[R] Problem Matching Exact Values

2010-06-09 Thread Brigid Mooney
Sorry for the basic question - bur I ran into something I haven't noticed before and would appreciate a little more perspective on my problem. I am using R to determine if various thresholds are hit (or surpassed) in a data set.  If a threshold is surpassed, I have had no problems identifying it. 

[R] Accessing outside data sources for stock data?

2010-04-22 Thread Brigid Mooney
Hi All, I apologize if this is not the right forum for this question. I know there used to be a package for R that connected to opentick's (open source) stock market data. However, opentick closed up about a year ago. Does anyone know of a similar package that connects to IQfeed's stock market

[R] Multiply List by a Numeric

2009-08-24 Thread Brigid Mooney
I apologize for what seems like it should be a straighforward query. I am trying to multiply a list by a numeric and thought there would be a straightforward way to do this, but the best solution I found so far has a for loop. Everything else I try seems to throw an error non-numeric argument to

[R] Activation Functions in Package Neural

2009-07-23 Thread Brigid Mooney
Hi, I am trying to build a VERY basic neural network as a practice before hopefully increasing my scope. To do so, I have been using package neural and the MLP related functions (mlp and mlptrain) within that package. So far, I have created a basic network, but I have been unable to change the

[R] Neural Networks

2009-07-01 Thread Brigid Mooney
Hi, I am starting to play around with neural networks and noticed that there are several packages on the CRAN website for neural networks (AMORE, grnnR, neural, neuralnet, maybe more if I missed them). Are any of these packages more well-suited for newbies to neural networks? Are there any

[R] Error Catching?

2009-06-04 Thread Brigid Mooney
Hi, Is there an easy way to catch errors, in order to arrange for r-scripts to exit gracefully? I'm thinking of something along the lines of using is.na with an if/else statement, but for errors. Thanks! __ R-help@r-project.org mailing list

Re: [R] Example for parsing XML file?

2009-05-21 Thread Brigid Mooney
are all T. (BTW, make certain the '-' on the second line is not in the XML content.  I assume that came from bringing the text into mail.) HTH  D. Brigid Mooney wrote: Hi, I am trying to parse XML files and read them into R as a data frame, but have been unable to find examples which I could

[R] efficiency when processing ordered data frames

2009-05-20 Thread Brigid Mooney
Hoping for a little insight into how to make sure I have R running as efficiently as possible. Suppose I have a data frame, A, with n rows and m columns, where col1 is a date time stamp. Also suppose that when this data is imported (from a csv or SQL), that the data is already sorted such that

[R] Example for parsing XML file?

2009-05-20 Thread Brigid Mooney
Hi, I am trying to parse XML files and read them into R as a data frame, but have been unable to find examples which I could apply successfully. I'm afraid I don't know much about XML, which makes this all the more difficult. If someone could point me in the right direction to a resource

[R] Print to File Formatting

2009-05-06 Thread Brigid Mooney
Hello, I am writing out to a file and have two quick questions that I can't seem to track down the correct answers for. Luckily, I *think* they are both simple enough that someone might be able to point me in the right direction on them without too much trouble. Both questions relate to the

[R] error when setting up Rcmd BATCH on new computer

2009-03-27 Thread Brigid Mooney
Hello, I got a new computer, and am trying to reinstall R and have run into a bit of a problem when running the BATCH command. For reference, the OS is Windows Vista, 64 bit. I installed R 2.8.1 and have the 4-3 files from the following link extracted with the containing folder in my system PATH

Re: [R] error when setting up Rcmd BATCH on new computer

2009-03-27 Thread Brigid Mooney
My apologies, the files version 4-3 files I downloaded came from the link: http://cran.r-project.org/contrib/extra/batchfiles 2009/3/27 Uwe Ligges lig...@statistik.tu-dortmund.de: Brigid Mooney wrote: Hello, I got a new computer, and am trying to reinstall R and have run into a bit

[R] formula formatting/grammar for regression

2009-02-27 Thread Brigid Mooney
Hi all, I am doing some basic regression analysis, and am getting a bit confused on how to enter non-polynomial formulas to be used. For example, consider that I want to find A and r such that the formula y = A*exp(r*x) provides the the best fit to the line y=x on the interval [0,50]. I can

[R] Percentiles/Quantiles with Weighting

2009-02-17 Thread Brigid Mooney
Hi All, I am looking at applications of percentiles to time sequenced data. I had just been using the quantile function to get percentiles over various periods, but am more interested in if there is an accepted (and/or R-implemented) method to apply weighting to the data so as to weigh recent

Re: [R] Percentiles/Quantiles with Weighting

2009-02-17 Thread Brigid Mooney
:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Champaign, IL 61820 On Feb 17, 2009, at 10:57 AM, Brigid Mooney wrote: Hi

[R] Appending objects created using filehash package

2009-01-23 Thread Brigid Mooney
Hi, I am working with a very large dataset, and am using the 'filehash' package to manage such a large file. While I have no problem accessing objects that I load into a database, I was hoping there is a better way to append to objects already in the database. The only way I know now to append

[R] Error as.Date on Invalid Dates

2009-01-21 Thread Brigid Mooney
Hi All, I have an script in R which accepts user inputs for certain parameters, particularly dates, which the user inputs as character strings. eg: date1 - 2009-01-21 The script later parses the input via the as.Date function: as.Date(date1) However, as.Date encounters an error when the

[R] Missing file to run Rcmd batch on Windows

2009-01-16 Thread Brigid Mooney
Hi, I'm trying to run an R script using Rcmd Batch from the command line on a Windows Vista machine. I am using R version 2.8.1. I installed the batch files 4-3 found at http://cran.r-project.org/contrib/extra/batchfiles/ and added them to my path. I also had to install the latest version of

[R] Memory Size Allocation in R

2009-01-13 Thread Brigid Mooney
My apologies if this is a bit of a 'newbie' question. I am using R v 2.8.0 in Windows and am a bit confused about the memory size/allocation. A script I wrote faulted out with the error: Error: cannot allocate vector of size 5.6 Mb After this error, I still have: memory.size() [1] 669.3517

Re: [R] How can I avoid nested 'for' loops or quicken the process?

2008-12-23 Thread Brigid Mooney
, 22 Dec 2008, Brigid Mooney wrote: Hi All, I'm still pretty new to using R - and I was hoping I might be able to get some advice as to how to use 'apply' or a similar function instead of using nested for loops. Unfortunately, you have given nothing that is reproducible. The details

Re: [R] How can I avoid nested 'for' loops or quicken the process?

2008-12-23 Thread Brigid Mooney
Thank you again for your help. I updated the parsing at the beginning of the calcProfit function with: if (class(IterParam) == numeric) { long - IterParam[long] short - IterParam[short] investment - IterParam[investment] stoploss - IterParam[stoploss]

Re: [R] How can I avoid nested 'for' loops or quicken the process?

2008-12-23 Thread Brigid Mooney
, X, Y) -- On Tue, Dec 23, 2008 at 11:15 AM, David Winsemius dwinsem...@comcast.netwrote: On Dec 23, 2008, at 10:56 AM, Brigid Mooney wrote: Thank you again for your help

[R] How can I avoid nested 'for' loops or quicken the process?

2008-12-22 Thread Brigid Mooney
Hi All, I'm still pretty new to using R - and I was hoping I might be able to get some advice as to how to use 'apply' or a similar function instead of using nested for loops. Right now I have a script which uses nested for loops similar to this: i - 1 for(a in Alpha) { for (b in Beta) { for (c

[R] formatting print statements with multiple lines

2008-12-18 Thread Brigid Mooney
When executing the command: print(cat(paste(Input criteria does not meet specifications. Check input against the following requirements: a = 0 b = 0 c = 0 , sep=), )) I get: Input criteria does not meet specifications. Check input against the following

[R] Avoiding multiple outputs using RODBC package

2008-12-12 Thread Brigid Mooney
I am using R as a data manipulation tool for a SQL database. So in some of my R scripts I use the RODBC package to retreive data, then run analysis, and use the sqlSave function in the RODBC package to store the results in a database. There are two problems I want to avoid, and they are highly

[R] Applying min to numeric vectors

2008-12-09 Thread Brigid Mooney
I was surprised this morning, that it seems as though the min() function does not work as *I* anticipated when given vector arguments. For example: a - 1:10 b - c(rep(1, times=5), rep(10, times=5)) Result: min(a,b) 1 What I actually wanted was a term by term minimum, i.e.: ifelse(a=b, a, b)

[R] run time function for R scripts?

2008-11-25 Thread Brigid Mooney
Hi All, I was wondering if there was a function in R that would output the total run time for various scripts. For now I have the following workaround: begTime - Sys.time() ... the rest of the R script... runTime - Sys.time()-begTime Is there another function that I don't know about that

[R] Error in sqlCopy in RODBC

2008-11-25 Thread Brigid Mooney
Hi All, I am trying to copy portions of tables from one SQL database to another, using sqlCopy in the RODBC package. RemoteChannel = connection to remote database LocalChannel = connection to local database LocalTable = table in my local database to receive data from the remote database query -

[R] Create vector of data frames

2008-11-19 Thread Brigid Mooney
Hi All, I'm sorry I haven't been able to find anything that will help me with this problem, and I'm still pretty new to R - so any help here is greatly appreciated! I am looking to create a vector in a sequential process where each entry in the vector is a data frame, for example: days - 3 for

[R] Exclude holidays in a subset of dates?

2008-11-19 Thread Brigid Mooney
Hi All, I am iterating through dated materials, with variable start and end dates, and would like to skip procedures everytime I encounter a weekend or holiday. To do this, I thought the easiest way would be to create a TRUE/FALSE vector corresponding to each day where it is TRUE if a workday,

[R] Command line arguments with source() - Windows OS

2008-11-17 Thread Brigid Mooney
Hi Everyone, I am pretty new to R and so far have mostly been using R interactively through the Windows console. I'm starting to write some scripts, and have been executing them using the source() command, i.e. source(myRfile.R). My questions is how can I pass command line arguments to R. My

Re: [R] Command line arguments with source() - Windows OS

2008-11-17 Thread Brigid Mooney
, Nov 17, 2008 at 9:06 AM, Duncan Murdoch [EMAIL PROTECTED]wrote: Brigid Mooney wrote: Hi Everyone, I am pretty new to R and so far have mostly been using R interactively through the Windows console. I'm starting to write some scripts, and have been executing them using the source() command

[R] Embed SQL queries in R?

2008-11-14 Thread Brigid Mooney
Hi All, Most of the work I am doing with R uses data which I am pulling from various SQL queries. To streamline the process even more, I was wondering if it was possible to embed SQL queries in R - that way avoiding the need to first get the data, then move to R to process it. I haven't found

[R] Unflatten a table in R

2008-11-13 Thread Brigid Mooney
Hi All, I'm pretty new to R, so would really appreciate it if someone could point me in the right direction on this problem. I am trying to unflatten a table in R, and can't seem to find a function or method to complete this task, (hopefully efficiently). My data table is full of historical