Search results

  1. D

    Help adding new column by indexing

    I have a dataset that looks something like this structure(list(Red = c(65.76, 57.07, 32.93, 43.78, 189.55, 115.87, 72.96, 51.84, 52.39, 59.03, 70.37, 83.95, 44.98, 47.38, 73.32, 108.53, 50.21, 54.44, 56.9, 53.06, 173.95, 153.75, 69.81, 27.01, 21.24), Green = c(15.22, 162.1, 65.84...
  2. D

    A little help with looping..

    Below is a similar to a data set I am working with... I am struggling to write a loop that would go through the data and add a new column 'Rank' based on the other two columns.. So for example if the 'Color' = 'red' and measure between 0-2 then it would have a rank of 1 'Color - 'red'...
  3. D

    Rearranging a dataset in R

    Hello, So I currently have a dataset that is like this: structure(list(FID = structure(1:10, .Label = c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J"), class = "factor"), Treatment = c(1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L), Territorial = structure(c(2L, 1L, 2L, 1L, 2L, 2L, 1L...
  4. D

    Binomial model with 'complete separation' ...?

    Hello All, I have a data set that is similar to this.. structure(list(d.in.p = c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), time2 = c(0, 0.30209836793605, 0.292033542976939, 0.00731537389688806, 0, 0, 0.0249544211485871, 0, 0.368636194723151...
  5. D

    adding significance codes and error bars on paired bar plot

    Hello, I have a dataset like so.. structure(list(meanvalue = c(0.38172, 0.8684, 0.854675, 0.907025, 0.7551, 0.9726, 0.99575, 0.80785, 0.45462, 0.719575, 0.64908, 0.613333333333333, 0.9972, 0.70095), day = 1:14, random = c(0.336, 0.336, 0.336, 0.336, 0.336, 0.336, 0.336, 0.336, 0.336...
  6. D

    Adding Multiple Sample Size Values to a Box plot

    Hello, I am working on a boxplot where I would like the N (sample size) to be displayed on each box and also the different number of trials that the samples came from.. I have some sample data as follows: structure(list(Female.Name = structure(c(3L, 3L, 3L, 5L, 5L, 5L, 5L, 4L, 4L...
  7. D

    Adding a trend line to a series of box plots

    If this is so obvious everyone should know I apologize for the inconvenience. I would like to add a color coded trend line to a series of box plots (graph attached).. Any help is much appreciated.. The code I have used for the graph is as follows: boxplot(total1$y~total1$x) The data...
  8. D

    Writing a mean loop.. (literally)

    So my test data looks like this: structure(list(day = c(1L, 1L, 2L, 2L, 2L, 3L, 3L, 4L, 4L, 4L ), Left = c(0.25, 0.33, 0, 0, 0.25, 0.33, 0.5, 0.33, 0.5, 0), Left1 = c(NA, NA, 0, 0.5, 0.25, 0.33, 0.1, 0.33, 0.5, 0), Middle = c(0, 0, 0.3, 0, 0.25, 0, 0.3, 0.33, 0, 0), Right = c(0.25...