[R] c++ equivalent 'default' case in switch

2010-10-06 Thread raje...@cse.iitm.ac.in
Hi, Is there a c++ equivalent default case in the switch command? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Converting a dataframe column from string to datetime

2010-10-04 Thread raje...@cse.iitm.ac.in
ok..thanks - Original Message - From: Don MacQueen macque...@llnl.gov To: raje...@cse.iitm.ac.in, r-help r-help@r-project.org Sent: Fri, 01 Oct 2010 20:51:06 +0530 (IST) Subject: Re: [R] Converting a dataframe column from string to datetime You’re working too hard. Use this: tms

[R] Issue with match.call

2010-10-04 Thread raje...@cse.iitm.ac.in
Hi, I have a function that I'm writing. The arguments in the function are as follows RFF-function(qtype, qOpt,...){} i.e., I have two args that are compulsary and the rest are optional. Now when my user passes the function call, I need to see what optional args are defined and process

[R] Converting a dataframe column from string to datetime

2010-10-01 Thread raje...@cse.iitm.ac.in
Hi, I have a dataframe column of the form v-c(Fri Feb 05 20:00:01.43000 2010,Fri Feb 05 20:00:02.274000 2010,Fri Feb 05 20:00:02.274000 2010,Fri Feb 05 20:00:06.34000 2010) I need to convert this to datetime form. I did the following.. lapply(v,function(x){strptime(x, %a %b %d %H:%M:%OS %Y)})

[R] break function execution

2010-09-28 Thread raje...@cse.iitm.ac.in
Hi, I have an R function that executes for a little over a minute. When the function starts running, the R interface freezes and doesnt change until the function exits cleanly. Is there someway I can force the function to exit without messing up the interface?(An equivalent of Ctrl-C)

Re: [R] break function execution

2010-09-28 Thread raje...@cse.iitm.ac.in
I'm on windows xp. I use R 2.11.1 GUI - Original Message - From: Greg Snow greg.s...@imail.org To: raje...@cse.iitm.ac.in, r-help r-help@r-project.org Sent: Wed, 29 Sep 2010 00:48:51 +0530 (IST) Subject: RE: [R] break function execution Ctrl-C works on some platforms, it would help us

[R] running time consuming function in the background?

2010-09-20 Thread raje...@cse.iitm.ac.in
Hi, I have a function that takes close to 60 seconds to run. In this time, the R interface freezes and I have to wait for it to complete. Is there anyway the function can run in the background while I continue to use the interface? It could send me a signal when it completed.

[R] characters in a string

2010-09-15 Thread raje...@cse.iitm.ac.in
Hi, I need to check if a string rha,b,c,drh is delimited by two rh 's as efficiently as possible(I need to do this a lot of times) and return TRUE. Can someone suggest a good technique? [[alternative HTML version deleted]] __

Re: [R] characters in a string

2010-09-15 Thread raje...@cse.iitm.ac.in
great! Thanks - Original Message - From: David Winsemius dwinsem...@comcast.net To: raje...@cse.iitm.ac.in Cc: r-help r-help@r-project.org Sent: Wed, 15 Sep 2010 21:12:27 +0530 (IST) Subject: Re: [R] characters in a string On Sep 15, 2010, at 11:16 AM, raje...@cse.iitm.ac.in wrote

Re: [R] dataframe of dataframes?

2010-09-14 Thread raje...@cse.iitm.ac.in
This is great. Thanks - Original Message - From: Henrik Bengtsson h...@stat.berkeley.edu To: Jeff Newmiller jdnew...@dcn.davis.ca.us Cc: raje...@cse.iitm.ac.in, r-help r-help@r-project.org Sent: Tue, 14 Sep 2010 12:27:38 +0530 (IST) Subject: Re: [R] dataframe of dataframes? You can

[R] dataframe of dataframes?

2010-09-13 Thread raje...@cse.iitm.ac.in
Hi, I create several dataframes in a nested loop and would like to maintain them in a matrix form with each dataframe represented by the row and the column. How can I do this? [[alternative HTML version deleted]] __ R-help@r-project.org

[R] advise on operations speed with Rcpp,Boost::ipc Shared Memory

2010-09-09 Thread raje...@cse.iitm.ac.in
Hi, I have an implementation where I transfer data records via shared memory to an R program. If anyone has prior experience, I'd like to find out which would be faster 1) storing data records in shared memory as they are(in a matrix) and then use the Rcpp::wrap to convert them to R

[R] adding list to data.frame iteratively

2010-09-08 Thread raje...@cse.iitm.ac.in
Hi, I have a preallocated dataframe to which I have to add a list whose vectors will become rows in the dataframe. This is done iteratively. How can I do this? I'm dealing with very large numbers...list of 1000 vectors to a dataframe of 20 iteratively for e.g. my list is as follows

[R] shared memory system for R windows

2010-09-08 Thread raje...@cse.iitm.ac.in
Hi, is there a shared memory implementation for R windows, preferably something that resembles the boost c++ libraries [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] queue implementation?

2010-09-07 Thread raje...@cse.iitm.ac.in
Hi, is there a queue implementation in R? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

[R] slow socket read in R?

