Re: [R] France Model

2012-05-05 Thread Sven Garbade
Given your starting values, there is nothing to optimize: > f <- function(x, A=10, b=152, T=100, c=100) A*(1-exp(-b*(x-T) - c*(sqrt(x) - sqrt(T > f(time) [1] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf [16] -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf

[R] RMySQL and german umlaute

2012-03-30 Thread Sven Garbade
Hi list, I have some trouble to setup RMySQL correctly to work with german umlaute: > library(RMySQL) Loading required package: DBI > pg <- dbDriver("MySQL") > con <- dbConnect(pg, username="dummy", host="localhost", password="", dbname="ga1prosp") > dbGetQuery(con, statement="SELECT * FROM Körp

Re: [R] Sweave: \Sexpr and variables with special chars

2010-11-17 Thread Sven Garbade
try to quote the special LaTeX symbols, eg ## add more here if needed sani <- function(x) gsub("_", "_", x) so your example: \documentclass[a4paper]{article} <>= #mytitlevar <- "Stuff" # case 1, everything is find mytitlevar <- "Stuff_first" # case 2, f is turned into sub-text sani <- functi

[R] Path to nodes in ctree package party

2010-11-15 Thread Sven Garbade
Hallo list, I'm wondering if there is a way to extract the path to terminal nodes in a BinaryTree object, e.g. ctree, like the function path.rpart in package rpart. Thanks, Sven __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] randomForest can not handle categorical predictors with more than 32 categories

2010-11-11 Thread Sven Garbade
You can try ctree in package party, but anyway: what is the deeper sense in a binary split for a variable with more than 32 levels? Regards, Sven 2010/11/10 Erik Iverson : > Well, the error message seems relatively straightforward. > > When you run str(x) (you did not provide the data) > > you sh

Re: [R] Calling R from MS SQL Server

2010-11-10 Thread Sven Garbade
Maybe you want somelthing like a PL with R, eg. PL/R http://www.joeconway.com/plr/? Can you migrate to PostgreSQL? Regards, Sven 2010/11/10 James Evans : > We would like to call R functions from within MS SQL Server queries. Any > advice on this would be appreciated. > > Thanks! > > _

[R] Extract node names from BinaryTree in package party

2010-11-01 Thread Sven Garbade
Hi there, I need to extract the variable names from all nodes (except the terminal nodes) from a ctree object, e.g. library(party) mammoct <- ctree(ME ~ ., data = mammoexp) plot(mammoct) how can I extract the varnames from node 1 (SYMPT) and node 3 (PB) from the fitted object "mammoct"? Many

Re: [R] Sweave and uttf-8 under Windows XP

2010-05-20 Thread Sven Garbade
Great, thanks, Sveb 2010/5/20 Duncan Murdoch : > Sven Garbade wrote: >> >> Hi list, >> >> I need to process a Rnw file and and a csv file (both are encoded in >> UTF-8) under Windows XP  (R Version 2.11.0, i386, mingw32). >> > > Take a look at this po

[R] Sweave and uttf-8 under Windows XP

2010-05-20 Thread Sven Garbade
Hi list, I need to process a Rnw file and and a csv file (both are encoded in UTF-8) under Windows XP (R Version 2.11.0, i386, mingw32). I can source and run the Rnw file: > Stangle("Bericht.Rnw") Writing to file Bericht.R > source(file("Bericht.R", encoding="UTF-8")) which runs fine, but runn

[R] computation of dispersion parameter in quasi-poisson glm

2010-04-09 Thread Sven Garbade
Hi list, can anybody point me to the trick how glm is computing the dispersion parameter in quasi-poisson regression, eg. glm(...,family="quasipoisson")? Thanks ®ards, Sven __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] Error: Bad value

2008-01-11 Thread Sven Garbade
Sorry for sending my email twice, first I used "[EMAIL PROTECTED]" and thought this was wrong. R version is 2.6.1 (2007-11-26). Thanks, Sven On Fri, 2008-01-11 at 10:16 +0100, Martin Maechler wrote: > >>>>> "SG" == Sven Garbade <[EMAIL PROTECTED]> &g

[R] Error: Bad value

2008-01-11 Thread Sven Garbade
Hi list, from time to time I got an "Error: bad value" and must restart R. The mail archives suggests memory corruption, but I do not run "special" C code, only base R calls. I use R release 2.6.22 on a Debian GNU/Linux (version "testing") on a i686 machine with 2 GB RAM, kernel version 2.6.22.

[R] Error: Bad value

2008-01-10 Thread Sven Garbade
Hi list, from time to time I got an "Error: bad value" and must restart R. The mail archives suggests memory corruption, but I do not run "special" C code, only base R calls. I use R release 2.6.22 on a Debian GNU/Linux (version "testing") on a i686 machine with 2 GB RAM. R was installed with d

Re: [R] library(tcltk) fails

2007-11-06 Thread Sven Garbade
On Tue, 2007-11-06 at 08:03 -0600, Dirk Eddelbuettel wrote: > On Tue, Nov 06, 2007 at 01:08:40PM +0100, Sven Garbade wrote: > > Dear list, > > > > I cannot load the tcltk library: > > > > > library(tcltk) > > Loading Tcl/Tk interface ... Error in fun(.

[R] library(tcltk) fails

2007-11-06 Thread Sven Garbade
Dear list, I cannot load the tcltk library: > library(tcltk) Loading Tcl/Tk interface ... Error in fun(...) : Can't find a usable tk.tcl in the following directories: /usr/share/tcltk/tcl8.4/tk8.4 ./lib/tk8.4 /usr/local/lib/tcltk/tk8.4 /usr/local/share/tcltk/tk8.4 /usr/lib/tcltk/tk8.4 /u