How many non-NA and how many NA values are there in the table? Create a new variable ans of class table that gives total number of non-NA as well as NA entries. The first component should be number of non-NA's, the second should be number of NA's. (You should have just one line of a code).

icon
Related questions
Question

*In R please

 

How many non-NA and how many NA values are there in the table? Create a new variable ans of class table that gives total number of non-NA as well as NA entries. The first component should be number of non-NA's, the second should be number of NA's. (You should have just one line of a code).

 

New York Air Quality Measurements

Description

Daily air quality measurements in New York, May to September 1973.

Usage

airquality

Format

A data frame with 153 observations on 6 variables.

[,1]OzonenumericOzone (ppb)[,2]Solar.RnumericSolar R (lang)[,3]WindnumericWind (mph)[,4]TempnumericTemperature (degrees F)[,5]MonthnumericMonth (1--12)[,6]DaynumericDay of month (1--31)

Details

Daily readings of the following air quality values for May 1, 1973 (a Tuesday) to September 30, 1973.

Ozone: Mean ozone in parts per billion from 1300 to 1500 hours at Roosevelt Island

Solar.R: Solar radiation in Langleys in the frequency band 4000–7700 Angstroms from 0800 to 1200 hours at Central Park

Wind: Average wind speed in miles per hour at 0700 and 1000 hours at LaGuardia Airport

Temp: Maximum daily temperature in degrees Fahrenheit at La Guardia Airport.

Source

The data were obtained from the New York State Department of Conservation (ozone data) and the National Weather Service (meteorological data).

References

Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A. (1983) Graphical Methods for Data Analysis. Belmont, CA: Wadsworth.

Examples

require(graphics) pairs(airquality, panel = panel.smooth, main = "airquality data")

 
data (airquality)
?airquality
air = airquality
head (air)
A data.frame: 6×6
Ozone
<int>
1
2
3
4
5
6
41
36
12
18
ΝΑ
28
Solar.R
Wind Temp Month
Day
<int> <int>
<int> <dbl> <int>
190
7.4 67
118
8.0
72
149
12.6
74
313
11.5
62
NA 14.3
56
ΝΑ
14.9
66
5
5
5
5
5
5
1
2
3
4
5
6
Transcribed Image Text:data (airquality) ?airquality air = airquality head (air) A data.frame: 6×6 Ozone <int> 1 2 3 4 5 6 41 36 12 18 ΝΑ 28 Solar.R Wind Temp Month Day <int> <int> <int> <dbl> <int> 190 7.4 67 118 8.0 72 149 12.6 74 313 11.5 62 NA 14.3 56 ΝΑ 14.9 66 5 5 5 5 5 5 1 2 3 4 5 6
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.