2010-09-07 Thread raje...@cse.iitm.ac.in
Hi, I have a server(written in C++) that is continuously sending data through a socket(the server does some processing between sends). When I receive the data through a client written in R, the receive is slower than the send of the server even if I'm just receiving at the client and not

[R] Uncompressing data from read.socket

2010-09-07 Thread raje...@cse.iitm.ac.in
Hi, Is it possible to uncompress gzipped data coming over a socket? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] bigmemory doubt

2010-09-07 Thread raje...@cse.iitm.ac.in
Hi, Is it possible for me to read data from shared memory created by a vc++ program into R using bigmemory? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] representing NULL values in a vector

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, I have a vector who contents should look like this, c d NULL e f etc or 4 5 6 NULL 7 8 9 how can I represent the null value? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] size limit of string/parse a string and convert to vector

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, I have a loop as follows, dataStr - character(0) repeat{ fstr-read.socket(sockfd) if(fstr==) break dataStr-paste(dataStr,fstr) } at what point does dataStr stop accepting(gets full)? I'm sending millions of records over the socket and need to know if all of it can go into

Re: [R] representing NULL values in a vector

2010-09-06 Thread raje...@cse.iitm.ac.in
NA is good.thanks - Original Message - From: Patrick Burns pbu...@pburns.seanet.com To: r-help@r-project.org, raje...@cse.iitm.ac.in Sent: Mon, 06 Sep 2010 13:55:34 +0530 (IST) Subject: Re: [R] representing NULL values in a vector Perhaps you mean NA rather than NULL. If NA is not what

[R] dataframe row names from list

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, I have a list which looks like this... str(y) List of 10 $ : chr [1:4] ABCD 5 0 1 $ : chr [1:4] DEF 15 1 16 $ : chr [1:4] AAA 2 17 8 $ : chr [1:4] SSS 15 25 1 $ : chr [1:4] III 15 26 4 $ : chr [1:4] OPQ 7 30 4 $ : chr [1:4] TYR 14 34 8 $ : chr [1:4] IRTS 15 42 1 $ : chr [1:4] LLL 15

[R] inserting a vector as a row in a data.frame

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, is it possible to insert a vector as a row in a data.frame? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] return from .Call()

2010-09-04 Thread raje...@cse.iitm.ac.in
Hi, I have a .Call in my R function in a loop that repeats a certain number of times. Each time, the .Call returns a list. So, when I say something like, y-func() would y be a list of lists?(as many as the number of loops?) [[alternative HTML version deleted]]

[R] limit on read.socket?

2010-09-04 Thread raje...@cse.iitm.ac.in
Hi, I have the following piece of code, repeat{ ss-read.socket(sockfd); if(ss==) break output-paste(output,ss) } but somehow, output is not receiving all the data that is coming through the socket.My suspicion is on the if statement. what happens if a white space occurs in between the

Re: [R] R CMD check Package(Windows): Error in inDL(x, as.logical(local), as.logical(now), ...) :

2010-09-03 Thread raje...@cse.iitm.ac.in
...@cse.iitm.ac.in Cc: r-help r-help@r-project.org Sent: Thu, 02 Sep 2010 16:42:31 +0530 (IST) Subject: Re: [R] R CMD check Package(Windows): Error in inDL(x, as.logical(local), as.logical(now), ...) : On 02/09/2010 6:46 AM, raje...@cse.iitm.ac.in wrote: It is dependent on another dll but it did

[R] readLines and writeLines

2010-09-03 Thread raje...@cse.iitm.ac.in
Hi, I have a socket connection where I do -socketConnection -writeLines and then wait for the server to send data through the socket. so I have to wait on a readLines.But when I say str-readLines(con) it executes immediately and str gets nothing.what do i do for this? [[alternative

[R] R CMD check Package(Windows): Error in inDL(x, as.logical(local), as.logical(now), ...) :

2010-09-02 Thread raje...@cse.iitm.ac.in
Hi, I've built my own package in windows and when I run R CMD check Package-Name I get, * install options are ' --no-html' * installing *source* package 'AceTest' ... ** libs making DLL ... g++ ...etc. installing to PATH ... done ** R ** preparing package for lazy loading ** help Warning:

Re: [R] R CMD check Package(Windows): Error in inDL(x, as.logical(local), as.logical(now), ...) :

2010-09-02 Thread raje...@cse.iitm.ac.in
It is dependent on another dll but it did not give compilation errors. It seemed to link fine at that point. Why does it have a problem at this stage? From: Duncan Murdoch murdoch.dun...@gmail.com To: raje...@cse.iitm.ac.in Cc: r-help r-help@r-project.org Sent: Thursday, September 2, 2010 4

[R] running an exe in the background

2010-09-02 Thread raje...@cse.iitm.ac.in
Hi, I'd like to be able to run a .exe in the background whenever library(package-x) is called. Is this possible? ~Aks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] binary package build error:target 'xf-' is not a directory

2010-08-31 Thread raje...@cse.iitm.ac.in
Hi, I built a package in linux and generated its binary using R CMD build --binary testpack. This generated testpack.tar.gz. I tried to install this package in windows using R CMD INSTALL package.tar.gz and I got the error *installing to library 'H:/R-2.11.1/library' *installing