diff --git a/examples/A first look at R/1-Getting_Started_with_R.R b/examples/A first look at R/1-Getting_Started_with_R.R index c608d96..3b6c427 100644 --- a/examples/A first look at R/1-Getting_Started_with_R.R +++ b/examples/A first look at R/1-Getting_Started_with_R.R @@ -141,6 +141,9 @@ dim(diamondSample) # For now we will see how easy it is to produce bare bones plots with # the base graphics system. +# Set the font size so that it will be clearly legible. +theme_set(theme_gray(base_size = 18)) + # In this sample you use ggplot2. ggplot(diamondSample, aes(x = carat, y = price)) + geom_point(colour = "blue") diff --git a/examples/A first look at R/2-Introduction_to_ggplot2.R b/examples/A first look at R/2-Introduction_to_ggplot2.R index 8c9d09f..4260b3e 100644 --- a/examples/A first look at R/2-Introduction_to_ggplot2.R +++ b/examples/A first look at R/2-Introduction_to_ggplot2.R @@ -4,14 +4,18 @@ # beautiful plots by describing the plot structure. # Install and load the packages. +options(warn = -1) if (!require("ggplot2", quietly = TRUE)) - install.packages("ggplot2") + install.packages("ggplot2", quiet = TRUE) # mapproj is required for map projections. -if (!suppressPackageStartupMessages(require("mapproj", quietly = TRUE))) - install.packages("mapproj") +#if (!suppressPackageStartupMessages(require("mapproj", quietly = TRUE))) +# install.packages("mapproj") +if (!require("mapproj", quietly = TRUE)) + install.packages("mapproj", quiet = TRUE) +options(warn = 0) library("ggplot2", quietly = TRUE) -suppressPackageStartupMessages(library("mapproj", quietly = TRUE)) +library("mapproj", quietly = TRUE) # R has a number of built-in datasets. # In this example you use the dataset called quakes. diff --git a/examples/MRS_and_Machine_Learning/Benchmarks/MRO-MKL-benchmarks.R b/examples/MRS_and_Machine_Learning/Benchmarks/MRO-MKL-benchmarks.R index 4243538..3470115 100644 --- a/examples/MRS_and_Machine_Learning/Benchmarks/MRO-MKL-benchmarks.R +++ b/examples/MRS_and_Machine_Learning/Benchmarks/MRO-MKL-benchmarks.R @@ -2,8 +2,24 @@ # computations. This script runs performance benchmarks using different # numbers of threads -# The test uses the package "version.compare", available on github -# Install this package first, if it is not already installed +# The test uses the package "version.compare", available on GitHub. +# Install this package first, if it is not already installed. +# It uses RevoMultiBenchmark, and so requires that Microsoft R Server be installed. + +# Check whether Microsoft R Server (RRE 8.0) is installed +if (!require("RevoScaleR")) { + cat("RevoScaleR package does not seem to exist. + \nThis means that the functions starting with 'rx' will not run. + \nIf you have Microsoft R Server installed, please switch the R engine. + \nFor example, in R Tools for Visual Studio: + \nR Tools -> Options -> R Engine. + \nIf Microsoft R Server is not installed, you can download it from: + \nhttps://www.microsoft.com/en-us/server-cloud/products/r-server/ + \n") + + quit() + } + if (!require("version.compare")){ (if (!require("devtools")) install.packages("devtools")) @@ -30,6 +46,7 @@ threadsToTest <- if(exists("setMKLthreads")){ 1 } + # Run the benchmark tests # Set scale.factor to 1 for the full tests, lower than 1 for tests on # reduces data set sizes