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 24, 2020 in Data Analytics by Molly
• 160 points
1,001 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
22,093 views
+1 vote
0 answers
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
• 33,030 points
1,012 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,620 points
1,186 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,840 points
3,306 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
• 33,030 points
1,767 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,840 points
608 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,840 points
698 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,840 points
3,164 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP