R programming Error: Error in if (d >= 0) { : missing value where TRUE/FALSE needed

+4 votes
Here is my code:

for(i in 1:(nrow(moon_sub))){

  l_df[i,] <- getMoonTimes(date = moon_sub$Date[i], lat = -4.12006, lon = 36.11064, tz = "Africa/Nairobi", keep = c("rise", "set"), inUTC = F)

  data <- left_join(l_df, moon_sub, by="Date")

  print(data)

}

This returns the error: Error in if (d >= 0) { : missing value where TRUE/FALSE needed

Any help would be greatly appreciated!
Jun 23 in Data Analytics by Molly
• 160 points
215 views
Hi@Molly,

Share your complete code.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Data Analytics

0 votes
1 answer

R programming error: { : missing value where TRUE/FALSE needed "

This should work: for ( i in 1:dim(m)[[1]] ...READ MORE

answered May 28, 2019 in Data Analytics by Zulaikha
• 910 points
11,965 views
0 votes
2 answers

R Programming error in if condition

Hi. Instead of breaking the line add it ...READ MORE

answered Aug 26, 2019 in Data Analytics by anonymous
• 32,490 points
128 views
0 votes
1 answer

R programming: Missing value error

You can achieve this by wrapping isTRUE() around your if-condition: for ...READ MORE

answered Jan 24, 2019 in Data Analytics by Sophie may
• 10,100 points
334 views
0 votes
1 answer
0 votes
1 answer

Error saying "Error in rnorm() : argument "n" is missing, with no default" in R

Hey @ali, rnorm() function requires an argument, ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,820 points
904 views
+1 vote
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 32,490 points
500 views
0 votes
1 answer

Look for certain values from not cleaned data

First see what rows meet t$ps04==1 & t$rectyp==1. ...READ MORE

answered Nov 13, 2018 in Data Analytics by Maverick
• 10,820 points
73 views
0 votes
1 answer

How to remove certain character from a vector

We can use sub to remove the * by specifying fixed = ...READ MORE

answered Nov 14, 2018 in Data Analytics by Maverick
• 10,820 points
91 views
0 votes
1 answer

What are special values in R

Like most programming languages, R has a ...READ MORE

answered Nov 14, 2018 in Data Analytics by Maverick
• 10,820 points
228 views