[R] mode or parameters of readBin

2007-09-10 Thread Sigbert Klinke
Hi,

  sapply(formals(readBin), mode)
  con  what n  sizesignedendian
   namename numeric logical logicalcall

returns for the mode of size logical. But in the documentation is said 
that size should be integer. Does anyone know why the mode is logical?

Thanks in advance

Sigbert Klinke

__
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.


[R] Reading data from a string

2007-08-08 Thread Sigbert Klinke
Hi,

I'am looking for ways in R to read in data from a character string in my 
wiki. Currently I see two possibilities:

1.) write my own routine
2.) using read.table(textConnection(mydata))

Of course, I want to avoid writing my own routine and textConnection is 
a forbidden command by the R-PHP people (and I think they had good 
reasons for this). Does anybody know other possibilities?

Thanks in advance

  Sigbert Klinke

__
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.


[R] recover history after crash in RGui

2007-06-26 Thread Sigbert Klinke
Hi, is there any possibility to recover the history of executed R code 
in the RGui when it has crashed?

Thanks in advance

  Sigbert Klinke

__
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.


[R] barchart in trellis and NA

2007-06-21 Thread Sigbert Klinke
Hi,

I've a dataset with discrete data and several groups and in one group I 
have also missing values (NA). When I use table and barchart to 
visualize the counts I never get a bar for  NA in the barchart although 
it appears in the result of table. Is there a possibility to get this 
bar too?

Thanks in advance  Sigbert Klinke

__
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.


[R] Accessing plots in Trellis graphics

2007-05-31 Thread Sigbert Klinke
Hi,

I used xyplot to create conditional scatterplots.  My layout is 5x3 
plots, but my data contains only 14 subgroups. So I would like to use 
the empty plot to display additional information about the data. How can 
I access the plot?

Thanks in advance

  Sigbert

---
Here my call:

xyplot(yf~xf|id, data=data, pch=19, cex=0.5, col=black,
 panel=function(x,y, subscripts, ...) {
  ...
 },
 strip=function(..., factor.levels, fg, bg) strip.default(..., 
factor.levels=levels, style=4, strip.names=c(F,F), strip.levels=c(F,T), 
fg=bg), 
 layout=c(5,3),
)

__
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.


[R] Factor analysis

2007-05-31 Thread Sigbert Klinke
Hi,

is there any other routine for factor analysis in R then factanal? 
Basically I'am interested in another extraction method then the maximum 
likelihood method and looking for unweighted least squares.

Thanks in advance

  Sigbert Klinke

__
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.


[R] No output in sourced R program

2006-05-17 Thread Sigbert Klinke
Hi,

If I type it in the command line I get, as expected:

  1:30
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 
23 24 25
[26] 26 27 28 29 30
  q()
Save workspace image? [y/n/c]: n

If I create a program 02e451444d6a46acf551996579092c911b90aa8e.R and run 
it I get

R : Copyright 2006, The R Foundation for Statistical Computing
Version 2.3.0 (2006-04-24)
  source(02e451444d6a46acf551996579092c911b90aa8e.R)
Save workspace image? [y/n/c]: n

mars:/srv/www/htdocs/mediawiki/teachwiki/Rfiles # more 
02e451444d6a46acf551996579092c911b90aa8e.R
rfiles-/srv/www/htdocs/mediawiki/teachwiki/Rfiles
1:30
q()

No output from 1:30 to the screen. Any idea what I do wrong ?

Thanks  Sigbert

__
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] Generating a PostScript graphics under Windows

2006-03-14 Thread Sigbert Klinke
Hi,

I'am trying to generate a PS Graphic under Windows with a fixed location via

postscript(file=C:\\test.ps)

But I always become the error:

unable to start device PostScript
can not open 'postscript' file argument 'c:\test.ps'

There must be a very simple thing, that I make wrong.

Thanks in advance

   Sigbert Klinke

__
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] Generating a PostScript graphics under Windows

2006-03-14 Thread Sigbert Klinke
Peter Dalgaard wrote:
Do you have write permissions there?

(Possibly a silly question, but must be asked...)

  
No. Thanks a lot Sigbert

__
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] Matrix oriented computing

2005-08-26 Thread Sigbert Klinke
Hi,

I want to compute the quantiles of Chi^2 distributions with different 
degrees of freedom like

x-cbind(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99, 0.995)
df-rbind(1:100)
m-qchisq(x,df)

and hoped to get back  a  length(df) times length(x)  matrix with the 
quantiles. Since this does not work, I use

x-c(0.005, 0.010, 0.025, 0.05, 0.1, 0.5, 0.9, 0.95, 0.975, 0.99, 0.995)
df-c(1:100)
m-qchisq(x,df[1])
for (i in 2:length(df)) {
  m-rbind(m,qchisq(x,df[i]))
}
dim(m)-c(length(df),length(x))

Is there a way to avoid the for loop ?

Thanks Sigbert

__
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