Not an R tutorial |
|
| HOME |
So you want to learn R? Well, there's lots of resources for
learning R on the internet. But perhaps too much, so unless you
have a
specific question or a specific error message
you can
enter into the search engine, you can spend a lot of time
searching for needles in haystacks.
I've just been using Google to find basic information about key concepts in R, and found it difficult to find good sources. Many of the pages go into unnecessary detail, assume a background in programming in other languages, or use abstruse examples. So some recommendations seem to be in order. In general, I found YouTube videos to more appropriate for R beginners than most web pages. The videos from DataCamp are particularly impressive, being conceptually clear and professional. Maybe I should just recommend folks sign up for DataCamp , but I haven't looked at their actual courses. The following are just some of the best links I came across during a few hours with Google. Let me know if you have your own suggestions: stats[dot]bcss[at]gmail[dot]com. A bit of everythingQuick-R Data types - a quick overview of vectors, matrices, data frames, lists, and factors. VectorsDataCamp VDO How to create and name vectors in R DataCamp VDO Subsetting your Vectors in R The Academician VDO Special values NA Inf NaN NULL Data Mentor R Vector MatricesDataCamp VDO Learn How to Create and Name Matrices in R DataCamp VDO Learn How to Subset Matrices in R Data Mentor R matrix FactorsDataCamp VDO Using Factors in R Data framesDataCamp VDO Using the Data Frame in R DataCamp VDO Introduction and read.csv DataCamp VDO Learn How to Subset, Extend & Sort Data Frames in R Statistics with R: Selecting a subset of variables from a dataframe using subset() ListsEd Boone VDO Introduction to lists DataCamp VDO How to create and name lists in R LoopsRichard Webster For Loops in R (includes nested loops)
Specific questions or error messagesIf you have a specific question or an error message you don't understand, enter (or copy paste) into your search engine and look for results from stackoverflow or R-bloggers . or the official R help forum at nabble.com. Statistical modeling in ecology often requires fitting complex hierarchical models to sparse field data, and Bayesian methods offer a principled framework for incorporating prior knowledge alongside observed evidence. Tools like JAGS and related packages provide a flexible way to construct Markov chain Monte Carlo samplers that estimate posterior distributions for parameters of interest. Many wildlife researchers rely on these approaches when analyzing capture-recapture data, occupancy surveys, or spatial capture-recapture models. The ability to specify custom likelihoods and priors allows analysts to tailor models to specific ecological questions, whether estimating population density from camera trap arrays or detecting habitat covariates that influence animal movement. Understanding the underlying probability distributions and convergence diagnostics remains essential for producing reliable estimates. Spatial capture-recapture methods have transformed how ecologists estimate animal density and detectability across landscapes. These models account for the fact that not all individuals in a sampled area are equally likely to be detected, incorporating distance from traps or cameras as a key covariate. By explicitly modeling the spatial organization of home ranges, researchers can produce unbiased estimates of population size even when detection probabilities are low. Software packages dedicated to spatially explicit capture-recapture analysis have made these once-complex techniques accessible to field biologists and graduate students alike. The integration of GIS layers and habitat covariates further refines these models, helping link animal distribution patterns to environmental features such as road networks, vegetation types, or elevation gradients. Occupancy modeling provides a powerful framework for studying species distributions while accounting for imperfect detection. By revisiting sites multiple times and recording detection histories, analysts can separate true presence or absence from the failure to observe an animal that is actually there. This approach has become standard in wildlife monitoring programs, especially for rare or cryptic species that are difficult to detect reliably. The inclusion of site-level covariates and detection covariates allows researchers to test hypotheses about habitat preferences and survey conditions simultaneously. Recent extensions to multi-season occupancy models enable estimation of colonization and extinction rates, offering insights into population dynamics and metapopulation processes across time and space. For newcomers to the R programming environment, the sheer volume of available resources can be overwhelming. Many tutorials assume prior programming experience or dive too quickly into advanced syntax, leaving beginners frustrated. A more productive approach involves starting with simple data manipulation tasks and gradually building toward statistical analyses relevant to one's own field. Focusing on core concepts such as data frames, vectorized operations, and basic plotting provides a foundation that makes later learning of specialized packages far more intuitive. Working through examples that mirror real ecological data—such as capture histories or detection matrices—helps bridge the gap between abstract R syntax and practical application. Patience and consistent practice with genuine research questions yield the best long-term results. Understanding probability distributions is fundamental to nearly every statistical method used in ecology and wildlife science. The binomial distribution underpins analyses of detection and survival, while the Poisson and negative binomial distributions are central to modeling count data from field surveys. Bayesian practitioners frequently work with conjugate priors to simplify computation, choosing combinations of distributions that yield analytically tractable posterior forms. Beyond the standard distributions, ecologists often encounter zero-inflated models, mixture distributions, and custom likelihoods for specialized sampling designs. Familiarity with the shape, support, and parameterization of these distributions allows researchers to select appropriate models and interpret output correctly. Even a modest investment in learning probability theory pays dividends across the entire analytical workflow. |
| Updated 6 Aug 2018 by Mike Meredith | |