Re: [R] Creating Movies with R

2006-09-22 Thread TEMPL Matthias
There is also a write.gif function in package caTools. See the example there. Best, Matthias Dear All, I'd like to know if it is possible to create animations with R. To be specific, I attach a code I am using for my research to plot some analytical results in 3D using the lattice

Re: [R] questioin about cluster in R

2006-04-19 Thread TEMPL Matthias
Hello, -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:r-help- [EMAIL PROTECTED] Im Auftrag von Jane Ren Gesendet: Dienstag, 18. April 2006 21:33 An: R-help@stat.math.ethz.ch Betreff: [R] questioin about cluster in R Hi,All.Sorry for the group mail. I recently met a

Re: [R] get the parameter estimates from lm model

2006-04-18 Thread TEMPL Matthias
Do you have a look at names(fitData) fitData$coef Best, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:r-help- [EMAIL PROTECTED] Im Auftrag von Luis Ridao Cruz Gesendet: Dienstag, 18. April 2006 10:23 An: r-help@stat.math.ethz.ch Betreff: [R] get the parameter

[R] Lattice, panel.grid and groups

2006-04-12 Thread TEMPL Matthias
Hello, Given the following plot, which shows following data: a - c(8.976000, 8.976000, 8.856000, 8.856000, 8.756000, 8.756000, 8.771000, 8.751000, 8.856000, 8.856000, 16.812000, 16.80, 8.845000, 9.032000, 8.706000, 9.636000, 9.032000, 16.802000, 8.726000, 8.779000, 8.779000, 8.856000,

Re: [R] Lattice, panel.grid and groups

2006-04-12 Thread TEMPL Matthias
Yes, now it works perfect. Sorry, I was really blind for a couple of hours. Thank you! Matthias On 4/12/06, TEMPL Matthias [EMAIL PROTECTED] wrote: Hello, Given the following plot, which shows following data: a - c(8.976000, 8.976000, 8.856000, 8.856000, 8.756000, 8.756000, 8.771000

Re: [R] hist-data without plot

2006-03-20 Thread TEMPL Matthias
Look at: ?hist z = hist(data, plot=FALSE) Best, Matthias hello, i need the data from hist() but i do not want the plot. e.g. z=hist(data)$counts #returns absolute frequency but when i execute this command the plot occurs also. is it possible to suppress the plot? many thanks,

Re: [R] plot and validation in clustering

2006-03-20 Thread TEMPL Matthias
Hi there, I use function kmeans and clara to cluster one flow cytometry dataset. By using function plot, the clusters got from clara can be graphed, while kmeans not. How can I get the plot of the clusters of kmeans? library(cluster) data(xclara) a1 - clara(xclara, 3) a2 -

Re: [R] GAM using R tutorials?

2006-03-15 Thread TEMPL Matthias
Have you looked at: An Introduction to R: Software for StatisticalModelling Computing by Petra Kuhnert and Bill Venables which is available at http://cran.r-project.org/other-docs.html Hope this helps. Best, Matthias Hi all, I am trying to use GAM to work on some data... Are there any

Re: [R] how to use the result of hclust?

2006-03-15 Thread TEMPL Matthias
?cutree Hi all, Does hclust provide concrete clustered results? I could not see how to use it to make 6 clusters... and it does not give the 6 cluster labels... How to use the result of hclust? thanks a lot, Michael. [[alternative HTML version deleted]]

Re: [R] substituting values

2006-03-09 Thread TEMPL Matthias
One way: A - matrix(round(rnorm(20)), ncol=4) A[2,1] - x A[which(A == x, arr.ind=TRUE)] - NA A - matrix(as.numeric(A), ncol=dim(A)[2]) Best, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Stefan Semmeling Gesendet: Donnerstag,

Re: [R] How to do it without for loops?

2006-02-28 Thread TEMPL Matthias
Hello, One solution is: lapply(1:nrow(x), function(i){ t(x[i,,drop=FALSE]) %*% x[i,,drop=FALSE] }) Best, Matthias This is the code: x-matrix(rnorm(20),5) y-list() for (i in seq(nrow(x))) y[[i]]-t(x[i,,drop=F])%*%x[i,,drop=F] y[[1]]+y[[2]]+y[[3]]+y[[4]]+y[[5]] How can I do it

Re: [R] Cluster Analysis - Number of Clusters

2006-02-06 Thread TEMPL Matthias
Dear John, You can play around with cluster.stats function in library fpc, e.g. you can try: library(fpc) library(cluster) data(xclara) dM - dist(xclara) cl - vector() for(i in 2:7){ cl[i] - cluster.stats(d=dM, clustering=clara(d,i)$cluster, silhouette=FALSE)$wb.ratio } plot(1:6,cl[2:7],

Re: [R] Help with R: functions

2006-01-30 Thread TEMPL Matthias
What is wrong with your first solution: st -function(x,y){ ## y ... Response ## x ... terms rcc-coef(lm(y ~ x)) plot(x,y) abline(rcc[1],rcc[2]) } st(dats$visual24,dats$visual52) Or use attach: st -function(data,x,y){ attach(data) rcc-coef(lm(x~y)) plot(x,y)

Re: [R] dataframes with only one variable

2006-01-12 Thread TEMPL Matthias
Subsetting from a dataframe with only one variable returns a vector, not a dataframe. This seems somewhat inconsistent. Wouldn't it be better if subsetting would respect the structure completely? v1-1:4 v2-4:1 df1-data.frame(v1) df2-data.frame(v1,v2) sel1-c(TRUE,TRUE,TRUE,TRUE)

Re: [R] A comment about R:

2006-01-04 Thread TEMPL Matthias
Hello, One additional example how easy are simple calculations in R. Calculate the mean of data htinches, multiply it with 2.54 and round the result: In R: round( 2.54 * mean( htinches ) ) In SAS could this be done in 2 data steps and 2 proc steps: DATA new; SET old; htcm = htinches * 2.54;

Re: [R] Help with data.frame and lapply

2005-12-16 Thread TEMPL Matthias
Hello: I'm having problems with this line of code: X.lm - lapply(names(d), function(x) lm(d[cls] ~ d[x], data=d)) d[x] is what is giving trouble here, but I don't know exactly how to solve it. How does d look like? Probably d[,cls] and d[,x] instead of d[cls] and d[x]

Re: [R] tool for cluster analysis

2005-12-14 Thread TEMPL Matthias
I have Windows XP Professional Version 2002 and the R-Version 2.1.1. I did cluster analysis with the cluster package and the agnes (method = ward). The results are satisfactory. But the dendrogram of agnes is confused to work with the results. Is there a tool, I can get a clear

Re: [R] loop problem

2005-12-05 Thread TEMPL Matthias
Hello Frank Hi, Here is my problem. Say I have two matrices, Matrix A: a b c 4 5 2 3 2 1 4 5 6 Matrix B: d e f g h 3 4 5 2 1 2 3 7 8 6 8 5 1 3 4 Please produce a reproducable example, like A - matrix(rnorm(9),ncol=3) B - matrix(rnorm(15), ncol=5) Here is just the loop for

Re: [R] combine two columns

2005-11-29 Thread TEMPL Matthias
Hello, Following should work. m - matrix(round(runif(16,0,2)),nrow=2) colnames(m) - c(A,A,B,B,C,C,D,D) m2 - m #matrix(, nrow=dim(m)[1], ncol=dim(m)[2]/2) z - 1 ss - seq(1,dim(m)[2],2) for(j in ss){ for(i in 1:dim(m)[1]){ m2[i,j] - substring(m[i,ss[z]] == m[i,ss[z]+1],1,1) } z - z + 1

Re: [R] Building S4-classes, documents

2005-11-18 Thread TEMPL Matthias
Hi Seth, Thank you very much! (and thanks to Matthias Kohl and Sean Davis) My first problems in building a minimal S4-class package are solved with the help of your hints. Especially making R CMD INSTALL before trying R CMD check was a very good idea! Matthias Hi Matthias, On 17 Nov 2005,

[R] Building S4-classes, documents

2005-11-17 Thread TEMPL Matthias
Hello, I have some troubles when building S4-class packages. All my (S4-)code works well (without building a package). When building a package, in the R prompt after checking S3 generic/method consistency Following error occurs: Fehler: Kann R Kode in Packet 'AddNoise' nicht laden (~Error: Can

Re: [R] changing figure size in Sweave

2005-11-17 Thread TEMPL Matthias
The Sweave User Manual says (p. 12): Attention: One thing that gets easily confused are the width/height parameters of the R graphics devices and the corresponding arguments to the LATEX \includegraphics command. The Sweave options width and height are passed to the R graphics devices, and hence

Re: [R] changing figure size in Sweave

2005-11-17 Thread TEMPL Matthias
} in use that I could modify? best wishes Robin On 17 Nov 2005, at 13:36, TEMPL Matthias wrote: The Sweave User Manual says (p. 12): Attention: One thing that gets easily confused are the width/height parameters of the R graphics devices and the corresponding arguments

Re: [R] Difficulties with for() {while(){}}

2005-11-16 Thread TEMPL Matthias
Is this possible: function(){ initialize - function( ){ initialize } for(i in test){ ... if( j = test2 ) {i - 1; initialize()} ... } Best, Matthias Hi, I have the follow function: function() { ## Init of function ... for(i in test) { ... while(j =

Re: [R] R graphics help

2005-11-04 Thread TEMPL Matthias
Probably you can get some ideas from the balloonplot function in package gplots. Best, Matthias Halo friends, I have a problem to solve in R graphics.. I have a matrix like A= 2 3 4 5 6 7 8 9 4 and I like to generate the same matrix in terms of shaded circles

Re: [R] a max value for each column

2005-10-17 Thread TEMPL Matthias
apply(points, 2, max) Should do the job. For details look at ?apply Best, Matthias Dear R-list I have a dataset like below (points), how can I produce a max value for each column. I need a result like (I hope my eye correct): [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]

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

2005-10-14 Thread TEMPL Matthias
Hi, Yesterday, I have analysed data with 16 rows and 10 columns. Aggregation would be impossible with a data frame format, but when converting it to a matrix with *numeric* entries (check, if the variables are of class numeric!) the computation needs only 7 seconds on a Pentium III. I´m

Re: [R] Creating an array [0 to 101] of a list

2005-09-30 Thread TEMPL Matthias
Probably, you could do it like A - list() for( i in 1:101){ A[[i]] - Kest( get( paste(pp,i,sep=) ) ) } Best, Matthias Hi I looked, but I didn't find it: I need an array [0 to 101] where each element is a list (the result of Kest in spatstat). I.e. I want to do: A[2] - Kest(pp1)

Re: [R] correlation question

2005-09-30 Thread TEMPL Matthias
First: The question is really not related to R. What you can find very easly in books or in the internet: The correlation coefficient is invariant under a linear transformation (and the proof) #E.g. library(rrcov) data(brain) cor(brain) cor(scale(brain)) #Is the same, BUT cor(log(brain))

Re: [R] Random Forest with R

2005-09-28 Thread TEMPL Matthias
Have a look at http://cran.r-project.org/search.html or http://cran.at.r-project.org/src/contrib/PACKAGES.html -- randomForest Best, Matthias Hi, what is the name of the package that provides Random Forest with R. Sincerely Louis Ferré

Re: [R] Add function to histogram?

2005-09-21 Thread TEMPL Matthias
Hello, E.g. with lines() or add a new plot to the current plot with par(new = TRUE) (and set equal xlim and ylins´s in the plot function) r - rnorm(100) hist(r,freq=FALSE) lines(density(r)) Best, Matthias Is there any neat way to add a curve (frequency function or the like) to a

Re: [R] Replicate

2005-09-16 Thread TEMPL Matthias
x = (1,1,1,2,2,2,3,3,3,3) unique(x) Best, Matthias Dear All, I have a vector x = (1,1,1,2,2,2,3,3,3,3) I am looking for a function to return a vector containing the distinct elements of x i,e y = (1,2,3) The following code gives the desired results:

Re: [R] *** saving files ***

2005-09-14 Thread TEMPL Matthias
Hi, write.table(result, paste(path/file_,i,sep=)) inside the for-loop should done this in a for( i in ... ) loop. Or: save(result, file=paste(path/file_,i,sep=) See ?read.table and ?load for loading the files. Best, Matthias Hi, I need help :o( I want that my

Re: [R] SPSS Dataset

2005-09-08 Thread TEMPL Matthias
RSiteSearch(read spss data) -- library(foreign) ?read.spss Best, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von ERICK YEGON Gesendet: Freitag, 09. September 2005 07:02 An: R-help@stat.math.ethz.ch Betreff: [R] SPSS Dataset

Re: [R] problem with read.table

2005-08-25 Thread TEMPL Matthias
Hi All recently i faced an unknown problem while reading the data. Can someone help me in understanding why this happened. I have .txt file containing X, Y, Z variables. I used the command Please show at least 2 lines of your data. a - read.table(filename, header=TRUE) Are you

Re: [R] help on retrieving output from by( ) for regression

2005-08-25 Thread TEMPL Matthias
Look more carefully at ?lm at the See Also section ... X - rnorm(30) Y - rnorm(30) lm(Y~X) summary(lm(Y~X)) Best, Matthias Hi all I used a function qtrregr - by(AB, AB$qtr, function(AB) lm(AB$X~AB$Y)) objective is to run a regression on quartery subsets in the data set AB,

Re: [R] R: graphics devices

2005-07-29 Thread TEMPL Matthias
Eventually one way: With X11() you can open additional graphic devices. x - rnorm(100) y - x + runif(100) plot(x) X11() plot(x,y) Best, Matthias a simple question how does one produce plots on two different graphics devices? / allan __

Re: [R] choice of graph

2005-07-11 Thread TEMPL Matthias
Hi, It's about 2 weeks that I think about a graph to translate my datas. But I don't have an really idea. I 'm going to expose you my problem: I have a questionnaire with 15 questions and you have more possibilties to answer to these. For example: The trainer is competent:

Re: [R] Making Package, Chm error, Html Help Workshop [solved]

2005-07-08 Thread TEMPL Matthias
Dear Uwe Ligges, There was really a problem with an irregular name of a help topic (%cin% - the % was the problem) as you said. With the new R Version and with the corrected Rd file all works fine. Thanks a lot for your help! Matthias TEMPL Matthias wrote: Hello, When building my

Re: [R] function par(mfrow....)

2005-07-07 Thread TEMPL Matthias
Hi, Is layout the function you will need? ?layout E.g.: l - matrix(c(rep(1,4), rep(2,8),rep(3,8)), ncol=5) layout(l) layout.show(3) plot(1,1) plot(1:25,pch=1:25) plot(2,5) Best regards, Matthias Hi, I have made 3 barplots differents in the some window plot with the function

[R] Making Package, Chm error, Html Help Workshop

2005-07-07 Thread TEMPL Matthias
Hello, When building my package (R CMD check) following error message occurs: ... varinf.plot text html latex example xtext html latex example make[2]: *** No rule to make target `disclosure.chm`. Stop. cp: cannot stat

Re: [R] Different results in different runs with identical parametersin CLARA

2005-06-10 Thread TEMPL Matthias
Dear All R Friends, When I run my data in any time with the below codes, I receive different results. Of course. See in L. Kaufman and P. Rousseeuw. Finding Groups in Data. John Wiley Sons, Inc, 1990. There is a random part in clara. My data , k , samples, trace are identical in

Re: [R] Which variable exist after random

2005-06-01 Thread TEMPL Matthias
Dear R-helper, How could I count only some variable was exist after running sample (random) function. ? For example, testx - factor(c(Game,Paper,Internet,Time,Money)) for(i in 1:2) { +x - sample(testx,replace=TRUE) +print(x) +} [1] MoneyMoneyTime

Re: [R] Which variable exist after random

2005-06-01 Thread TEMPL Matthias
Dear R-helper, How could I count only some variable was exist after running sample (random) function. Or is this what you want? Tab - table(sample(testx, replace=TRUE)) Tab[ Tab 0 ] For example, testx - factor(c(Game,Paper,Internet,Time,Money)) for(i in 1:2) { +x -

Re: [R] How to access to sum of dissimilarities in CLARA

2005-05-31 Thread TEMPL Matthias
[mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 31. Mai 2005 11:20 An: R-help@stat.math.ethz.ch Cc: TEMPL Matthias Betreff: [R] How to access to sum of dissimilarities in CLARA Dear Matthias, So many thanks for your

Re: [R] Reference Card?

2005-05-30 Thread TEMPL Matthias
Hello! For LaTeX I found a reference Card at http://www.cs.ualberta.ca/~c603/LaTeX_docs/Symbol_Source/latex _symbols.pdf Is there something available for R? Hello Martin, See the reference cards on http://cran.r-project.org/other-docs.html Best, Matthias PLEASE do read the posting

Re: [R] How to access to sum of dissimilarities in CLARA

2005-05-30 Thread TEMPL Matthias
Hello, #Example: data(xclara) p - clara(xclara,3) names(p) p$diss Best, Matthias Dear All , Since dissimilarity is one of quality measures in clustering , I'm trying to access to the sum of dissimilarity as a whole measure. But after running my data using CLARA I obtain : 1128

Re: [R] standardization

2005-05-18 Thread TEMPL Matthias
My thoughts on this is: Do not trust what SAS say´s and least of all what the Enterprise Miner said. Robust Statisticians recommendends to standardize using e.g. (X - median(X)) / ( MAD(X) / 0.675 ) Best, Matthias SAS Enterprise Miner recommendeds to standardize using X / STDEV(X) versus

Re: [R] cluster results using fanny

2005-05-17 Thread TEMPL Matthias
Barbara Diaz wrote: Hi, I am using fanny and I have estrange results. I am wondering if someone out there can help me understand why this happens. First of all in most of my tries, it gives me a result in which each object has equal membership in all clusters. I have read that

AW: [R] Question for layout function

2005-04-21 Thread TEMPL Matthias
Dear people, Is there a way to generate three graphs having 2x2 layout, ? but left half is merged ? Like below. - ||| ||| ||| ||| - Something like this? l - layout(matrix(c(1,2,3,2),ncol=2,byrow=TRUE)) layout.show(3) d -

Re: [R] Help with predict.lm

2005-04-19 Thread TEMPL Matthias
Hi I have measured the UV absorbance (abs) of 10 solutions of a substance at known concentrations (conc) and have used a linear model to plot a calibration graph with confidence limits. I now want to predict the concentration of solutions with UV absorbance results given in the new.abs

Re: [R] ??

2005-04-11 Thread TEMPL Matthias
Hello Adrián, Look e.g. at http://tolstoy.newcastle.edu.au/R/help/04/06/0869.html and use e.g. http://finzi.psych.upenn.edu/search.html for searching help files, manuals and mailing list archives. Best, Matthias R people, I'd like to know how can I make inequations with are What is are?

Re: [R] Introduce a new function in a package?

2005-04-06 Thread TEMPL Matthias
See at http://cran.r-project.org/doc/manuals/R-intro.pdf at page 54. .First() can help you. Or create an own package (see http://cran.r-project.org/doc/manuals/exts.pdf ) and load the package, when needed. Best, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED]

Re: [R] 'skewing' a normal random variable

2005-04-03 Thread TEMPL Matthias
I think the box.cox function in package car can do this. x - rnorm(1000) hist(x) library(car) hist(box.cox(x, p=0.5)) Play around with different powers. Best, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Ashraf Chaudhary

Re: [R] a R function for sort a data frame.

2005-04-01 Thread TEMPL Matthias
Hi, x - data.frame(A=rnorm(10), B=round(runif(10,0,10)), C=rnorm(10)) #one way: #increasing order x.sort.in - x[order(x$B),] x.sort.in #decreasing order: x.sort.de - x[rev(order(x$B)),] x.sort.de Best, Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [R] 2d plotting and colours

2005-03-29 Thread TEMPL Matthias
Hi! There are more than 8 colors. x - rbind(matrix(rnorm(100, sd = 0.3), ncol = 2), matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2)) (cl - kmeans(x, i, 20)) s - c(tomato4, turquoise, slateblue, wheat, snow, skyblue, peru, pink) # see at: colors() plot(x, col

Re: [R] Help : delete at random

2005-03-01 Thread TEMPL Matthias
Hello, d - data.frame(a=c(2,3,4), b=c(2,4,1), c=c(3,5,6)) ## one NA s.r - sample(dim(d)[1], 1) s.c - sample(dim(d)[2], 1) d.na - d d.na[s.r, s.c] - NA d.na # Here a matrix is more comfortable by using sample. For multiple NA, you should write a loop, but to choose e.g. exact 4 values, it

Re: [R] r: functions

2005-02-24 Thread TEMPL Matthias
Hello, I have no errors with simple1: d - matrix(c(1,2,3,1,6,10,10,6,7),ncol=3) colnames(d) - c(one, two, three) x- d[,c(1,2)] y-d[,3] y [1] 10 6 7 simple1(x,y) [[1]] Call: lm(formula = ydata ~ xdata) Coefficients: (Intercept) xdataone xdatatwo -6 21

[R] Compare rows of two matrices

2005-02-21 Thread TEMPL Matthias
Hello, #I have two matrices, eg.: y - matrix( c(20, NA, NA, 45, 50, 19, 32, 101, 10, 22, NA, NA, 80, 49, 61, 190), ncol=4 ) x - matrix( c(20, NA, NA, NA, 50, 19, 32, 101, 10, 22, NA, NA, 80, 49, 61, 190), ncol=4 ) #Whereas x contains all NA´s from y plus some

Re: [R] Compare rows of two matrices

2005-02-21 Thread TEMPL Matthias
) Jonne. - - Original Message - From: TEMPL Matthias [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Monday, February 21, 2005 3:48 PM Subject: [R] Compare rows of two matrices Hello, #I have two matrices, eg.: y - matrix( c(20, NA, NA, 45

Re: [R] find source code

2005-01-17 Thread TEMPL Matthias
But how can I see the *documented* source code in Windows? I think i.e. in the /flexmix/library/man/all.rda file is the documented(?) code for all functions of Package flexmix, but the standard Windows XP cannot open .rda files correct. Is there a way to read the documented source code of a

Re: [R] find source code

2005-01-17 Thread TEMPL Matthias
-Ursprüngliche Nachricht- Von: Liaw, Andy [mailto:[EMAIL PROTECTED] Gesendet: Montag, 17. Jänner 2005 16:33 An: TEMPL Matthias; r-help@stat.math.ethz.ch Betreff: RE: [R] find source code From: TEMPL Matthias But how can I see the *documented* source code in Windows? I

Re: [R] random samples

2005-01-13 Thread TEMPL Matthias
which(A%in%S==FALSE) Best Matthias -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von [EMAIL PROTECTED] Gesendet: Donnerstag, 13. Jänner 2005 13:51 An: r-help@stat.math.ethz.ch Betreff: [R] random samples hi, I am encoutering a very

AW: [R] Replacing all NA values in a matrix

2005-01-05 Thread TEMPL Matthias
Replacing the NA´s with eg. 1 : a 1 2 3 4 1 20 50 10 80 2 NA 19 NA 49 3 NA 32 NA 61 4 45 101 44 190 a[try(is.na(a)) == TRUE] - 1 a 1 2 3 4 1 20 50 10 80 2 1 19 1 49 3 1 32 1 61 4 45 101 44 190 I this can help you, Matthias -Ursprüngliche Nachricht-

Re: [R] Problems with merge

2004-10-06 Thread TEMPL Matthias
Hello, You can change e.g. the second column name in the following way: data(iris) colnames(iris) [1] Sepal.Length Sepal.Width Petal.Length Petal.Width Species To change the second column name: colnames(iris)[2] - name colnames(iris) [1] Sepal.Length name Petal.Length Petal.Width

AW: [R] Indexing dataframe

2004-09-09 Thread TEMPL Matthias
Hi, Use Newdata - subset(d2004, select=-c(concentration,stade)) See ?subset for details Best, Matthias -Ursprüngliche Nachricht- Von: Jacques VESLOT [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 09. September 2004 12:38 An: [EMAIL PROTECTED] Betreff: [R] Indexing dataframe

Re: [R] aggregate function

2004-07-26 Thread TEMPL Matthias
Hi, # x ... your frame attach(x) sum(Total[Year==1997 Tus 0]) I hope this helps Best, Matthias -Ursprüngliche Nachricht- Von: Luis Rideau Cruz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 26. Juli 2004 14:52 An: [EMAIL PROTECTED] Betreff: [R] aggregate function Hi all, I

Re: [R] aggregate function

2004-07-26 Thread TEMPL Matthias
Hi, # x ... your frame attach(x) sum(Total[Year==1997 Tus 0]) I hope this helps Best, Matthias Templ -Ursprüngliche Nachricht- Von: Luis Rideau Cruz [mailto:[EMAIL PROTECTED] Gesendet: Montag, 26. Juli 2004 14:52 An: [EMAIL PROTECTED] Betreff: [R] aggregate function

Re: [R] How to sort TWO columns ?

2004-07-21 Thread TEMPL Matthias
Hi, It would be discussed yesterday. See e.g. in Google for (sorting a data frame R) http://www.r-project.org/nocvs/mail/r-help/2002/0088.html Or one entry yesterday: Best, Matthias Hi Lets assign your data frame to the variable yourdf then: yourdf[ , order( yourdf$year ) ] should sort it.

Re: [R] Rose Diagrams

2004-07-21 Thread TEMPL Matthias
Hi, library(CircStats) ?rose.diag Hope this helps, Matthias Hi, Is it possible to create Rose Diagrams of wind data (speed direction) with R?? Best regards, Lars Peters - Lars Peters University of Konstanz Limnological Institute D-78457 Konstanz Germany phone:

Re: [R] Excel file

2004-07-12 Thread TEMPL Matthias
-Ursprüngliche Nachricht- Von: TEMPL Matthias Gesendet: Montag, 12. Juli 2004 17:29 An: 'Pernilla Karlsson' Betreff: Re: [R] Excel file It is possible to open the file in R. ?read.table excelfile - read.table(../file.txt, sep=,, header=T) when you have a komma

Re: [R] anti-R vitriol

2004-06-30 Thread TEMPL Matthias
Hi, I wonder, why SAS should be better in time for reading a data in the system. I have an example, that shows that R is (sometimes?, always?) faster. - Data with 14432 observations and 120 variables. Time for reading the data: SAS 8e: data testt; set l1.lse01;run; real

Re: [R] question

2004-06-07 Thread TEMPL Matthias
Hello, I'd like to know if I can modify a constant value with a function. Example : a=4 f1-function() {a=3} Of course, after the function f1() is executed , the value of a is always 4. I'd like the value returned is 3, like it is possible in C by doing *a=3 Use return: f1 -

[R] R CMD check, Windows XP, perl

2004-06-04 Thread TEMPL Matthias
Dear R users and developers, I'm trying to build a package. The R CMD build works fine. The R CMD check produces allways the following error: .. installing indices Can`t locate File/Basename.pm in @ING (@ING contains: D:/../rw1090/share/perl d:/../rw1090/lib .) at

[R] R CMD check, latex

2004-05-28 Thread TEMPL Matthias
Hello, I'm trying to build a package and the R CMD build works fine. The R CMD check produces an error, because no latex is found. But I have MikTeX installed and it works fine (only?) in combination with WinEdt. After reinstallation of MikTeX (no errors) I have the same problem. I´m not sure

RE: [R] R CMD check, latex

2004-05-28 Thread TEMPL Matthias
It was an (for me not understandable) problem on miktex I´m solving my problem, by copying ..\texmf\miktex\bin\etex.exe to latex.exe I´m wondering that now R CMD check works now. Sorry, for my question to R help. Matthias -Ursprüngliche Nachricht- Von: TEMPL Matthias Gesendet

[R] Rcmd check, windows xp, perl

2004-05-27 Thread TEMPL Matthias
Dear R users, With package.skeleton() i have produced successfully my .Rd´s, ... Now i will run Rcmd check on ..\R\bin\ But Rcmd check (and build) on my Windows XP does not work. It`s a problem with perl. (Translated i get the message: The instruction Perl is either wrongly written or could not

AW: [R] Question

2004-05-26 Thread TEMPL Matthias
A small comment: The code of Agnes is written in Fortran. Following book give more details: Kaufman, L. and Rousseeuw, P.J. (1990). _Finding Groups in Data: An Introduction to Cluster Analysis_. Wiley, New York. The 'hclust' function is based an Algorithm contributed to STATLIB by F.

[R] Accessing data

2004-05-17 Thread TEMPL Matthias
Hello, I would like to access my data frame without one variable. E.g.: colnames(x) [1] Besch Ang.m Arb.m i10Umsatz arbstd I can try x[,-1], but this variable must be called by it´s name. x[,-Besch] x[,!Besch] attach(x) x[-Besch] ... ... does not work. I could not found a solution

AW: [R] Export summary statistics to latex

2004-05-14 Thread TEMPL Matthias
Try: Search in Google for r code latex And look for eg. the second entry. You kann also use Sweave (library(tools)) Matthias -Ursprüngliche Nachricht- Von: Ulrich Leopold [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 14. Mai 2004 10:14 An: [EMAIL PROTECTED] Betreff: [R] Export

Re: [R] Probleme with Kmeans...

2004-05-11 Thread TEMPL Matthias
Hello, When clustering with kmeans, your data should have more than one variable. Matthias -Ursprüngliche Nachricht- Von: clothilde kussener [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 11. Mai 2004 12:01 An: [EMAIL PROTECTED] Betreff: [R] Probleme with Kmeans... Hello, I would like

AW: [R] Probleme with Kmeans...

2004-05-11 Thread TEMPL Matthias
). Thank you for your comment, Matthias -Ursprüngliche Nachricht- Von: Unung Istopo Hartanto [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 11. Mai 2004 16:23 An: TEMPL Matthias Betreff: Re: [R] Probleme with Kmeans... Hello Matthias, I think kmeans able to process only one variable

Re: [R] plot help

2004-04-08 Thread TEMPL Matthias
Hello! This works: hist(rnorm(100, mean = 20, sd =12), xlim=range(0,100), ylim=range(0,50)) par(new = TRUE) hist(rnorm(100, mean = 88, sd = 2), xlim=range(0,100), ylim=range(0,50)) Matthias Templ -Ursprüngliche Nachricht- Von: Pierre Clauss [mailto:[EMAIL PROTECTED] Gesendet: