I am an R novice and am having some challenges. I am dealing with a large dataframe which I have read from a csv file. My numerical vectors contain NAs which are stopping me from running analyses. How do I get rid of these NAs so I can actually do something with my data?
相关问题
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- Reshape matrix by rows
- Extract P-Values from Dunnett Test into a Table by
- split data frame into two by column value [duplica
相关文章
- How to convert summary output to a data frame?
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
- How to insert pictures into each individual bar in
This is an awesome website that I use for quick R related information: http://www.statmethods.net/input/missingdata.html
x[!is.na(x)]
, orna.omit
(seeapropos("^na\\.")
for all availablena.
functions),na.rm = TRUE
as an argument e.g.sapply(dtf, sd, na.rm = TRUE)
,options(na.action = "na.omit")
which is set by default, but many functions don't rely on globally defined NA action (mean
for instance), while some do (right now I cannot come up with an example),Long story short, dealing with NA's is a very broad problem, try to concretize it a bit and give us a concise question. I'm sure that someone of SOers can help you!
Cheers, lad!
It can be done by using na.omit() function.