[Rd] Reading an "unsigned long long" using R readBin()

2008-05-30 Thread Sean Davis
Sorry for the simple question, but I am trying to read an "unsigned long long" using the R readBin() function. Can someone point me in the right direction, or am I better off using C for such things? The file that I am reading will have been produced on the same machine that is doing the reading.

Re: [Rd] read.table: aborting based on a time constraint

2008-01-09 Thread Sean Davis
On Jan 9, 2008 2:01 PM, Derek Stephen Elmerick <[EMAIL PROTECTED]> wrote: > Hello – > > I am trying to write code that will read in multiple datasets; > however, I would like to skip any dataset where the read-in process > takes longer than some fixed cutoff. A generic version of the function >

Re: [Rd] readBin differences on Windows and Linux/mac

2008-01-01 Thread Sean Davis
On Jan 1, 2008 12:36 PM, Uwe Ligges <[EMAIL PROTECTED]> wrote: > Thank you, Henrik! This saves us a lot of time! > > Uwe > > > Henrik Bengtsson wrote: > > On 01/01/2008, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > >> Also make sure the problem is not due to downloading a gzip file in > >> text m

Re: [Rd] readBin differences on Windows and Linux/mac

2007-12-31 Thread Sean Davis
this example. Sean On Dec 31, 2007 1:24 PM, Uwe Ligges <[EMAIL PROTECTED]> wrote: > Can you give a reproducible example, pelase? > > Uwe Ligges > > > Sean Davis wrote: > > I have been trying to use the gunzip function in the R.utils package. > It > > opens a c

[Rd] readBin differences on Windows and Linux/mac

