Re: [R] Is there a function for this?

2007-01-03 Thread Andreas Hary
Try the following: act - c('good','good','bad','bad','good','good','bad','bad') pred - c('good','bad','bad','bad','good','good','good','bad') table(pred,act) table(pred,act)/apply(table(pred,act),1,sum) Cheers, Andreas On 1/3/07, Feng Qiu [EMAIL PROTECTED] wrote: Hi everybody, I'm trying to

Re: [R] Exponentiate a matrix

2006-09-21 Thread Andreas Hary
There is also mexp in the Matrix package and MatrixExp in the msm package. Andreas - Original Message - From: Dimitrios Rizopoulos [EMAIL PROTECTED] To: Duncan Murdoch [EMAIL PROTECTED] Cc: Doran, Harold [EMAIL PROTECTED]; r-help@stat.math.ethz.ch Sent: Thursday, September 21, 2006

Re: [R] MS-Access and R

2006-06-11 Thread Andreas Hary
Have a look at odbcConnectAccess in the RODBC package. Cheers, Andreas - Original Message - From: Carsten Steinhoff [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Sunday, June 11, 2006 11:24 AM Subject: [R] MS-Access and R Hello, is there a possibility to connect MS-Access

Re: [R] SciViews-R_0.8-9 Console problem

2005-12-01 Thread Andreas Hary
Hi, [...] the command/script window does not appear. [...] Have you tried Misc = Toolbars = Command on the menu? Don't click until you get to Command, otherwise the menu closes again for some reason. Regards, Andreas - Original Message - From: Henrik Parn [EMAIL PROTECTED]

Re: [R] solving a complicated equation

2005-11-07 Thread Andreas Hary
Try something like this: g - function(x) return(p-a*exp(-x^2/2)+b*pnorm(x,0,1,lower.tail=F)) p - -0.5 a - 1 b - 1 uniroot(g,c(-100,10)) $root [1] -1.336607 $f.root [1] 4.738e-06 $iter [1] 11 $estim.prec [1] 6.103516e-05 Regards, Andreas - Original Message - From:

Re: [R] How can I test temporal autocorrelation of binary data?

2005-11-04 Thread Andreas Hary
Since the data is dichotomous already, the nonparametric 'runs test' might be appropriate, though I am ignorant as to its properties (power in particular). help(runs.test,package=tseries) Regards, Andreas - Original Message - From: Patrick Burns [EMAIL PROTECTED] To: [EMAIL

Re: [R] Cross-correlation function

2005-10-20 Thread Andreas Hary
I have reproduced your error using the following goo1 - rnorm(100,0,1) goo2 - rnorm(100,0,1) goo - cbind(goo1,goo2) goo[2,1] - NA ccf(ts(goo[,1]),ts(goo[,2]),na.action='na.exclude',type='cor') Error in colnames-(`*tmp*`, value = c(ts(goo[, 1]), ts(goo[, 2]) : attempt to set colnames on

Re: [R] RODBC and sqlColumns

2005-08-17 Thread Andreas Hary
Try append = F, that works for me. A - Original Message - From: Ben Stabler [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Wednesday, August 17, 2005 3:52 PM Subject: Re: [R] RODBC and sqlColumns Ok, I understand that. Then, how do I get the columns for a table that is

Re: [R] Reading large files in R

2005-08-09 Thread Andreas Hary
You can also use the RODBC package to hold the data in a database, say MySQL and only import it when you do the modelling, e.g. library(RODBC) library(sspir) con - odbcConnect(MySQL Test) data(vandrivers) sqlSave(con,dat=vandrivers,append=FALSE) rm(vandrivers) gc() van.call -

Re: [R] Reading large files in R

2005-08-09 Thread Andreas Hary
: Andreas Hary [EMAIL PROTECTED] To: Berton Gunter [EMAIL PROTECTED]; [EMAIL PROTECTED]; 'Jean-Pierre Gattuso' [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Monday, August 08, 2005 10:49 PM Subject: Re: [R] Reading large files in R You can also use the RODBC package to hold the data