Converting areas to metric 1
In this chapter, you'll be working with grain yield data from the United States Department of Agriculture, National Agricultural Statistics Service. Unfortunately, they report all areas in acres. So, the first thing you need to do is write some utility functions to convert areas in acres to areas in hectares.
To solve this exercise, you need to know the following:
- There are 4840 square yards in an acre.
- There are 36 inches in a yard and one inch is 0.0254 meters.
- There are 10000 square meters in a hectare.
Este exercício faz parte do curso
Introduction to Writing Functions in R
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Write a function to convert acres to sq. yards
___ <- ___(___) {
___ * ___
}