[R] The match of "ave()" for "FUN=SD"

2007-05-08 Thread Felix Wave
Hello, I have many subsets of x. I want to get the standard deviation for each subset with the same factor levels. For "FUN=mean" and "FUN=median" I am using "ave()". Can anybody tell me the match of "ave()" for using "FUN=SD"? At the beginning I used aggregate(), also for mean and median. But a

[R] different hights & centering in one device region

2007-05-07 Thread Felix Wave
Hello, I have a question. I creat a PDF file with four rows and two cols. Is it possible to: -create a plot regions with different hights (example: rows 1 & 2-4) -ro center an image in the whole width (example: rows 4) Thank's a lot. Felix example: Title --

[R] Get the difference between two matrices with different length

2007-05-04 Thread Felix Wave
Hello, I have got two matrices with different length. The matrices have 3 columuns. The first two are coordinates. The third is a measurement. Now I want to get a subtraction between every single value of the third column (between matrix1 and matrix2), but only if the two first coordinates in ma

[R] Filling array: No recycling

2007-05-03 Thread Felix Wave
Hello, is it possible to fill an array with no using of the recycling rule? My problem. I want to fill an array but my values have not always the same length. My aim. I want to fill the array only ONE TIME. All vacent places should be written with NA. Thank's a lot. Felix Example: #W

[R] Get the difference of values to their own median value

2007-05-02 Thread Felix Wave
Hello, I've got a matrix (mail end) with the colnames x, y, z. In this matrix are different measurements. x and y are risign coordinates. With the following line I got the median value of z for all "x" AND "y" witch are the same (not every measurment in my list hast the same number of "x" and "y"

[R] Write text in the "device region" of a graphic device

2007-04-27 Thread Felix Wave
Hello, I started a graphic device: >par(oma = c(2,0,0,0), mfrow=c(2,2) ) in the cols and rows are three "image"s. Now I want to write a text in the "device region", it's the main title of the graphic device. But when I use "mtext()" I can only write in the "figure region" of my four plots. Has an

[R] Graphic plots in pdf (position)

2007-04-26 Thread Felix Wave
Hello, I have got three graphics. pdf("output.pdf") persp(zPERSP_1) persp(zPERSP_2) persp(zPERSP_3) dev.off() I will write all those on one page of a pdf file. On the left side I will write some lines text. Is this possible, positioning graphic and text elements in pdf? I has already thought I

Re: [R] Change the mode of a list

2007-04-20 Thread Felix Wave
n, the first colum is +1 greater and the second colum is +1)*10 greater. Maybe somebody has a idea. Felix > Hello, > > I dont know if it works, but try: storage.mode(xxx) = "numeric" > > Alin > > 2007/4/20, Felix Wave <[EMAIL PROTECTED]>: > > > &g

Re: [R] Change the mode of a list

2007-04-20 Thread Felix Wave
With >as.matrix(MEAN[unlist(lapply(MEAN, is.numeric))]) I will get two colums not three and only the last colum are my values (MEAN[,3]). The first is only a rising number. I also tried: >MEASURE <- sapply( MEAN, as.numeric ) resp. >MEAN <- unlist(MEAN) >MEASURE <- matrix(MEAN, ncol=3, b

Re: [R] Change the mode of a list

2007-04-20 Thread Felix Wave
With >as.matrix(MEAN[unlist(lapply(MEAN, is.numeric))]) I will get two colums not three and only the last colum are my values (MEAN[,3]). The first is only a rising number. I also tried: >MEASURE <- sapply( MEAN, as.numeric ) resp. >MEAN <- unlist(MEAN) >MEASURE <- matrix(MEAN, ncol=3, b

[R] Change the mode of a list

2007-04-20 Thread Felix Wave
Hello, can anybody tell me a easy way to change the mode of an "aggregate list" to "numeric"? I found a solution but I looks cruel. Thank's Felix PS: In the past you have asked what I am doing. I have to evaluate measures of two gauges of our university. The aim is to get an answer which one i

[R] Using "mean" if two values are identical

2007-04-19 Thread Felix Wave
Hello, I have got a question. I've got a matrix (mail end) with the colnames x, y, z. In this matrix are different measurements. x and y are risign coordinates. My question. Always, if the "x" AND "y" coordinates are the same, I want to get the mean of their z values. e.q. " x" AND "y" in line

[R] Get the: "standard deviation" and "mean value" of 3D-measurments

2007-04-18 Thread Felix Wave
Hello, I have got a numeric matrix with three colums of a few measurments. My x and y coordinates are rising numbers. The z coordinate is the measurment. In my matrix if have got ~6000 sorted values for one measurments multiplied with the number of measurments. An example in the end. My aim is to

[R] GREP - Choosing values between two borders

2007-04-17 Thread Felix Wave
Hello, I import datas from an file with: readLines But I need only a part of all measurments of this file. These are between two borders "START" and "END". Can you tell me the syntax of grep(), to choose values between two borders? My R Code was not succesful, and I can't finde anything in the he

[R] Dataimport with readLines using skip= and nlines= ?

2007-04-16 Thread Felix Wave
Hello, I have a problem with readLines. I have a data file with many informations added with a different number of measurments (example at the end). I only want to read the measurments witch start with "START OF HEIGHT DATA" and end with "END OF HEIGHT DATA". The difficulty is: -I want to read

[R] data file import - numbers and letters in a matrix(!)

2007-04-12 Thread Felix Wave
Hello, I have a problem with the import of a date file. I seems verry tricky. I have a text file (end of the mail). Every file has a different number of measurments witch start with "START OF HEIGHT DATA" and ende with "END OF HEIGHT DATA". I imported the file in a matrix but the letters before

[R] persp Error. x,y,z with the same length

2007-04-11 Thread Felix Wave
Hello, I have a problem in drawing a 3d graphic. I simplified the program to show you the problem. I have a text file with hundreds of entries in 3 columns. I scaned these columns with matrix(scan). Then, I transformed some datas. Now I have the datas in h,x,y. I created a new matrix to use pe