Re: [R] Help with Dates

2007-07-23 Thread Hans-Peter
dates can be converted to year-strings with dateTimeToStr( value, "yy" ) and then subset as shown in a previous post. The (paid) pro version contains many more date functions, e.g. yearOf. Details see http://treetron.googlepages.com/xls.oledatetimeex.html. -

Re: [R] Send SMS out of R?

2007-07-15 Thread Hans-Peter
> Now I want to send an SMS out of R! Any idea how it could work? Could I send > an eMail to a mobile phone number? There are "Email to SMS" services you can use. Google gives plenty of them (also free ones (which I wouldn't use myself...)). --

Re: [R] Writing Excel (.xls) files on non-Windows OSs using Perl

2007-07-09 Thread Hans-Peter
Hi, 2007/7/8, Marc Schwartz <[EMAIL PROTECTED]>: > [snip] > There exists the xlsReadWrite package on CRAN by Hans-Peter Suter, which > is restricted to Windows, since it utilizes the non-FOSS MS Office API > to write the Excel formats. The non-FOSS API is not the

Re: [R] problem with xlsReadWrite package

2007-06-17 Thread Hans-Peter
to R-help. But I didn't get an email from you... Hope this helps and best regards, Hans-Peter __ 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 and provide commented, minimal, self-contained, reproducible code.

Re: [R] Unit Testing Frameworks: summary and brief discussion

2007-05-09 Thread Hans-Peter
signement) and catch the warning message (but suppress the warning) suppressWarnings( res1 <- encodeDateTime( yd, md, dd, hd, mind, secd, msd ) ) if (!all( res1 == ddate )) stop( "encode/decode , data not equal" ) -- Regards, Hans-Peter __ R-he

[R] [ANN:] new package xlsReadWrite*Pro*: announce + update.

2007-04-27 Thread Hans-Peter
condOfTheDay, yearsBetween, monthsBetween, weeksBetween, daysBetween, yearSpan, monthSpan, weekSpan, daySpan, hourSpan, minuteSpan, secondSpan, milliSecondSpan, incYear, incMonth, incWeek, recodeYear, recodeMonth, recodeDay, recodeHour, recodeMinute, recodeSecond, recodeMilliSecond, sameDateTime, sameDate, same

[R] Update of xlsReadWrite package

2007-04-27 Thread Hans-Peter
ooglepages.com/xlsReadWrite_TestData_1.3.3.zip - the testscript is used for our internal "unittests". It will show you many examples of how to use the package. Comments and suggestions are welcome. Hope you enjoy using xlsReadWrite! -- Regards, Hans-Peter

Re: [R] importing excel-file

2007-04-20 Thread Hans-Peter
the date time formatting of the cell is not recognized). But I'd need a test file to say for sure. -- Regards, Hans-Peter __ 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 and provide commented, minimal, self-contained, reproducible code.

Re: [R] importing excel-file

2007-04-20 Thread Hans-Peter
the meaning > of the columns, because test4[,1] is no longer the list of the > product names. > So it seems that none of the four possibilities is entirely satisfactory. Well, supreme satisfaction can definitely only be gained with the pro version... ...but the following should make you happy

Re: [R] matrix building with two variables

2007-04-19 Thread Hans-Peter
2007/4/19, Schmitt, Corinna <[EMAIL PROTECTED]>: > Thanks. > > I did read everything I could but could not understand everything. Hopefully > with more programming practice it will become more less. Here is a great book: Uwe Ligges: Programmieren mit R. worth every "Rappen" :-) _

Re: [R] importing excel-file

2007-04-19 Thread Hans-Peter
s/issues, please report them to me and they - most likely - will get fixed. -- Regards, Hans-Peter (author of xlsReadWrite) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://w

Re: [R] importing excel-file

2007-04-18 Thread Hans-Peter
?read.xls >The .xls-file is attached. binary files will be dropped from the list >In my file we > use commas for the decimal format (example: 0,712), changes might be > needed. Don't know if this is relevant. Sorry. -- Regards, Hans-Peter __

Re: [R] Updating a worksheet in Excel file using RODBC

2007-03-23 Thread Hans-Peter
ur case (it's not suited if you want to use SQL (join) statements, but for plain data reading/writing it is nice). For both versions (free/pro) updates are pending. They should be released by end of next week (but no guarantees). -- Regards, Hans-Peter

Re: [R] BETA testers for xlsReadWrite? (natively read/write Excelfiles)

2007-03-19 Thread Hans-Peter
sorry I forgot: > Download: > - zip: http://treetron.googlepages.com/BETAxlsReadWrite_1.2.1.zip Please remove the BETA prefix from the filename (otherwise it cannot be installed). Hans-Peter __ R-help@stat.math.ethz.ch mailing list

[R] BETA testers for xlsReadWrite? (natively read/write Excelfiles)

2007-03-19 Thread Hans-Peter
o try out this (very good) new version... -- Regards, Hans-Peter PS: @David: no more range_error violations. __ 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/

Re: [R] writing R extension

2006-12-20 Thread Hans-Peter
>> Use package.skeleton to make a prototype (this is VERY useful). To build the packages you can use bat (batch) files, e.g. something like: set rver=2.3.1 set rcmd="C:\Programme\R\R-%rver%\bin\Rcmd.exe" %rcmd% check %prj% %rcmd% INSTALL --docs="t

Re: [R] R_Code

2006-12-14 Thread Hans-Peter
2006/12/13, Duncan Murdoch <[EMAIL PROTECTED]>: [snipped] Good description. Thank you!! -- Regards, Hans-Peter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http:/

Re: [R] Calling R functions in Delphi

2006-12-05 Thread Hans-Peter
2006/12/5, Rainer M Krug <[EMAIL PROTECTED]>: > There was a translation of the header files from C to Delphi, so that > you could used R directly without using DCom - Hans-Peter Suter > translated / made them. Thanks for mentioning. You can download these files any time

Re: [R] delete content of directory - unlink doesn't work as expected

2006-11-28 Thread Hans-Peter
> > invisible(lapply( list.files( "DeleteThis" ), function(x) > > file.remove(paste("DeleteThis", x, sep="/" )) )) > > Oh, dear! file.path() exists for a reason, and file.remove is > vectorized. Try > file.remove(dir("DeleteThis", full.names=TRUE)) argh, very embarassing to have asked this... ;

Re: [R] delete content of directory - unlink doesn't work as expected

2006-11-28 Thread Hans-Peter
2006/11/28, Gabor Grothendieck <[EMAIL PROTECTED]>: > > file.remove(file.path("myDir", list.files("myDir"))) Great, thanks a lot. -- Regards, Hans-Peter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/m

[R] delete content of directory - unlink doesn't work as expected

2006-11-28 Thread Hans-Peter
t;DeleteThis/*" )) # do. (unlink( "DeleteThis/*.*", TRUE )) # do. (unlink( "DeleteThis/*", TRUE ))# do. unlink( "DeleteThis", TRUE ) # whole folder will be deleted According to the help placeholders are allowed so I don't see where is an

Re: [R] data in form of a date

2006-11-23 Thread Hans-Peter
d some more tests before official release. New is also that you can specify rowNames for matrices (and not only data.frame). Regards, Hans-Peter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Env: Re: query in R

2006-11-09 Thread Hans-Peter
uot;read.xls" and "write.xls" which work with data.frames and/or matrices. The package can be downloaded from cran but there is an update due soon (with explicit support for rownames and datetime handling (as ISO strings)). -- Regards, Hans-Peter *at least right now ___

Re: [R] can Rgui.exe be launched with a script as an argument?

2006-11-08 Thread Hans-Peter
--vanilla --args "sayHello.R" "rout.txt" testT.bat: set cmd=C:\Programme\R\R-2.3.1\Bin\Rterm.exe call %cmd% --vanilla < sayHello.R > rtermout.txt sayHello.R: cat( "hello chappi\n" ) q() -- Regards, Hans-Peter _

Re: [R] for importing "data"

2006-10-30 Thread Hans-Peter
le. So maybe not appropriate for a novice. On the other hand it is easy to use and no need for csv detours to get your data... > Error in file(file, "r") : unable to open connection > In addition: Warning message: > cannot open file 'lahore.txt', r

[R] xlsReadWritePro trial available

2006-10-28 Thread Hans-Peter
suggestions. -- Regards, Hans-Peter __ 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 and provide commented, minimal, self-contained, reproducible

Re: [R] Review process for new packages

2006-10-18 Thread Hans-Peter
atlabcentral/fileexchange/loadFile.do?objectId=174&objectType=file I also like the grouping in categories, see http://www.mathworks.com/matlabcentral/fileexchange/loadCategory.do But this is probably more a question of how complex the web site should be. -- Reg

Re: [R] NULL or NA for missing function arguments?

2006-10-16 Thread Hans-Peter
advice) prefer NULL from now on. In C (Pascal) code NULL is also easier to check than NA* Thanks again and best regards, Hans-Peter Suter -- * function riIsNull( _s: pSExp ): aRBoolean; cdecl; vs. function IsNaScalar( _x: pSExp ): boolean; begin result:= (riLength( _x ) = 1) and

[R] NULL or NA for missing function arguments?

2006-10-16 Thread Hans-Peter
small.mark = "", small.interval = 5, decimal.mark = ".", zero.print = NULL, ...) Is there a right way? And if both forms are used, how do I know which one is right? Thanks a lot and best regards, Hans-Peter __ R-help@stat.math.ethz.ch

[R] xlsReadWrite version 1.1.1 available

2006-10-07 Thread Hans-Peter
, testscripts improved... -> LAST BUT NOT LEAST: clarified license text by granting an explicit right to freely distribute and use this package incl. the dll. (my own source is still licensed as GPLv2 (same as before)). Removed R-copyright notices in my s

Re: [R] fractional part

2006-09-28 Thread Hans-Peter
tly not fully understand this I thought there could be a similair thing for fraction. I defined the function "frac <- function(x) abs( x - trunc(x) )" which seems to work well. Thanks again, Hans-Peter __ R-help@stat.math.ethz.ch mailing l

[R] fractional part

2006-09-28 Thread Hans-Peter
Hi all, is there a function to get the fractional part of a number? -- Regards, Hans-Peter __ 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

Re: [R] get index of elements in vector

2006-09-28 Thread Hans-Peter
2006/9/28, Cleber N. Borges <[EMAIL PROTECTED]>: > Is There a fuction that return a index of a element in vector? > like this semantic example: > vector = c( 100, 200, 300 ) > getINDEX( vector, value = 200 ) which( vector == 200 ) -- R

[R] drop

2006-09-28 Thread Hans-Peter
ok, named integer test2 <- test attributes( test2 ) <- NULL str( drop( as.matrix( test2 ) ) ) # ok Thanks and best regards, Hans-Peter PS: how could I lookup the code for subsetting a data.frame. I suppose that it is in "data.frame.[" ___

[R] xlsReadWrite 1.0

2006-09-04 Thread Hans-Peter
stdata/-scripts and more infos (contact, bugs (currently nothing), suggestions and todos). I hope you enjoy using this package (I certainly do...) and am looking forward to any feedback you might have. Best regards, Hans-Peter [[alternative HTML version deleted]] __

[R] embed image (png) in postscript (device)

2006-09-01 Thread Hans-Peter
kage to read png files (I didn't find anything), I probably could solve this. But I still don't know if it would be possible to "put" this memory representation to a ps device. Thanks for your time. -- Regards, Hans-Peter [[alternative HTML version deleted]]

Re: [R] hello Excel... (native/Package/BETA)

2006-06-20 Thread Hans-Peter
s-format and prefer the text format. It's from hearsay/newsgroup/and my impression from a R-course. On Macs I personally know people who do a PhD and have their data in Excel. So I though, they could be interested. English is not my native language. Sorry for writin

[R] hello Excel... (native/Package/BETA)

2006-06-20 Thread Hans-Peter
hope not many people will do that!). It is also possible to license the source code. Suggestions, bug reports and other comments are very welcome. If possible I try to incorporate them in the gold version. Best regards, Hans-Peter [[alternative HTML version deleted]] ___

[R] strange digit switching

2006-06-19 Thread Hans-Peter
i386 os mingw32 system i386, mingw32 status major 2 minor 3.1 year 2006 month 06 day01 svn rev38247 language R version.string Version 2.3.1 (2006-06-01) -- Regards, Hans-Pe

Re: [R] program and comment

2006-04-26 Thread Hans-Peter
nd inherits from LISP (Scheme). You need to read the manual. >Second, can anyone show me some idea > about how to write the comment. Thanks. # this is a comment -- Regards, Hans-Peter __ R-help@stat.math.ethz.ch mailing list https://stat.eth

Re: [R] No Discounts for Springer books (e.g. S Programming)?

2006-04-21 Thread Hans-Peter
mazon was quite a lot cheaper, so it became a "would have worked"... Thanks again and best regards, Hans-Peter __ 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-

[R] No Discounts for Springer books (e.g. S Programming)?

2006-04-21 Thread Hans-Peter
ley the promotion code doesn't work. I already contacted Springer but didn't get an answer. Does someone know what happened with these discounts? I didn't find anything related in the archives. Thanks and best regards, Hans-Peter -- PS: if someone has a used or redundan

Re: [R] is there a formatted output in R?

2006-03-11 Thread Hans-Peter
screen function in a file. Then just "source" it, which - with my basic C know how - should be the same as include. All sourced function will "disapear" if you clear the environment (rm( list = ls())). So it's maybe a good idea to source the global functions

Re: [R] Basic R Problem

2006-02-17 Thread Hans-Peter
his helps, but I think these are the steps that you should/could do for yourself before asking on the maillist. Of course it's not always as simple to get the right answers out of the archiv. -- Regards, Hans-Peter __ R-help@stat.math.ethz.ch mailing l

Re: [R] matlab-like constant matrix initialization?

2006-01-30 Thread Hans-Peter
-project.org/doc/bib/R-publications.html). Maybe the "John Verzani. Using R for Introductory Statistics" or "Uwe Ligges. Programmieren mit R" could help you. Best regards, Hans-Peter __ R-help@stat.math.ethz.ch mailing list https://stat.

Re: [R] Comments please, how to set your mailer to read R-help in digest format

2005-12-13 Thread Hans-Peter
nt but since Google offers > 1 GB space, who cares]. Best regards, Hans-Peter [[alternative HTML version deleted]] __ 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

Re: [R] www.krankenversicherung.ch News - Krankenkassen - Information Newsletter

2005-11-15 Thread Hans-Peter
Am 14.11.05 schrieb [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > [snip some spam] Being located only some blocks away from these spammers, I just asked them in person to remove the R list from their database. Regards, Hans-Peter

Re: [R] aggregate slow with many rows - alternative?

2005-10-14 Thread Hans-Peter
cess the list and > create a matrix [snip] Wow! That's a wonderful suggestion, Your code works just fine with my data (takes 11 seconds). Thanks a lot, I couldn't have written such code (reading some help entries now...). Hans-Peter __ R

[R] aggregate slow with many rows - alternative?

2005-10-13 Thread Hans-Peter
Hi, I use the code below to aggregate / cnt my test data. It works fine, but the problem is with my real data (33'000 rows) where the function is really slow (nothing happened in half an hour). Does anybody know of other functions that I could use? Thanks, Hans-Peter -

[R] Kind of 2 dim histogram - levelplot

2005-07-05 Thread Hans-Peter
bIdx <- intersect( xIdx, yIdx ) g[idx,3] <- length( bIdx ) g[idx,4] <- sum( val[bIdx] )/g[idx,3] g[idx,5] <- sum(val[bIdx]>0)/length(bIdx)*100 idx <- idx + 1 } } # show data and plot g levelplot(cnt ~ x*y, g, main = "Count", region = TRUE) Best r

Re: [R] Possible bug in file.choose() - how to tell?

2005-06-15 Thread Hans-Peter
formation it > asks for. If you want to allege a bug, so read carefully the section on > BUGS in the FAQ. Ok. - For the next time: could I have found out myself, that this was solved? (I did search the mail archiv and the r-project website; and also had a look at the NE

[R] Possible bug in file.choose() - how to tell?

2005-06-15 Thread Hans-Peter
s the prompt gives me: > file.choose function (new = FALSE) .Internal(file.choose(new)) I suppose I had to download the source code of the base package and it would be C code. Is this right? -- Best regards, Hans-Peter _

Re: [R] dir() and RegEx and gsub()

2005-06-10 Thread Hans-Peter
d be different from all the other strings in R which doesn't seem to be a good idea either > I've always just processed the strings in vim or similar, rather than fight with R. I do it in DOS-Batch files. Quite ugly but it works... Regards, Hans-Peter __ 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] dir() and RegEx and gsub()

2005-06-09 Thread Hans-Peter
es.r" in either: myfile [1] "D:\\UebungenNDK\\DataMining\\DataMiningSeries.r" or: myfile [1] "D:/UebungenNDK/DataMining/DataMiningSeries.r" Would be great to hear about a possibility! A nice evening to everybody, Hans-Peter __ R

Re: [R] plots from batchfile on windows

2005-06-03 Thread Hans-Peter
1:10; y <- sample( 10 ) win.graph(width = 7, height = 7, pointsize = 12) plot( x, y ) savePlot( filename = "test", type = "png" ) Great, thanks a lot for the tipp! Hans-Peter -- Regards, Hans-Peter __ R-help@stat.math.e

[R] plots from batchfile on windows

2005-06-03 Thread Hans-Peter
ive to pass a command argument. It would be nice, to get some hints, how this could be done. I did search the newsgroup archive, but unfortunately didn't find something. Thanks and best regards, Hans-Peter __ R-help@stat.math.ethz.ch mailing list