2007-12-31 Thread Sean Davis
I have been trying to use the gunzip function in the R.utils package. It opens a connection to a gzfile, uses readBin to read from that connection, and then uses writeBin to write out the raw data to a new file. This works as expected under linux/mac, but under Windows, I get: Error in readBin(i

Re: [Rd] Rapid Random Access

2007-12-14 Thread Sean Davis
On Dec 14, 2007 1:01 PM, Barry Rowlingson <[EMAIL PROTECTED]> wrote: > I have some code that can potentially produce a huge number of > large-ish R data frames, each of a different number of rows. All the > data frames together will be way too big to keep in R's memory, but > we'll assume a singl

Re: [Rd] Sweave/ESS-like tools for HTML

2007-10-16 Thread Sean Davis
Douglas Bates wrote: > My university provides me with a powerful course management system for > the courses that I teach. Among other things I can create a wiki for > the course, which is very convenient for cross-linking different bits > of the course. > > Naturally I use R extensively in my tea

Re: [Rd] package Geneland / Rgui under windows

2007-10-15 Thread Sean Davis
Gilles GUILLOT wrote: > Hi, > I experienced a problem with the package Geneland under R 2.6.0 > with windows XP professional. > > The commands below should simulate a dataset, > then make an MCMC simulation stored in tempdir(). > > It works with R 2.5.1 (both GUI and command line) > It works wit

Re: [Rd] C code for qbeta

2007-05-25 Thread Sean Davis
On Friday 25 May 2007 05:02, Gatsu wrote: > Can somebody help me? > > I need the C/C++ code for the R's qbeta function. R is open-source, so you can simply download the source and look at whatever parts you like. Sean __ R-devel@r-project.org mailing

Re: [Rd] R-2.5.0 install

2007-04-27 Thread Sean Davis
Anna Lobley wrote: > I am receiving the following errors when trying to install > gcrma and a number of other Bioconductor packages when > the installWithVers flag is set to be TRUE. > > >source("http://www.bioconductor.org/getBioC.R";); > >getBioC("gcrma", installWithVers=T); > Hi, Anna. You

Re: [Rd] [R] Error loading libraries in MAC

2007-04-19 Thread Sean Davis
I'll chime in to note the same. And just to add, sometimes restarting R seems to alleviate the problem On Wednesday 18 April 2007 18:58, Gregory Warnes wrote: > I have received a number of reports of problems with recent unversal > Mac packages from CRAN when used with R 2.4.1. Has somethin

Re: [Rd] Performing Merge and Duplicated on very large files

2007-04-18 Thread Sean Davis
On Tuesday 17 April 2007 23:44, Eitan Rubin wrote: > Hi, > > I am working with very large matrices (>1 million records), and need to > 1. Join the files (can be achieved with Merge) > 2. Find lines that have the same value in some field (after the join) and > randomly sample 1 row. > > I am conce

[Rd] Error building R-alpha (from 28-Mar-07, r40918)

2007-03-29 Thread Sean Davis
This could easily be my fault, but I don't see the same issue with r40902, so I am posting here: % uname -a Linux pressa 2.6.18.8-0.1-default #1 SMP Fri Mar 2 13:51:59 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux % gcc -v gcc version 4.1.2 20061115 (prerelease) (SUSE Linux) On a fresh download of R-

Re: [Rd] Bridging R to OpenOffice

2007-03-28 Thread Sean Davis
uot;S" ? > You may want to follow the link, offered by Leonard, to the "Google > Summer of Code"-project which is menthored by Sun Microsystems > (Star/OpenOffice developers), to get a clearer picture about it. > http://wiki.services.openoffice.org/wiki/Summer_of_Code_2007#

Re: [Rd] Bridging R to OpenOffice

2007-03-28 Thread Sean Davis
On Wednesday 28 March 2007 06:25, Roger Bivand wrote: > On Wed, 28 Mar 2007, Hin-Tak Leung wrote: > > Hmm, if all you are interested is reading/writing Excel spreadsheets > > from R, there are much lighter and easier ways of doing it, than > > hooking up with openoffice. The Perl people have had >

Re: [Rd] RJDBC

2007-03-05 Thread Sean Davis
Jose Sierra wrote: > I need help. > > I'm trying to connect with an Oracle DBMS and MySQL DBMS, I'm using > RJDBC package. > > My code is the next: > > library('rJava') > library('DBI') > library('RJDBC') > > //Mysql > drv <- > JDBC("com.mysql.jdbc.Driver","C:\\Temporal\\mysql-connector-java-3.0.

Re: [Rd] Same method for more than one class

2007-03-01 Thread Sean Davis
On Thursday 01 March 2007 06:18, Sean Davis wrote: > On Thursday 01 March 2007 05:47, Gregor Gorjanc wrote: > > Hi, > > > > when defining method (I used length bellow just for the simplicity) for > > myClass (S4 class) I use > > > > setMethod(f="length

Re: [Rd] Same method for more than one class

2007-03-01 Thread Sean Davis
On Thursday 01 March 2007 05:47, Gregor Gorjanc wrote: > Hi, > > when defining method (I used length bellow just for the simplicity) for > myClass (S4 class) I use > > setMethod(f="length", signature(x="myClass"), > def=function(x) { > cat("works") > }) > > If I have

Re: [Rd] IDE for R C++ package writing ?

2007-02-23 Thread Sean Davis
On Friday 23 February 2007 05:49, mel wrote: > Dear all, > > I have to develop a (hopefully) small package for R in C++. > I didn't code in C++ for some years, and i'm now searching > for an adequate IDE for this task. > > Some of my criterions : not proprietary, not too heavy, > open to linux, not

Re: [Rd] RODBC problems with unixodbc

2007-02-20 Thread Sean Davis
On Tuesday 20 February 2007 13:51, Sebastian P. Luque wrote: > Hi, > > I noticed that if a column is named "end" in a data frame (table.df > below), it leads to errors when trying to sqlSave()'it to a postgresql > connection: > > > ---<---cut here---start-->--- >

[Rd] Subsetting a vector in C

2006-11-01 Thread Sean Davis
I have a pretty simple question. I have an array of REALSXP allocated as: rsp = allocVector(REALSXP,n) and I simply want to pass subsets of rsp of size q (q

Re: [Rd] example using R to aggregate data from multiple Excel files

2006-10-05 Thread Sean Davis
On Thursday 05 October 2006 04:05, bryan rasmussen wrote: > Hi, > > I have a project to analyse the various Web server statistics for a > server on a weekly basis for the past year using data maintained in > about 20 excel files per week. I need to go through these files and > aggregate the data, o

Re: [Rd] Accesing R c-code

2006-09-28 Thread Sean Davis
On Thursday 28 September 2006 13:36, Patricia Bautista Otero wrote: > Hi r-devel, > > I am working on a R extension. My package is writen on C++ and in my code > I require a R function object. I received the R function object, then a > point x in which the "function" is going to be evaluated is gen

Re: [Rd] Unexpected source() behavior in R-devel

2006-09-04 Thread Sean Davis
Seth Falcon wrote: > Sean Davis <[EMAIL PROTECTED]> writes: > >> Seth Falcon wrote: >> >>> Peter Dalgaard <[EMAIL PROTECTED]> writes: >>> >>> >>> >>>> "Henrik Bengtsson" <[EMAIL PROTECTED

Re: [Rd] Unexpected source() behavior in R-devel

2006-09-03 Thread Sean Davis
Seth Falcon wrote: > Peter Dalgaard <[EMAIL PROTECTED]> writes: > > >> "Henrik Bengtsson" <[EMAIL PROTECTED]> writes: >> >> >>> This has been reported before on r-devel, e.g. May 9, 2006 "[Rd] Seg >>> fault when installing package from bad repository". >>> >>> It's happening on Mac OSX when

Re: [Rd] Unexpected source() behavior in R-devel

2006-09-03 Thread Sean Davis
Peter Dalgaard wrote: > Sean Davis <[EMAIL PROTECTED]> writes: > > >> Why am I seeing the following in R-devel (sept 2, 2006 build) on opensuse >> 10.1? I'm sure it is something simple I am missing, but I just don't see it >&

[Rd] Unexpected source() behavior in R-devel

2006-09-03 Thread Sean Davis
Why am I seeing the following in R-devel (sept 2, 2006 build) on opensuse 10.1? I'm sure it is something simple I am missing, but I just don't see it (output below). Thanks, Sean > readLines(url("http://www.bioconductor.org/biocLite.R";)) [1] "source(\"http://bioconductor.org/getBioC.R\";)"

Re: [Rd] building windows packages under wine/linux and cross-compiling.

2006-08-02 Thread Sean Davis
Duncan Murdoch wrote: > On 8/2/2006 6:05 PM, Hin-Tak Leung wrote: > >>Uwe Ligges wrote: >> >> >>>I cannot imagine: Why should one want to perform difficult cross >>>compiling if you have Windows available? >>>And why should I run R under wine? If I like Windows, I use Windows, if >>>I have like

Re: [Rd] Editing a package with a NAMESPACE in place

2006-06-06 Thread Sean Davis
On 6/6/06 8:33 AM, "Uwe Ligges" <[EMAIL PROTECTED]> wrote: > Sean Davis wrote: >> I would like to edit a function from a package that uses a NAMESPACE, but in >> place (after the package is loaded). As a simple example, I would like to >> add a browser() c

[Rd] Editing a package with a NAMESPACE in place

2006-06-06 Thread Sean Davis
I would like to edit a function from a package that uses a NAMESPACE, but in place (after the package is loaded). As a simple example, I would like to add a browser() call to a line in one of the functions for debugging purposes. Since the function is in the package namespace, I can't do that dir

Re: [Rd] grep() and factors

2006-06-05 Thread Sean Davis
Marc Schwartz (via MN) wrote: > On Mon, 2006-06-05 at 13:45 -0700, Bill Dunlap wrote: > >>On Mon, 5 Jun 2006, Marc Schwartz (via MN) wrote: >> >> >>>Based upon an offlist communication this morning, I am somewhat confused >>>(more than I usually am on most Monday mornings...) about the use of >>>g

Re: [Rd] Running R on dual/quad Opteron machines

2006-03-06 Thread Sean Davis
On 3/6/06 1:37 PM, "Thomas Lumley" <[EMAIL PROTECTED]> wrote: > On Mon, 6 Mar 2006, Simone Giannerini wrote: > >> On 3/6/06, Thomas Lumley <[EMAIL PROTECTED]> wrote: >>> On Mon, 6 Mar 2006, Simone Giannerini wrote: The environment will probably be either Unix/Linux or Solaris and the

Re: [Rd] Running R on dual/quad Opteron machines

2006-03-06 Thread Sean Davis
On 3/6/06 11:50 AM, "Simone Giannerini" <[EMAIL PROTECTED]> wrote: > Dear all, > > I am managing a departmental purchase of an Opteron based > workstation/server for scientific computing on which we will be > running R. > The environment will probably be either Unix/Linux or Solaris and the >

[Rd] Read.delim error in 2.3.0 devel, not in 2.2.0

2006-01-23 Thread Sean Davis
I get this error in R-devel, but not in R-2.2.0. Any insight is appreciated. Error in read.delim(txtcon, header = TRUE, sep = "\t", na.strings = "NULL") : recursive default argument reference > sessionInfo() Version 2.3.0 Under development (unstable) (2006-01-04 r36984) powerpc-apple-darwi

Re: [Rd] Issue with c++ .C call

2006-01-11 Thread Sean Davis
On 1/10/06 6:50 PM, "Thomas Lumley" <[EMAIL PROTECTED]> wrote: > On Tue, 10 Jan 2006, Sean Davis wrote: > >> >> Thanks, Thomas. That did fix the initialization issue (or apparent one). >> Unfortunately, the reason that I started debugging was for seg

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Sean Davis
On 1/10/06 2:27 PM, "Thomas Lumley" <[EMAIL PROTECTED]> wrote: > On Tue, 10 Jan 2006, Sean Davis wrote: >> and such. However, the call to the function is via .C; parameters from the >> .C call are not being passed correctly to the function. As an example, I &g

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Sean Davis
On 1/10/06 1:41 PM, "Dominick Samperi" <[EMAIL PROTECTED]> wrote: > Sean, > > prm in your function calcStepgram is NOT a vector of doubles, it is of type > SEXP, and you need to use R macros to fetch the value(s). This is done > automatically in the Rcpp package, and if you want to see how thi

Re: [Rd] Issue with c++ .C call

2006-01-10 Thread Sean Davis
On 1/10/06 1:33 PM, "Prof Brian Ripley" <[EMAIL PROTECTED]> wrote: > Looks like a type mismatch in the call: you have not shown us the C++ > code. extern "C" void calcStepgram(double *data, double *prm, double *intervals, int *max, int *n,double *plot) {

[Rd] Issue with c++ .C call

2006-01-10 Thread Sean Davis
I am still having some difficulties with connecting R to a C++ function. I am able to call the function as expected after compiling the shared library and such. However, the call to the function is via .C; parameters from the .C call are not being passed correctly to the function. As an example,

Re: [Rd] Interfacing R and C++

2006-01-09 Thread Sean Davis
On 1/9/06 3:20 PM, "Prof Brian Ripley" <[EMAIL PROTECTED]> wrote: > The wrapper function must be in extern "C" {} since you want to give it a > C name (and not a mangled C++ one). These days, the headers probably do > not need to be, but in theory if they are C headers they should be in any >

[Rd] Interfacing R and C++

2006-01-09 Thread Sean Davis
I have a single c++ file that contains a class and a "wrapper" function that has C-like syntax for interacting with the Class. Basically, this wrapper function just makes an instance of the class and then organizes the data for return to R. #include void myFunc(double *data, int *n, double *p

[Rd] Coercing from a local class to a foreign one

2005-12-22 Thread Sean Davis
I am working on writing a fairly simple package that defines several classes. However, there are several other packages that deal with the same types of data, so I would like to methods for coercing my classes to those of the other packages. Easy enough. However, I would really like to just "sug