[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 http://www.R-project.org/p

[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 accordi

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 To: raje...@cse.iitm.ac.in, r-help 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 <- as.POSIXct(strptime(v, "%a

[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:

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 To: raje...@cse.iitm.ac.in, r-help 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 to help you if we knew which OS yo

[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) Additio

[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. [[altern

Re: [R] characters in a string

2010-09-15 Thread raje...@cse.iitm.ac.in
great! Thanks - Original Message - From: David Winsemius To: raje...@cse.iitm.ac.in Cc: r-help 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: > > Hi, > > I need to check if a

[R] characters in a string

2010-09-15 Thread raje...@cse.iitm.ac.in
Hi, I need to check if a string "a,b,c,d" is delimited by two "" '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]] __ R-help@r-project.

Re: [R] dataframe of dataframes?

2010-09-14 Thread raje...@cse.iitm.ac.in
This is great. Thanks - Original Message - From: Henrik Bengtsson To: Jeff Newmiller Cc: raje...@cse.iitm.ac.in, r-help Sent: Tue, 14 Sep 2010 12:27:38 +0530 (IST) Subject: Re: [R] dataframe of dataframes? You can create an empty matrix (or even array) of list elements and then assign

[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 maili

[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 datatypes

[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 PLEAS

[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 ll<-li

[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 th

[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 http://www.R-project.or

[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 proc

[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 pr

[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 http://www.R-project.org/pos

[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" "3

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 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 you want, then I think

[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 dat

[R] max limit of list size and vector size?

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, Is it possible for me to store a list of vectors of 1 million entries? like, cc<-list(c(1,2,1million),c(1,2,1million)) also what is the length of the longest string in R? I keep getting info from a socket and keep pasting on a string...when will this start becoming a pr

[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 https://stat.ethz.ch/mailman/l

[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 st

[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] 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 HT

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
After the R CMD check is done and an R CMD INSTALL is done, where does the external dll have to be?..what can i do to make it move around with the package? can I zip it with the package? if so in what folder? - Original Message - From: Duncan Murdoch To: raje...@cse.iitm.ac.in Cc: r

[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 PLE

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" To: raje...@cse.iitm.ac.in Cc: "r-help" Sent: Thursday, September 2, 2010 4:05:14 PM Subject:

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

2010-09-01 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 ... done ** R ** preparing package for lazy loading ** help Warning: ./ma

[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 *bina