Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to update only missing values in R based on parameters

$
0
0

@vineetjaiswal wrote:

I have data set as below mentioned script

library(ggmap)
countries <- c('Ghana', 'Guinea', 'Mali', 'Niger')
withLocation<- data.frame(countries, geocode(countries))

once I run the command then I get data like this

       countries        lon        lat
1          Ghana  -1.023194   7.946527
2         Guinea  -9.696645   9.945587
3           Mali  -3.996166  17.570692
4          Niger         NA         NA

Now I have missing values for ‘Niger’ and want to update that row only as running the google API with complete list will miss different country, please help me to achieve this

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles