Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing values are not allowed in subscripted assignments of data frames. #106

Open
EricWilliams859 opened this issue Oct 4, 2022 · 0 comments

Comments

@EricWilliams859
Copy link

Hi,
I am trying to use this package to download LANDSAT ST, ET, and NDVI tiles. The workflow mostly makes sense for me.
I am having an issue with trying to access the products/records for LANDSAT OLI and ETM C2 L2 data, though. Here is the error I keep getting:
Error in [<-.data.frame(*tmp*, , which(colnames(records) == "cloudcov")[2], :
missing values are not allowed in subscripted assignments of data frames
Here is the code I ran:
x_coords <- c(-102, -102, -109, -109)
y_coords <- c(41, 37, 37, 41)
Colorado1 <- sp::Polygon(cbind(x_coords,y_coords))
Colorado_ <- sp::Polygons(list(Colorado1), ID = "A")
Colorado_Polygons <- sp::SpatialPolygons(list(Colorado_))
set_aoi(Colorado_Polygons)

download tiles

products <- get_products(grouped = T, update_online = F)
records <- is.na(get_records(time_range = c('2020-05-24', '2020-05-30'),
products = 'landsat_ot_c2_l2', na.rm = T))
subset(records, select = -"cloudcov")
This error shows up whether I use is.na() or not. Forgive me for any confusion or rookie mistakes; I just started learning R this year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant