Drop NA values in an imported xlxs document with R I have the attached document.  I've imported an xlxs document into R.  I would like to get rid of all rows containing NA.  I've tried the following but it isn't working.

# install packages Note# tidyverse installs packages for dplyr and ggplot2
install.packages("tidyverse")
install.packages("readxl")

#open the library
library(tidyverse)
library(readxl)

setwd("~/Documents/UofL/Data_Science/CECS_635/week_3/")

un &lt;- read_excel("UnitedNations.xlsx")

un1 %&gt;% drop_na(un,)
its should be working

data_set&lt;-na.omit(un)


If want to handle NA's to mean or median:

na.mean(un, option = "mean")


Source:
https://www.rdocumentation.org/packages/imputeTS/versions/2.7/topics/na.mean