[R] Putting subscript in facet_grid label of ggplot

2016-02-11 Thread Harun Rashid via R-help
Hello, I am having trouble with putting subscript in facet_grid label. Here is an example of the work I have been trying to do. > df<-data.frame(species=gl(2,10,labels=c('sp1','sp2')),age=sample(3:12,40,replace=T),variable=gl(2,20,labels=c('N1P1 var','N2P1 var')),value=rnorm(40)) >

Re: [R] Subsetting dataframe by the nearest values of a vector elements

2015-11-10 Thread Harun Rashid via R-help
249) >> and your other vector looked like this >> c(0, 50, 100, 150, 200, 250, 300, 350) >> what would you want your subset to look like? >> >> Jean >> >> On Mon, Nov 9, 2015 at 7:26 AM, Harun Rashid via R-help < >> r-help@r-project.org> wrote: &

[R] Subsetting dataframe by the nearest values of a vector elements

2015-11-09 Thread Harun Rashid via R-help
Hello, I have a dataset with two columns 1. cross_section (range: 0~635), and 2. elevation. The dataset has more than 100 rows. Now I want to make a subset on the condition that the 'cross_section' column will pick up the nearest cell from another vector (say 0, 50,100,150,200,.,650). How