[R] how to sort a column with numbers and characters

2015-01-11 Thread raz
9 90 91 92 93 94 95 96 97 98 S Z ​Thanks, Raz​ -- \m/ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Compare data in two rows and replace objects in data frame

2014-08-04 Thread raz
r (j in 6:144){ if (AX[i,j]==1 & AX[i+1,j]==0){ AX[i,j]<-'A' } if (AX[i,j]==0 & AX[i+1,j]==1){ AX[i,j]<-'B' } if (AX[i,j]==1 & AX[i+1,j]==1){ AX[i,j]<-'HT' } if (AX[i,j]==1 & AX[i+1,j]=="-"){ AX[i,j]<-'Aht' } if (AX[i,

[R] create new column by replacing multiple unique values in existing column

2014-09-11 Thread raz
be substituted according to their unique values e.g "A1" will be "1", "A2" will be "2" and so on (this is only a part of a large table). It would be better if I could change all unique values in dat1 to numbers 1:unique(n). if not then how do I change all

[R] how can I count data points outside the main plot line?

2016-03-29 Thread raz
that dont fit, any ideas? Thanks, Raz -- \m/ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] italic font for legend text when using expression function for symbols

2013-01-23 Thread raz
Hello, I'm trying to add a symbol (Delta) to plot legend with text using "expression(paste())" but this disables the text.font that allows to use bold or italic text. as follows: x=c(1:10) y=c(1:10) plot(x,y) legend(1,10,legend=c("A","B","C",expression(paste(Delta, D))), pch=c(24,18,17,16),

[R] Tukey test for subgroups in a data frame

2012-11-13 Thread raz
Hello, I have a data frame with the following columns: "date","name","value" the name is the same for each date I would like to get TukeyHSD p-value for the differences of "value" between "name"s in each "date" separately I tried different ANOVA (aov()) but can only get either tukey by "name" or b

[R] Physically extracting P-value from TukeyHSD test output

2012-12-12 Thread raz
Hey, I have this TukeyHSD output from which I would like to extract only the P-values (p adj, last number). The problem is that the test output is a character list. How can I "break" this sentence to separate the Pv? Tukey multiple comparisons of means 95% family-wise confidence level Fit:

[R] compare two rows in same column in data farme

2014-01-02 Thread raz
Hi, I would like to compare row data in the same column through a data frame and remove all rows that do not fit the criteria. for example if I have the following data frame: line start A1 21 A2 22 A3 23 B4 19 B2 24 B6 12 I would like to compare the 'start' value of each line to the value

[R] Conditional error bars

2013-11-27 Thread raz
How can I condition any error bar function that use the arrows() function, such as 'CI.plot' (see example below) or 'error.bars', to draw only upper error bar (upper CI) if the bar value (mean) is positive and the lower error bar (lower CI) if bar value is negative? CI.plot <- function(mean, se,le