Fulfill NA in data frame

Hi,

I'm trying to replace the NA in my database by using the option fill=NA but for some reason it doesn't work. What is strange for me is that there is not an error message, just nothing is happening after i click on run.

Here is my the full function that I use:
C <-spread(B, AGEACT, type, fill=NA, convert = FALSE, drop = TRUE, sep = NULL)

Thanks in advance.

Hi, and welcome.

Without a reproducible example, called a reprex it's hard to tell for sure, but let's eliminate one possibility. After

C <-spread(B, AGEACT, type, fill=NA, convert = FALSE, drop = TRUE, sep = NULL)

try

C

Hi,

Thank you and thank you for your answer.

I will create a replex and attach an example.

Actually, I've tried to eliminate possibility by possibility but nothing works.

The data frame stays always the same.

1 Like

Great! I took my best guess about "nothing." Glad it wasn't so simple!

You say that you want to use fill= in order to replace NA values. Yet the parameter you are passing to fill is NA. So you're trying to replace NA with NA?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.