avg_temp: Average Temperatures Trend

Description Usage Arguments Author(s) Examples

Description

This function helps you analyze global as well as countries average temperatures trend during a specified time period. You can use it to do comparison between countries. Also, you can analyze both yearly average temperature and monthly temperature trend.

Usage

1
2
avg_temp(data = GlobalTemperatures, type, year, month, country,
  con = "FALSE")

Arguments

data

Dataset to use for plot. Use GlobalTemperatures or GlobalLandTemperaturesByCountry dataset to do analysis.

type

A vector giving which type of trend you want to plot. 1 indicates yearly trend. 2 indicates monthly trend. c(1,2) indicates both yearly and monthly average temperature trend.

year

A vector. Time period during which you want to analyze how the temperature changed.

month

A vector. You want to analyze the temperature trend in these months.

country

A vector of countries' name. Compare how the temperature changed in these countries during a specified time period.

con

Display confidence interval around smooth? (TRUE for confidence interval. FALSE by default)

Author(s)

Annie Yang

Examples

1
2
3
4
avg_temp(data=GlobalLandTemperaturesByCountry, type=c(1,2),
year=c(2000:2015), month=3, 
country = c("Afghanistan","Andorra"),con="T")
avg_temp(data=GlobalTemperatures, type=c(1,2),year=c(2000:2013),month=c(1:12))

PHP2560-Statistical-Programming-R/r-package-beautiful-day documentation built on May 30, 2019, 3:50 p.m.