tag:blogger.com,1999:blog-89140070649671711552024-03-24T07:10:04.218+00:00Benjamin Bell: BlogBlog related to climate and environmental research, using R for data analysis, data science and for GIS.Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.comBlogger39125tag:blogger.com,1999:blog-8914007064967171155.post-11640880647914334842022-12-05T13:09:00.004+00:002022-12-05T18:09:36.207+00:00Loops in R: Nested loops<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Loops in R: Nested loops -->
<!-- Tags: R, programming, loops, for loops, nested loops, iteration, vectorization, automation -->
<!-- Search description: Part 2 of my guide to writing loops in R. This takes a look at nested loops, and how to write them in R. Nested for loops. R programming. -->
<!-- Post Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-11720639087513135562022-11-03T12:51:00.005+00:002022-11-14T20:13:27.322+00:00BES Masterclass: Using R for mapping and spatial analysis<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: BES Masterclass: Using R for mapping and spatial analysis-->
<!-- Tags: R, BES, maps, terra, sf, presentation -->
<!-- Search description: BES Masterclass in R seminar series - creating maps and doing spatial analysis in R -->
<!-- Post Summary (appears on main page) -->
<!-- End post summary -->
Today I Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-83523722130497363382022-06-28T18:21:00.001+01:002022-06-28T18:21:15.699+01:00Fixing the default plot window on Linux for high DPI displays<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Fixing the default plot window on Linux for high DPI displays -->
<!-- Tags: R, Linux, graphics, high-DPI-->
<!-- Search description: How to change the size of the default R plot window on Linux. Fix R's plot window for high-DPI displays on Linux. -->
<!-- Post Summary (appears on main page) -->
Running R on Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-87131695738850424232021-10-24T18:18:00.009+01:002022-12-05T18:26:36.034+00:00Introduction to loops in R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Writing loops in R -->
<!-- Tags: R, programming, loops, for loops, iteration, vectorization, automation -->
<!-- Search description: This guide explains how to write loops in R to automate and repeat R code including for loops, while loops. It also gives an overview of vectorized functions in R. R programmingBenhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-88564922992304635252021-08-24T19:27:00.002+01:002021-08-24T19:28:22.675+01:00Getting started with REver wanted to try R, but wasn't sure where to start? Or perhaps you are unsure of what R is and what it can do?
New for 2021, I have completely rewritten, revised and greatly expanded my introduction to R guide. Additionally, I have added additional guides for importing data into R, and to give an overview of R graphics and creating plots (see below).
The introduction guide is now much moreBenhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-46792718399350783832021-08-24T19:07:00.010+01:002021-08-24T19:17:56.590+01:00Getting started with R: Importing data into R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Getting started with R: Importing data into R -->
<!-- Tags: R, introduction, importing data, data classes, csv files, excel spreadsheets -->
<!-- Search description: An introduction to R, covering everything to get you started using R. This guide shows you how to import your existing data to R from csv files Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-26584066294102884972021-08-24T19:03:00.008+01:002021-08-24T19:12:52.696+01:00Getting started with R: An overview of graphics in R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Getting started with R: An overview of graphics in R -->
<!-- Tags: R,plots,graphics,graphs,charts,visualization,devices,Cairo -->
<!-- Search description: This guide provides an overview of the graphical systems and graphics devices in R, and the plotting functions for data visualisation and data presentationBenhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-8134462619770574882021-08-12T18:46:00.005+01:002021-08-12T18:49:33.241+01:00Updates
Hello! you may have noticed a lack of updates to the blog in the last two years. This was in part due to me buying a house and spending a long time renovating it (and the garden), which took up most of my spare time. Since that is now *mostly* complete (it is never complete), I am able to spend some time updating the blog again.
Since i first started the blog, I have become more experienced inBenhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-5675294547711811692019-08-22T15:56:00.021+01:002021-08-12T07:59:42.334+01:00Bathymetric maps in R: Getting and plotting data<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Bathymetric maps in R: Getting and plotting data -->
<!-- Tags: R, maps, mapping, bathymetric, bathymetry, ETOPO1, GEBCO2019, DEMs-->
<!-- Search description: How to create bathymetric maps in R using freely available bathymetry data and the raster package. Part 2 shows you how to create and use effective Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-85229374048301063932019-08-22T15:55:00.004+01:002021-08-12T08:27:12.453+01:00Bathymetric maps in R: Colour palettes and break points<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Bathymetric maps in R: Colour palettes and break points -->
<!-- Tags: R, maps, mapping, bathymetric, bathymetry, ETOPO1, GEBCO2019, DEMs-->
<!-- Search description: How to create bathymetric maps in R using freely available bathymetry data and the raster package. Part 2 shows you how to create and use Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com3tag:blogger.com,1999:blog-8914007064967171155.post-31497213742425618292019-08-16T17:50:00.001+01:002021-08-12T08:32:12.951+01:00DEMs and where to find them
<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: DEMs and where to find them -->
<!-- Tags: R, GIS, maps, mapping, DEM, SRTM, GMTED2010, ASTER, ALOS, raster -->
<!-- Search description: Where to find free Digital Elevation Models (DEMs), and how to download the data and use them in R -->
<!-- Post Summary (appears on main page) -->
Digital Elevation Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-44055374023954399672019-08-12T19:57:00.002+01:002021-08-12T08:35:13.040+01:00Creating simple location maps in R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Creating simple location maps in R -->
<!-- Tags: R, GIS, maps, mapping, location, raster -->
<!-- Search description: How to create simple location maps in R. No previous GIS skills needed. Easily create good looking maps using DEMs and vector data freely downloadable, all from within R, without the need forBenhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com9tag:blogger.com,1999:blog-8914007064967171155.post-850482868483894032019-04-01T09:00:00.004+01:002021-08-12T09:15:36.743+01:00How to add error bars in R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: How to add error bars in R -->
<!-- Tags: R, error bars, graphics-->
<!-- Search description: How to add error bars to plots in R using base graphics -->
<!-- Post Summary (appears on main page) -->
R has no error bar function? Surely not!
Well, yes and no. Error bars can be added to plots using the arrowsBenhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com3tag:blogger.com,1999:blog-8914007064967171155.post-8546512573333523962019-01-25T09:00:00.003+00:002021-08-12T09:15:27.278+01:00Quick guide to opening files from within R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Quick guide to opening files from within R -->
<!-- Tags: R, shell, system -->
<!-- Search description: A quick guide to opening files from within R using R code - no need to open file explorer (or similar) to hunt down a file. Just open it from within R using a small bit of R code. -->
<!-- Post Summary (Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-8754342072039252632018-12-12T14:33:00.003+00:002018-12-12T14:35:36.719+00:00Updates
Apologies for lack of blog updates recently, I am pleased to say I recently started a new job researching glaciers and environmental change in the High Atlas, Morocco, which is keeping me busy! We have just launched a new website for the project, so please check it out to find out more! https://www.highatlasresearch.com/
As well as my new job role, I have also been working on a brand new Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-87381003546242377792018-08-12T13:52:00.001+01:002019-07-08T19:20:26.030+01:00EPPC 2018 Dublin: Atlas cedar pollen geochemistry<!-- Benjamin Bell Blogger post template http://www.benjaminbell.co.uk -->
<!-- Post Summary (appears on main page) -->
<!-- Title: EPPC 2018 Dublin - Atlas cedar pollen geochemistry -->
<!-- Tags: eppc2018,pollen,cedrus,carbon -->
<!-- Search description: Pollen geochemistry of Atlas cedar - EPCC 2018 Dublin - Stable isotope analysis, biomarker analysis and pollen isolation methods. -->
<!-- Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-77432428984748024902018-06-19T15:57:00.004+01:002021-08-12T09:13:56.882+01:00Interpolating gridded datasets in R: UV-B data<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Interpolating gridded datasets in R: UV-B data-->
<!-- Tags: R, interpolation, datasets, UV-B -->
<!-- Search description: How to interpolate gridded datasets using bilinear interpolation in R. Interpolating data using R. Interpolating glUV global radiation data. -->
<!-- Post Summary (appears on main page) -Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com1tag:blogger.com,1999:blog-8914007064967171155.post-74015634762384443392018-06-11T15:03:00.000+01:002019-07-08T19:24:21.585+01:00How pollen geochemistry can tell us about historic UV-B levels<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Post Summary (appears on main page) -->
<!-- Title: How pollen geochemistry can tell us about historic UV-B levels -->
<!-- Tags: pollen, geochemistry, Holocene, publishing -->
<!-- Search description: How pollen geochemistry can be used to tell us about historic UV-B levels, using Cedrus atlantica pollen in Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-38137206633681167662018-04-18T12:33:00.005+01:002021-08-12T10:10:52.174+01:00Walter and Lieth climate diagrams in R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Walter and Lieth climate diagrams in R -->
<!-- Tags: R, climate, CRU, diagrams -->
<!-- Search description: How to create Walter and Lieth climate diagrams in R. This guide explains what a Walter and Lieth climate diagram is, what data you need to create one (and where to get it), and how to do it using the "Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com9tag:blogger.com,1999:blog-8914007064967171155.post-52614800441966718702018-04-04T10:27:00.000+01:002018-04-04T10:27:10.811+01:00High resolution photos of Cedrus atlantica and Cedrus deodara pollenLast year I published a paper on the pollen morphology of Cedrus atlantica (Atlas cedar) pollen. As part of this study I took several light microscope (LM) and scanning electron microscope (SEM) photos of the pollen grains.
Some of the photos were published as part of the paper which is available open access here: https://doi.org/10.1080/01916122.2017.1356760, although the photos were scaled Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-8710470320368282332018-03-22T11:14:00.002+00:002021-08-12T10:15:50.303+01:00Useful functions for manipulating text in R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Useful functions for manipulating text in R -->
<!-- Tags: R, text, abbreviate, trim, strtrim, character, strings, paste -->
<!-- Search description: R has really useful functions for manipulating text or character strings. This guide will take a look at abbreviate(), strtrim() and paste(), which allow you to Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-14432788029689404292018-03-13T13:52:00.001+00:002021-08-12T10:18:21.815+01:00Quick guide to annotating plots in R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Quick guide to annotating plots in R -->
<!-- Tags: R, plots, annotation, arrows, polygons, shapes -->
<!-- Search description: R has powerful graphical capabilities, and it is possible to create almost any kind of graph, chart or plot. It also has powerful annotation options, allowing you to write and draw Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0tag:blogger.com,1999:blog-8914007064967171155.post-68647885326220577282018-03-06T13:05:00.003+00:002021-08-12T10:32:25.216+01:00Principal Components Analysis (PCA) in R - Part 2<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Principal Components Analysis (PCA) in R - Part 2-->
<!-- Tags: R, PCA, prcomp, plotting, biplots, convex_hulls -->
<!-- Search description: How to do Principal Components Analysis (PCA) in R using prcomp(), and how to create beautiful looking biplots using R base functionality - Part 2: Adding loadings plots,Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com2tag:blogger.com,1999:blog-8914007064967171155.post-55405661686520983112018-02-26T11:44:00.011+00:002021-08-12T17:14:08.286+01:00Quick guide to pch symbols in R <!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Quick guide to pch symbols in R -->
<!-- Tags: R, pch, graphics, symbols -->
<!-- Search description: A reference guide to pch symbols in R, from the default symbols to ASCII characters. How to style them by changing colour, size and line widths, and code examples. -->
<!-- Post Summary (appears on main page)Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com4tag:blogger.com,1999:blog-8914007064967171155.post-20332285139420585962018-02-26T11:34:00.004+00:002021-08-12T18:28:42.783+01:00Quick guide to line types (lty) in R<!-- Benjamin Bell Blogger post template https://www.benjaminbell.co.uk -->
<!-- Title: Quick guide to line types (lty) in R -->
<!-- Tags: R, lty, graphics, lines, plotting -->
<!-- Search description: A reference guide to line types in R which you can use for plotting and for R graphics. The guide will also show you how to specify your own line types, and will also cover line join and end Benhttp://www.blogger.com/profile/01959819949985026517noreply@blogger.com0