Re: [R] averaging within columns

2005-02-26 Thread Marc Mamin
Hello Thomas, The function aggregate will do the job. Marc Mamin __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] character occurence within a string

2005-02-21 Thread Marc Mamin
= a|b|c|| a |a|b|c|d I guess that scan makes use of an internal function that would do the job... Thanks, Marc Mamin __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] sorting without order

2004-11-23 Thread Marc Mamin
)) = grouped: c(10,10,10,1,1,100) ix: c(1,3,6,2,5,4) is there a way to achieve this which would be faster than the standard sort function? Thanks for any hints, Marc Mamin __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman

RE: [R] Tools for data preparation?

2004-11-19 Thread Marc Mamin
setwd(wd) system(paste('for n in ',index,'; \n', 'do sudo gzip -dc ',afile,' | cut -f$n -d| ',tmpdir,'/',afile,'.$n \n', 'done;',sep='')) return(1) } exampe: cutfile(c(1,5,8),'mylog',outputdir,sourcedir) = files mylog,1, mylog.5, mylog.8 HTH, Marc Mamin

[R] regexp,grep: capturing more than one substring

2004-10-27 Thread Marc Mamin
this function very often with large data, I'm reluctant to use Sjava for performance reasons. Is this a wrong assumption that using Java directly would be slower or use more memory than to have a native R function? Does someone already has a solution for this :) Thanks, Marc Mamin

Re: [R] Vector and String

2004-10-22 Thread Marc Mamin
Hello, I'm looking for a procedure to detect trend changes or significant signals in time series as in the attached example. Could you point me to a library or reference I can start with? Thanks, Marc Mamin__ [EMAIL PROTECTED] mailing list

[R] does R provides a wait or pause function?

2004-10-20 Thread Marc Mamin
Hello, I'd like to insert a wait function in my code. The reason is that I output timestamped files and I want to ensure that at least 1 second separes 2 files to avoid overwriting the previous file. Thanks, Marc Mamin __ [EMAIL PROTECTED

Re: [R] How to draw x-axis time label.

2004-10-18 Thread Marc Mamin
Hello Ivy, Your scale shows times in seconds since 1970 (I guess it is 1970) usually, I don't draw the axis with plot (see xaxt=n), but call axis aftewards, giving the ticks positions and the labels as strings, using format. With your example: format(Time,'%d %b %Y') [1] 05 Aug 2004 13 Aug

[R] reading partial file content

2004-10-08 Thread Marc Mamin
hi, I'd like to extract data from very large files (ca 1-2 Mio lines), and I already know which lines of these files I need. Is there a way to do it without filling the memory with the whole file content? The lines I need are randomly distributed within the files. Thanks, Marc

[R] multiple match question

2004-09-29 Thread Marc Mamin
Hello, I'm looking for a fast way to retrieve the position of elements from a vector which match element in another vector. Example va-c('a','e') vb-c('a','b','c','d','e','f','e') f(va,vb) should return c(1,5,7) I have 2 different cases: I) my vector vb contains only distinct values II)

RE: [R] Problem with the grep function

2004-07-09 Thread Marc Mamin
Hi, you can use regular expression with grep. For example: exactmatch-function(s,l){return(grep(paste('^',s,'$',sep=''),l))} t-c('a','ab','abc','c','ca','ab') exactmatch('ab',t) [1] 2 6 HTH Marc -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Petr

[R] Computting statistics on a matrix with 2 factor column

2004-06-08 Thread Marc Mamin
Hello, I suppose this is a basic question but couldn't find a solution.: I have a large matrix with let say 3 columns: V1 V2 V3 a x 2 a x 4 a y 8 b z 16 and I want to compute some statistics based on the levels resulting form the

[R] catching the warnings

2004-06-03 Thread Marc Mamin
Hello, I'd like to catch the warnings in a variable in order to evaluate them, but... tt-warnings() Warning messages: 1: XML Parsing Error: test.xml:2: xmlParseStartTag: invalid element name 2: XML Parsing Error: test.xml:3: Extra content at the end of the document tt NULL is there a way to

[R] Problem (Bug?) with readLines on Suze

2004-05-07 Thread Marc Mamin
Hello, I called readLines on Suze 9.0 with a directory as parameter instead of a file. R freezed for a very long time; this morning I could read following error message: Error in readLines(paste(/home/,foo,/,sep=)) : cannot allocate buffer in readLines under W2K I get a more logical error

RE: [R] help with histogram

2004-05-07 Thread Marc Mamin
Hi, you can use subset of data and superpose different histograms for each of them. hth, Marc __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] plot with dates on x axis, how to fix the number of days betwenn tick marks ?

2003-10-17 Thread Marc Mamin
(subset(myd, TYPE==A)$list1)/100+1)), xlim=c(106350, Sys.time()), xaxp=c(106350, Sys.time(),7*24*3600), type=o, col=blue,ylab=) Thanks for your hints. Marc Mamin __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman

[R] lattice, trellis.device, dev.off() within a condition (seems t o be a bug)

2003-09-18 Thread Marc Mamin
= filename_a,... xyplot(... } if(condition a){ dev.off() } Is there a way to get a list of all open devices in order to close them outsid the condition blocks ?? Thanks for your help, Marc Mamin __ [EMAIL PROTECTED

RE: [R] ODBC Oracle access

2003-08-26 Thread Marc Mamin
attention to only use uppercase names, and I guess that believeNRows is superfluous with the latest Oracle ODBC Client(s) if it is well configured. HTH, Marc Mamin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 1:57 AM To: [EMAIL PROTECTED

[R] R as ftp client ?

2003-08-04 Thread Marc Mamin
Hallo, I want to open an ftp connection (with login and pwd), and then to retrieve the file list and the files'content of a given directory. Is this possible with R (on W2K)? Thanks for your hints, Marc Mamin __ [EMAIL PROTECTED] mailing list https

[R] http://www.omegahat.org/RSXML

2003-07-28 Thread Marc Mamin
Hi, As the server www.omegahat.org seems to be down since quite a while, could someone send me the RSXML library for Windows2000 ? Many thanks, Marc Mamin __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

RE: [R] http://www.omegahat.org/RSXML

2003-07-28 Thread Marc Mamin
Thank you for your information (R is very new for me...) I've got the package installed by now. Marc Mamin -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 3:23 PM To: Marc Mamin Cc: [EMAIL PROTECTED] Subject: Re: [R] http

[R] RODBC.sqlSave and Date format on Oracle

2003-07-25 Thread Marc Mamin
Hi, I try to use sqlSave to fill a date column in Oracle. value example: '05-JUL-03 13:35:09' sqlSave does not throw any error, but my table remain empty does anyone have experience with this ? Thanks, Marc Mamin __ [EMAIL PROTECTED] mailing

RE: [R] line colors in lattice.xyplot with png device.

2003-07-18 Thread Marc Mamin
)), text = list(lab=c(total hits, hits per day)), columns = 2), dev.off() Thanks to Andy Liaw and Federico C.F. Calboli Marc Mamin __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] line colors in lattice.xyplot with png device.

2003-07-17 Thread Marc Mamin
on WIN2K) and last but not least, is there a way to use 2 different y axis, i.e. curve 1 2 = left axis, curve 3 = right axis ? Sample codes would be welcome as I'm not yet used with the R syntax Thanks, Marc Mamin __ [EMAIL PROTECTED] mailing list