[R] Odp: multiphasic growth curve analysis

2007-09-04 Thread Petr PIKAL
Although I am not an expert in NLME modelling, looking at your data it seems to me that there seems to be no growth pattern in it. Try library(nlme) library(reshape) goat-read.table(clipboard, header=T) str(goat) 'data.frame': 18 obs. of 15 variables: $ NoC : int 52 48 54 60 58 42 44 47

Re: [R] by group problem

2007-09-03 Thread Petr PIKAL
... aggregate(data$percentOld, list(data$state, data$county), topN) Error in aggregate.data.frame(as.data.frame(x), ...) : 'FUN' must always return a scalar Thanks cn From: Petr PIKAL [mailto:[EMAIL PROTECTED] Sent: Fri 8/31/2007 8:15 AM To: Cory Nissen Cc: r-help@stat.math.ethz.ch

[R] Odp: element wise opertation between a vector and a list

2007-09-03 Thread Petr PIKAL
Hi mapply(+, a, b) Regards Petr [EMAIL PROTECTED] napsal dne 03.09.2007 08:36:10: I want to try to get a result of element wise addition between a vector and a list. It can be done with for statement. In order to reducing computing time, I have tried to avoid for state. If anybody give me

Re: [R] boxplot will remember the factor levels

2007-08-31 Thread Petr PIKAL
Try: boxplot(mLength ~ puntar[drop=T],data=test) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 30/08/2007, Luis Ridao Cruz [EMAIL PROTECTED] wrote: R-help, I'm trying to do a simple box-and-whisker plot to some data. The data are a subset of

[R] Odp: by group problem

2007-08-31 Thread Petr PIKAL
Hi I am working with census data. My columns of interest are... PercentOld - the percentage of people in each county that are over 65 County - the county in each state State - the state in the US There are about 3100 rows, with each row corresponding to a county within a state. I

Re: [R] R Help

2007-08-28 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 28.08.2007 13:33:13: You don't have installed the akima pakage. install.packages(akima, dep=T) And wait about two months and update your R version to 2.6.0. Or update now to 2.5.1 Regards Petr -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40

[R] Odp: displaying the means on a scatter diagram

2007-08-22 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 22.08.2007 09:10:26: Hello, I created a simple scatter diagram: x= c(53, 52, 55, 65, 71, 69, 75, 78, 88, 70) y= c(162, 165, 165, 171, 173, 175, 179, 181, 184, 176) plot(x, y) Now I would like to display the mean on that diagram. do you think

[R] Odp: Variable c and function c

2007-08-21 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 21.08.2007 17:07:05: I have found the error in my script which was semi-automatically translated from the other person's MATLAB code. The error is that c was assigned a value inside a function. That is the function body contained the following

[R] Odp: beta distrib function was(no subject)

2007-08-17 Thread Petr PIKAL
Hi you do not give much information, even subject line is missing. Try to follow posting guide and try to explain what you did and how did you fail. Regards Petr [EMAIL PROTECTED] napsal dne 16.08.2007 17:24:24: hi, i'm new to R and i'm trying to port a quattro pro spreadsheet into R.

Re: [R] time series periodic data

2007-08-16 Thread Petr PIKAL
Thank you. I will try to get the book, althoug I am not sure if I with my tiny knowledge of mathematics will be able to digest it. Meanwhile I tried to make 7 min average and then to reanalyze by spectrum, but the output was not very convincing. Regards Petr Pikal [EMAIL PROTECTED] Rolf

[R] Odp: combine 2 data frames with missing values

2007-08-16 Thread Petr PIKAL
Hi for this particular task rowSums(cbind(a,b), na.rm=T) gives you c column Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 16.08.2007 13:03:51: Hi All, I have 2 data frames as follows: abc 1 NA 1 2 NA 2 NA 3 3 So a, b are the input values and c

[R] time series periodic data

2007-08-15 Thread Petr PIKAL
regards Petr Pikal [EMAIL PROTECTED] __ 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

[R] Odp: Linear Regression with slope equals 0

2007-08-14 Thread Petr PIKAL
Hi Not being a trained statistician regression with slope = 0 seems odd to me. If you do fit-lm(d~t) summary(fit) Call: lm(formula = d ~ t) Residuals: 123456 0.04762 -1.43810 0.07619 1.59048 2.10476 -2.38095 Coefficients:

[R] Odp: Problem with by: does not work with ttest (but with lme)

2007-08-14 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 14.08.2007 15:11:11: Hello, I would like to do a large number of e.g. 1000 paired ttest using the by- function. But instead of using only the data within the 1000 groups, R caclulates 1000 times the ttest for the full data set(The same happens with

[R] Odp: Very new - beginners questions

2007-08-13 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 13.08.2007 14:04:50: Dear all, I have 4 sites and want to determine how different they are from each other. For this I have decided to use R though it seems a bit daunting to learn. I have read data in from a CSV the structure is : Species1

[R] Odp: having problems with factor()

2007-08-10 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 10.08.2007 13:41:53: Dear R Help, I have a set of data of heights of trees described by area that they are in. The areas are numerical (0 to 7). htarea 1 320 3 2 410 4 3 230 2 4 360 3 5 126 1 6 280 2 7 260 2 8

[R] Odp: help with counting how many times each value occur in each column

2007-08-10 Thread Petr PIKAL
Hi mat-sample(c(-50,0,-100), 100,replace=T) dim(mat)-c(10,10) mat [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]0000 -500000 0 [2,] -100 -100 -50 -5000 -100 -50 -100 -50 [3,]0 -50 -100 -1000 -50 -10000 -100

[R] Odp: Successively eliminating most frequent elemets

2007-08-09 Thread Petr PIKAL
Hi your construction is quite complicated so instead of refining it I tried to do such task different way. If I understand what you want to do you can use set.seed(1) T - matrix(trunc(runif(20)*10), nrow=10, ncol=2) T [,1] [,2] [1,]22 [2,]31 [3,]56 [4,]

[R] Odp: Error in as.double.default(x) : (list) object cannot be coerced to 'double'

2007-08-08 Thread Petr PIKAL
Hi Far from beeing an expert I can decide from your post that you probably mix R objects matrix x data frame x list. All of them have specific features and you sometimes cannot convert one to another easily. See what your objects are and how they look like by e.g. str(X1) or mode or typeof I

Re: [R] Problems using lm in combination with predict

2007-08-06 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 04.08.2007 15:04:56: Hi, I am sorry I meant: mod - lm(y~Worktime+Vacation+Illnes+Bankholidays) newdate=data.frame(x=c(324,123,0.9,0.1)) your data frame shall have correct column names (Worktime, Vacation, ...) Regards Petr

Re: [R] Sorting data for multiple regressions

2007-08-06 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 04.08.2007 07:49:16: Well, R has a by() function that does what you want, and its help page contains an example of doing regression by group. (There are other ways.) E.g. you can split your data into list d.s - split(data, data$site) and then use lapply

[R] Odp: variance

2007-08-06 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 06.08.2007 11:41:56: hello, I wanna calculate some variances for the bartlett test and I used the var() function but I think it isn't a good estimation for the variance I don't understand why. In fact when I calculate the variances by myself I don't find

Re: [R] array loop

2007-08-01 Thread Petr PIKAL
=, to be on safe side I use - everywhere when I want to do assignment of some value(s). Regards Petr Regards, Dong On 7/31/07, Petr PIKAL [EMAIL PROTECTED] wrote: Hi as you say that the computing is part of a function than the best way to see what is hapenning is to use debug

[R] Odp: array loop

2007-07-31 Thread Petr PIKAL
Hi as you say that the computing is part of a function than the best way to see what is hapenning is to use debug(your.function) see ?debug for options. Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 31.07.2007 00:11:00: Dear all, here are two arrays: region(26,31,8),

[R] Odp: Bind together two vectors of different length...

2007-07-30 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 30.07.2007 12:09:59: Dear everyone, I've got difficulties in realizing the following task: I have two vectors: A - c(1:10) B- seq(1,10,2) Now I want to make a table form vectors A and B as rows, and if a value of A isn't present B, then I want to

[R] Odp: data order by different level of variables

2007-07-30 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 28.07.2007 02:18:33: Dear useR, I have a data matrix, it has n columns, each column is a two-level variable with entires -1 and +1. They are randomly generated, now I want to order them like (for example, 5 columns case) --- - - -- - -

[R] Odp: Looping through all possible combinations of cases

2007-07-30 Thread Petr PIKAL
Hi I am not sure about using loops but something like colSums(combn(DATA[,1],2)) gives you sums of all pairs and colSums(combn(DATA[,1],3)) sums of all triplets etc. if you want to know which ones they are just use combn on names. e.g. y X1.5 a1 b2 c3 d4 e5

[R] Odp: multiple graphs

2007-07-26 Thread Petr PIKAL
Hi this particular graph is a combination of several approaches see layout # how to split plot window (or ?split) par(new=TRUE) # how to plot several times to the same window without erasing previous plot and of course sophisticated use of all other stuff which is available in R. See also

[R] Odp: plots

2007-07-25 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 25.07.2007 12:17:54: Hi Sir I did not find any function of graph which plot one variable on x-axis and 2 or more than 2 variables on y-axis. ?matplot or you can do plot(x,y, ylim=range(all.your.y), type=n) and add lines/points by lines(x, one.of.your.y)

[R] Odp: Operator and

2007-07-25 Thread Petr PIKAL
Hi you definitely shall make a quick glance to some documentation which comes with R e.g. R intro manual. Or look at CRAN where is quite impressive amount of literature from basic stuff to advanced papers. To your question: [EMAIL PROTECTED] napsal dne 25.07.2007 14:23:58: Hello, I'am

[R] Odp: Open two graphic devices at a time

2007-07-25 Thread Petr PIKAL
Hi far from beeing an expert in graphic devices AFAIK you can either see your graph on screen (x11 device) or to open other device (pdf, png, ...) and to issue plotting commands to that device. Do not forget dev.off() after your plot is finished. Or you can save your plot by menu command

[R] Odp: Adding data to existing plot with new=TRUE does not appear to work

2007-07-04 Thread Petr PIKAL
Hi if you change your code plot(1,10, xlim=range(0,3), ylim=range(0,10), type='n') aa - rep(1,10) bb - 1:10 plot(aa,bb, xlim=range(0,3), ylim=range(0,10), new=TRUE) aa - rep(2,10) par(new=T) plot(aa,bb, xlim=range(0,3), ylim=range(0,10), new=TRUE) you will get both columns plotted. However you

[R] Odp: Combine graphical and textual output

2007-07-02 Thread Petr PIKAL
Hi try to look at R2HTML package, it can produce report like output. Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 02.07.2007 11:08:46: Hi, I would like to know whether anybody knows a simple way to combine textual and graphical output in R. A typical analysis produces textual

Re: [R] no applicable method

2007-06-29 Thread Petr PIKAL
, character) but in data framwe you can mix columns with different types. Regards Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 28.06.2007 20:12:49: You actually got it right. I didn't realize there was a difference between a data frame and matrix. What is the difference any

Re: [R] Import from excel

2007-06-27 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 27.06.2007 15:43:53: Thank you, but it still doesn't work completely Thanks to you and the dec=, option, I can now do cours[5,5]*5 and get the exact value But I still cannot do matrix operations like cours[2,]%*%cours[5,] As only you have cours we can

[R] Odp: how to iterate

2007-06-26 Thread Petr PIKAL
Hi as you did not specify your code (which you said it had failed) I try to give you a suggestion how I would do such tasks. for (i in 1:100) { sample(something, no, replace =TRUE) result -perform a test store.a result[i] - result } Regards Petr [EMAIL PROTECTED] napsal dne 26.06.2007

[R] Odp: merge

2007-06-21 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 20.06.2007 18:02:07: Hello, ok I know how to do to merge matrix or data.frame by row.names but my true objectif is to merge for example this data.frame: A obs Rép1 Rép2 Rép3 Rép4 Rép5 Rép6 Var1 145 145 150 145 140 145 Var2 150 150

[R] Odp: extract elements

2007-06-20 Thread Petr PIKAL
Hi you can use tail tail(data, -95) gives you all but first 95 records. Regards Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 20.06.2007 12:47:11: Dear R users, just another little question... are there other ways, I mean more easy to write, to obtain the same result I got

[R] Odp: outlying

2007-06-19 Thread Petr PIKAL
Hi It often depends on your attitude to limits for outlying observations. Boxplot has some identifying routine for selecting outlying points. Any procedure usually requires somebody to choose which observation is outlying and why. You can use e.g. all values which are beyond some threshold

[R] Odp: Odp: outlying

2007-06-19 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 19.06.2007 12:23:58: Hi It often depends on your attitude to limits for outlying observations. Boxplot has some identifying routine for selecting outlying points. Any procedure usually requires somebody to choose which observation is outlying and why. You

[R] Odp: data.frame

2007-06-18 Thread Petr PIKAL
row.names(d.m) - whatever vector of names you can elaborate Regards Petr Pikal [EMAIL PROTECTED] BTW. R is not C and you shall use strong features of R not to try to avoid them. [EMAIL PROTECTED] napsal dne 18.06.2007 15:40:38: hello, I'm trying to write a function which take a matrix and give

[R] Odp: Selecting all values smaller than X in a dataframe

2007-06-11 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 11.06.2007 14:09:45: Dear R users, I have a correlation matrix for a dataframe called synth, for which I now want to select only those cells that have correlations larger than +/-0.6: synth=data.frame(x=rnorm(10,1),y=rnorm(10,2),z=rnorm(10,0.5))

[R] Odp: Svar: Re: help with simple R-question

2007-06-06 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 06.06.2007 10:56:18: thanks, that works great!! just have another thing...i the same area What if the class is list instead of array, how can you name the first unrecognized column? Hi look in some intro manual and learn about R data structures. Matrix,

[R] Odp: sampling problem - new to R

2007-06-06 Thread Petr PIKAL
Hi If I understand correctly, use split and sample with lapply. If DF is your dataframe lapply(split(DF$Tree, DF$Plot), function(x) sample(x,1)) shall select random tree from each plot. Or you can get it in tabular form with sapply. Regards Petr [EMAIL PROTECTED] napsal dne 05.06.2007

[R] Odp: Odp: sampling problem - new to R

2007-06-06 Thread Petr PIKAL
Hi If I understand correctly, use split and sample with lapply. If DF is your dataframe lapply(split(DF$Tree, DF$Plot), function(x) sample(x,1)) shall select random tree from each plot. Or you can get it in tabular form with sapply. Regards Petr Sorry, you shall use resample from

[R] Odp: how to extract the maximum from a matrix?

2007-06-01 Thread Petr PIKAL
Hi If you have tried to go through help pages of max you could find out which function, which can tell you position of your maximum. which(x==max(x), arr.ind=T) Regards Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 01.06.2007 11:09:09: Dear UseRs, I have a very simple question

[R] Odp: A matrix with mixed character and numerical columns

2007-05-31 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 31.05.2007 12:48:11: Is it possible to have one? I have a data.frame with two character columns and 6 numerical columns. I converted to a matrix as I needed to use the col() and row() functions. However, if I convert the data.frame to a matrix, using

Re: [R] A matrix with mixed character and numerical columns

2007-05-31 Thread Petr PIKAL
)) } Is there any reason why these won't work? Am I oversimplifying it? Seems to me that both works. At least on data.frame I tried it. Regards Petr Mick -Original Message- From: Petr PIKAL [mailto:[EMAIL PROTECTED] Sent: 31 May 2007 12:57 To: michael watson (IAH-C) Cc: r-help

