I'm basiclly completly new to R, but I'm required to use it for a paper I'm writing at. So far I was able to get the basics like, summary and getting the overall arihmetic means and so on. My Problem now is, That I basiclly have two factor of Data that I aquired
One is the kind of Data (One is the Estaury of the bird species I'm writing about, the other is Control Plots. Than this two are divided into a South and Noth Area. So now I need to compare North, South and Control Plots and estuarys. So for example I want the mean of all Northern estuarys and than off all Southern control plots. I don't really get around how to do this, I was thinking about with a data frame maybe?
Yes, you should load the data into a data frame. You can then use functions from the dplyr package to group the data and compute means. Here is an example using data I invented where E and C represent Estuary and Control and N and S represent North and South.
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
#Invent data
DF <- data.frame(Kind=c("E","E","E","E","C","C","C","C"),
Loc=c("N","S","N","S","N","S","N","S"),
Value=runif(n = 8,min = 10,max = 25))
print(DF)
#> Kind Loc Value
#> 1 E N 11.82269
#> 2 E S 10.01236
#> 3 E N 13.66709
#> 4 E S 12.81534
#> 5 C N 18.59053
#> 6 C S 23.57225
#> 7 C N 23.96505
#> 8 C S 12.88673
DF_means <- DF |> group_by(Kind,Loc) |> summarize(Avg=mean(Value))
#> `summarise()` has grouped output by 'Kind'. You can override using the `.groups` argument.
DF_means
#> # A tibble: 4 x 3
#> # Groups: Kind [2]
#> Kind Loc Avg
#> <chr> <chr> <dbl>
#> 1 C N 21.3
#> 2 C S 18.2
#> 3 E N 12.7
#> 4 E S 11.4
Ok Thanks, thats helping already. So I need to put in every Point from hand? (There have been 88 Data points) Is there a faster method, or do I misunderstand something completly?
You can read the data from an excel file into a data frame. One way to do that is to use a package like readxl and its function read_excel(). You can install the package with