Re: [R] Adding more files to list

2012-04-25 Thread Sebastian Gibb
Hi Brian, On Wednesday 25 April 2012 13:15:03 Brian Flatley wrote: > I have a main directory - "Spectra" > > In this folder I have two subfolders "Normal" and "Case" The following should be enough: library("readBrukerFlexData") Spectra <- mqReadBrukerFlex("Spectra/"); > ... > The following co

Re: [R] submit R package

2011-05-17 Thread Sebastian Gibb
Hello Yan, please use an empty password and write an e-mail to c...@r-project.org afterwards. Bye, Sebastian > Dear all, > > I'm just wondering how to submit a package to cran? > I followed the instruction, using anonymous as username and my email > address as password, but it didn't connect.

Re: [R] gsub() issue...

2011-05-17 Thread Sebastian Gibb
Hello Thibault Charles, > I have the following text : > text <- ‘’ INFILTRATION INF_BASE > > AIRCHANGE=1 ‘’ becomes: text <- "INFILTRATION INF_BASE\nAIRCHANGE=1" > original <- "INFILTRATION INF_BASE \n AIRCHANGE=1" There are spaces around "\n". That's why text != original Try original <- "INFI

Re: [R] How to search the name of dataset on database

2010-11-27 Thread Sebastian Gibb
Am Samstag, 27. November 2010, 15:59:46 schrieb Stephen Liu: > Hi folks, > > I can't figure out using help.search to find the name of the dataset on > database. If it is NOT the right tool please advise which tool shall I > use? TIA > > B.R. > Stephen L > > > > [[alternative HTML versio

Re: [R] Extending a plot in a loop

2010-11-10 Thread Sebastian Gibb
Am Mittwoch, 10. November 2010, 19:22:38 schrieb Nasrin Pak: > My problem is that I have a data set for every day of measurement in a > seperate file and I want to plot one parameter of the data for all the days > in one graph. I tried to use for loop but only the last data remains in the > program

Re: [R] own TAB expansion

2010-10-09 Thread Sebastian Gibb
Am Samstag, 9. Oktober 2010, 08:39:36 schrieb Deepayan Sarkar: > On Fri, Oct 8, 2010 at 6:19 AM, Sebastian Gibb wrote: > > Hello Duncan, > > > > thank for your advice, but it doesn't work like expected: > > > > setClass(Class="A", represen

Re: [R] own TAB expansion

2010-10-08 Thread Sebastian Gibb
Hello Duncan, thank for your advice, but it doesn't work like expected: setClass(Class="A", representation=representation(slotA="numeric", slotB="numeric")); setMethod("$", "A", function(x, name) {return(slot(x, name));}) setGeneric(".DollarNames") setMethod(".DollarNames", signature(x="A"), fun

[R] own TAB expansion

2010-10-08 Thread Sebastian Gibb
Hello, how can I add expansion on R command line for own S4 classes? setClass(Class="A", representation=representation(slotA="numeric", slotB="numeric")); setMethod("$", "A", function(x, name) {return(slot(x, name));}) a <- new("A", slotA=1, slotB=2) a$ > a$ should become: a$ > a$slotA a$s

Re: [R] get absolute file path

2010-09-26 Thread Sebastian Gibb
Am Sonntag, 26. September 2010, 10:08:39 schrieb Romain Francois: > Le 26/09/10 10:00, Sebastian Gibb a écrit : > > Hello, > > > > I get a value which stores a relative file name. (I get it from another > > function, which I don't want to change.) > > e.g.

[R] get absolute file path

2010-09-26 Thread Sebastian Gibb
Hello, I get a value which stores a relative file name. (I get it from another function, which I don't want to change.) e.g. > fileName <- "../data/2010-08.csv"; Is it possible to get the absolute file path out of this value? (e.g. /home/sebastian/documents/data/2010-08.csv) Kind regards, Seba

Re: [R] Pesky homemade function code

2010-09-16 Thread Sebastian Gibb
Hello, why you don't use the last 3 arguments? >semivario=function(data,ids,times,resids){ > id=unique(data$ids) ... It seems "data" be a list. In that case the last 3 arguments are useless. Could you please send us a runable code example. That means some example data and your all neede functions

Re: [R] apply over parallel lists and their elements

2010-09-12 Thread Sebastian Gibb
Hello, thanks for your answer. mapply fits to my needs. But I don't know how many items would "tree" have. I can't write them all by hand. How can I generate the arguments for mapply? mapply(mean, tree[[1]]$node$values, tree[[2]]$node$values, ... tree[[k]]$node$values); Kind regards, Sebastia

[R] apply over parallel lists and their elements

2010-09-11 Thread Sebastian Gibb
Hello, I have a list like the following: tree<-list(); tree[[1]]$node<-list(); tree[[2]]$node<-list(); tree[[1]]$node$values <- 1:10 tree[[2]]$node$values <- 1:10 After building the list I have to generate the mean of all "values" elements with equal indices. Until now I use something like that

Re: [R] sort file names in numerical order

2010-07-17 Thread Sebastian Gibb
thanks a lot, it works. you wrote: > library(gtools) > ?mixedorder > > --- On Sat, 7/17/10, Sebastian Gibb wrote: > > From: Sebastian Gibb > > Subject: [R] sort file names in numerical order > > To: r-help@r-project.org > > Received: Saturday, July 17, 201

[R] sort file names in numerical order

2010-07-17 Thread Sebastian Gibb
Hello, I get some file names by list.files(). These names are in alphabetical order. I want to change it to logical numeric order. Example: > fileNames <- c("A10", "A1", "A2", "B1", "B2", "B10") > sort(fileNames) [1] "A1" "A10" "A2" "B1" "B10" "B2" I want to have: "A1" "A2" "A10" "B1" "B2" "B1

Re: [R] floating point in single precision

2010-06-27 Thread Sebastian Gibb
Am Sonntag, 27. Juni 2010, 08:39:10 schrieb Prof Brian Ripley: > On Sun, 27 Jun 2010, Sebastian Gibb wrote: > > Hello, > > > > is there a possibilty in R to convert numbers (double precision, 64bit) > > into single precision ones (32bit). > > I need that for c

[R] floating point in single precision

2010-06-26 Thread Sebastian Gibb
Hello, is there a possibilty in R to convert numbers (double precision, 64bit) into single precision ones (32bit). I need that for compatibility reasons. Until now I call a C application which casts a double to a float. float precision32(double value) { return (float)value; } But I want to u

[R] convert 32bit numbers to 64bit (or float to double)

2010-05-05 Thread Sebastian Gibb
Hello, a long time ago I had to use a foreign C++ application to generate some numbers. This application saves the numbers as 32bit (float) values in a file. I had to use an open source application to read the files. It imports the values as 64bit (double) and generates some pseudo numbers at po