[R] Odp: pie initial angle

2007-05-29 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 29.05.2007 12:53:14: Dear all, I'd like to produce a simple pie chart for a customer (I know it's bad but they insist), and I have some difficulties setting the initial angle. For example: pie(c(60, 40), init.angle=14) and pie(c(80, 20),

[R] Odp: Odp: pie initial angle

2007-05-29 Thread Petr PIKAL
From simple geometry pie(c(x, y), init.angle=(300+y/2*360/100)-360) shall do what you request. Although I am not sure if it is wise. Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 29.05.2007 13:30:06: Hi [EMAIL PROTECTED] napsal dne 29.05.2007 12:53:14: Dear all,

[R] Odp: Showing NAs when using table()

2007-05-24 Thread Petr PIKAL
Hi problem is with your extra empty levels in your d factor. Without it d1-factor(d, exclude=NULL) d1 [1] ABNA NA BCABCABCAB C ABCABCABCABCABC Levels: A B C NA table(b,d1) d1 bA B

[R] Odp: reading a big file

2007-05-24 Thread Petr PIKAL
Hi One possibility is to use scan with combination of skip and nlines parameters in a body of for cycle and adding read portion to some suitable object. Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 23.05.2007 19:38:33: Dear All, I am on WindowsXP with 512 MB of RAM, R

[R] Odp: conversion into capital letter

2007-05-15 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 15.05.2007 08:41:27: Dear all, I would need a function which convert small letter into capital letter (at least the first letter of a character variable). Does such a function exist in R ? ?toupper, ?tolower Regards Petr Thanks by advance Jessica

[R] Odp: Anova Test

2007-05-15 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 15.05.2007 16:39:20: Hi, I am very new to R. I am trying to perform an Anova Test and see if it differs or not. Basically, i have 4 tests and 1 control. Tester Test1 Test2 Test3 Test4 Control 20 25 1510 17 The

Re: [R] Anova Test

2007-05-15 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 15.05.2007 17:32:35: Thank you Guys. Let say that from Test1 to control i have multiple data Tester Test1 Test2 Test3 Test4 Control 20 25 1510 17 . . . . . . . .

Re: [R] apply( )

2007-05-11 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 10.05.2007 17:59:22: or with(foo, (x y) * (x z)) Should not it be with(foo, ((x y) | (x z))*1) Regards Petr On 5/10/07, jim holtman [EMAIL PROTECTED] wrote: You don't need apply. Just do foo$result - ifelse((foo$x foo$y) | (foo$x

[R] Odp: axis space

2007-05-11 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 11.05.2007 11:30:28: Hello I have a problem. I have a plot, and have made the writing larger with cex.axis and cex.lab, and i is working great, BUT the writing is bigger than the window... for example, the y-axis writing misses the top of all letters.

[R] Odp: A simple question regarding plot of nls objects

2007-05-11 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 11.05.2007 11:12:21: Hi, I was trying to run the example of Indomethacin kinetics from the book: ## From Pinheiro/Bates, Mixed-Effects-Models in S and S-Plus, ## Springer, Second Printing 2001, Section 6.2 library(nlme) plot(Indometh) fm1Indom.nls -

[R] Odp: hi

2007-05-10 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 10.05.2007 11:08:31: hi, I have this error tr - sample(1:50, 25) train - rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3]) test - rbind(iris3[-tr,,1], iris3[-tr,,2], iris3[-tr,,3]) cl - factor(c(rep(s,25), rep(c,25), rep(v,25))) z - lda(train, cl)

[R] Odp: creating a new column

2007-05-09 Thread Petr PIKAL
Hi without knowing your code, R version and error message it is hard to say what is wrong. I think I answered already this or similar question but nevertheless: If your data are in data frame ifelse(mm$censoringTimemm$survivalTime,mm$survivalTime, mm$censoringTime) gives you a vector of

Re: [R] NAs introduced by coercion in dist()

2007-05-03 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 02.05.2007 16:47:55: It was suggested that the 'NAs introduced by coercion' message might be warning me that my data are not what they should be. I checked this using str(PeaksMatrix), as suggested, and the data seem to be what I thought they were:

[R] Odp: about using read.table

2007-05-03 Thread Petr PIKAL
Hi Did you see FAQ 2.16? Try file.choose() Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 03.05.2007 02:26:27: Hi,Dear R users, I have a file text nommed chif which contains 16 lines and 4 columns in the disc dur. I have a difficulty to read this file in R console I have

[R] Odp: help with plot axis

2007-05-03 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 03.05.2007 10:33:22: Hello i have a plot, and want the axis too be with larger writing, i found some functions but they didnt work this is my plot, and if the axis can be with bigger writing can the legend inside the plot be in same the size??

[R] Odp: hi

2007-05-03 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 03.05.2007 14:01:27: hi, I have a problem to use union function because one of the elements is a character and the others are numeric for(j in 1:length(I)) { + C1 - levels(factor(subset(donParEssai, Id_Essai == 1006961 Id_Cara == I[j], select =

[R] Odp: I need help

2007-05-02 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 02.05.2007 14:11:51: hello, I need help because I don't understand the syntaxe else how can I write it for example I writed a script to cut missings values and I have errors if(na==length(C)){ + pos=match(0,match(donGeno[[na-1]],donGeno[[na]],nomatch=0))

[R] Odp: simulation

2007-05-01 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 01.05.2007 09:03:46: Hello I would like to simulate datasets in the following way: x - rpois(999, 2000) y - sum(exp(rgamma(x, scale=2, shape=0.5))) You computed sum of your 999 values. Regardless of how many values are summed the result is always only

[R] Odp: adding column to a matrix

2007-05-01 Thread Petr PIKAL
Hi see ?ifelse ifelse(censoringsurvival, survival, censoring) Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 01.05.2007 13:25:18: l have the following dataset and would like to calculate the actual survival time by if censoring time survival time then actual survival time

[R] Odp: (no subject)

2007-04-24 Thread Petr PIKAL
steps) BTW split(don[, some.columns], don$Id_Cara) could maybe do what you want without using for cycle Regards Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 24.04.2007 11:48:48: I wanna display some data which there are subsets of a dataframe called don but there are errors

Re: [R] Calculating means in a new table

2007-04-24 Thread Petr PIKAL
Hi look at aggregate something like mymean-aggregate(mydata[,4:5], list( location, Spezies), mean) mysd-aggregate(mydata[,4:5], list( location, Spezies), sd) and then cbind(appropriate columns of resulting data frames) Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne

Re: [R] write

2007-04-24 Thread Petr PIKAL
Hi had you consider to look at help page? How do you expect your written file to be named? From help page write is a wrapper for cat, which gives further details on the format used cat is useful for producing output in user-defined functions. It converts its arguments to character strings,

[R] regular expression help

2007-04-18 Thread Petr PIKAL
very simple solution to it which I overlooked and examples in help page did not help me to find it. Thank you Best regards Petr Pikal [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] regular expression help

2007-04-18 Thread Petr PIKAL
Thank you all for your working solutions Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 18.04.2007 13:26:36: A backreference is contained in parentheses and there are no parentheses in your regular expression, hence the error message. Its probably easiest just to remove all non

Re: [R] Matrix manipulation

2007-04-16 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 16.04.2007 14:52:55: Hi, This is a very basic question, but apparently I am too stupid for it. I have a large matrix A, and I need to avoid for loops. How could I apply a function f(a,r,c) on each element of A, using the subscript (row and column) of a as

Re: [R] Looping through series of names

2007-04-12 Thread Petr PIKAL
Hallo [EMAIL PROTECTED] napsal dne 11.04.2007 22:45:19: Hi I am very new to R and have not able to find the answer to my question in the manual or any other post. I have a dataset that has various different sites names with data relating to each site. The data is in one dataset. I want

Re: [R] Tweaking my plot of matrix as image

2007-04-12 Thread Petr PIKAL
probably want. And if you have different matrix size then 1:dim(your.matrix)[1] can give you suitable sequence. Regards Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 12.04.2007 10:55:21: Greetings list, I have a rectangular 20 x 20 matrix with values in the range of [0 , 1]. I'd

Re: [R] plot log scale, axis original scale

2007-04-11 Thread Petr PIKAL
AT is not at. Regards Petr Petr PIKAL wrote: Hi [EMAIL PROTECTED] napsal dne 09.04.2007 22:10:22: I want to produce some boxplots and plot the logged values but have the axis scale in the original, not-logged scale. It seeming like I have the first few steps but I'm

Re: [R] tapply

2007-04-10 Thread Petr PIKAL
Hallo Seems to me that you can make a summary table using aggregate(RESPONSE, list(TREATMENT, MEASUREMENT, BLOCK, STUDY), mean) and then if you want you can use reshape function or melt/cast function from reshape package to get wide form of your table. Regards Petr Pikal [EMAIL PROTECTED

Re: [R] plot log scale, axis original scale

2007-04-10 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 09.04.2007 22:10:22: I want to produce some boxplots and plot the logged values but have the axis scale in the original, not-logged scale. It seeming like I have the first few steps but I'm having trouble with the last. Here's what I'm doing (which I got

[R] Odp: Question about R

2007-04-05 Thread Petr PIKAL
Hi isnt it a homework? FYI see ?list ?vector ?data.frame ?sample ?lapply and some basic stuff like Introduction manual provided with your R instalation to see how some simple data manipulations can be done. Regards Petr Pikal [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 05.04.2007 05:58

[R] Odp: problem for use R

2007-04-05 Thread Petr PIKAL
files. Other posibility is to use RODBC - see Data Export/Import manual. If you want to write some data and use it in Excel they shall be in matrix or data.frame form and use write.table(, sep=\t, row names= FALSE). The file can be directly used by Excel. Regards Petr Pikal [EMAIL PROTECTED

Re: [R] reading of a matrix

2007-04-05 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 05.04.2007 12:50:09: Dear R-experts, I still have problems with the reading of a matrix. Input: matrixData6.txt A-Paar B-Paar C-Paar D-Paar E-Paar A 1 3 5 7 9 B 2 4 6 8 10 R-commands:

Re: [R] package for Matlab

2007-04-05 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 05.04.2007 15:24:57: Hallo, does a package for Matlab exist in R? You probably could get quicker answer trying to use some search posibilities provided by CRAN. In first few hits from Rseek there is a package R.matlab. I hope it can be installed by a standard

[R] Odp: converting a list to a data.frame

2007-04-03 Thread Petr PIKAL
Hi do.call(cbind, your.list) # or rbind gives you rectangular matrix, however shorter items in list are recycled as necessary. Problem is that you need to specify how shall be shorter items handeled as it is not obvious. One possibility could be add NAs to positions where you want them, what

[R] Inquiry

2007-03-30 Thread Petr PIKAL
Petr Pikal [EMAIL PROTECTED] - Postoupil do Petr PIKAL/CTCAP dne 30.03.2007 15:47 - Petr PIKAL/CTCAP napsal dne 30.03.2007 15:01:58: Hi Do you mean rounding. If yes you can consult ?round, ?floor, ?ceiling. If you want just to print different amount of digits you can look

Re: [R] Import of a workspace into R

2007-03-27 Thread Petr Pikal
@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. Petr Pikal [EMAIL PROTECTED] __ R-help

Re: [R] Prefered date and date/time classes

2007-03-27 Thread Petr Pikal
@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. Petr Pikal [EMAIL PROTECTED

Re: [R] subtotal for same row data

2007-03-25 Thread Petr Pikal
-contained, reproducible code. Petr Pikal [EMAIL PROTECTED] __ 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

Re: [R] Detailed legend in mathplot ...

2007-03-21 Thread Petr Pikal
/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Petr Pikal [EMAIL PROTECTED] __ 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

Re: [R] Bad points in regression

2007-03-16 Thread Petr Pikal
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Petr Pikal [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] how to...

2007-03-15 Thread Petr Pikal
__ 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. Petr Pikal [EMAIL PROTECTED

Re: [R] autoload libraries at startup

2007-03-11 Thread Petr Pikal
__ 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. Petr Pikal [EMAIL PROTECTED

Re: [R] Removing duplicated rows within a matrix, with missing data as wildcards

2007-03-08 Thread Petr Pikal
] __ 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. Petr Pikal [EMAIL PROTECTED

Re: [R] Multi-line plots with matrices in R

2007-03-07 Thread Petr Pikal
, reproducible code. Petr Pikal [EMAIL PROTECTED] __ 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

Re: [R] Plotting a broken line?

2007-03-07 Thread Petr Pikal
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Petr Pikal [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] how to apply functions to unbalanced data in long format by factors......cant get by or aggregate to work

2007-03-07 Thread Petr Pikal
, reproducible code. Petr Pikal [EMAIL PROTECTED] __ 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

Re: [R] plot(): I want to display dates on X-axis.

2007-03-05 Thread Petr Pikal
@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. Petr Pikal [EMAIL PROTECTED] __ R

Re: [R] number of levels for a factor

2007-03-02 Thread Petr Pikal
, reproducible code. Petr Pikal [EMAIL PROTECTED] __ 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

Re: [R] label histogram question

2007-03-02 Thread Petr Pikal
read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Petr Pikal [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Reformulated matrices dimensions limitation problem

2007-03-02 Thread Petr Pikal
-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Petr Pikal [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] plot of 2 time series with very different values

2007-03-02 Thread Petr Pikal
=format)) } if(yylab[2]==) mtext(deparse(substitute(yleft)),side=2,line=2, col=col[2], ...) else mtext(yylab[2],side=2,line=2, col=col[2], ...) if (linky) lines(x,yleft,col=col[2], lty=2, ...) if (smooth!=0) lines(supsmu(x,yleft,span=smooth),col=col[2], lty=2, lwd=lwds, ...) } Petr Pikal [EMAIL

  1   2   3   4   5   6   7   8   >