OpenDroneMap / FIELDimageR

FIELDimageR: A R package to analyze orthomosaic images from agricultural field trials. This package is a compilation of functions to analyze pos-mosaicking images from research fields, and allows to: crop the image; remove soil effect; build vegetation indices; rotate the image; build the plot shapefile; extract information for each plot; and evaluate stand count, canopy percentage, and plant height.
GNU General Public License v2.0
239 stars 90 forks source link

Could not find function "fieldCrop" #36

Closed tejasri19 closed 2 years ago

tejasri19 commented 2 years ago

> EX1.Crop <- fieldCrop(mosaic = EX1, plot = T) # For heavy images (large, high resolution, etc.) please use: fast.plot=T

Error fieldCrop(mosaic = EX1, plot = T) : could not find function "fieldCrop"

@filipematias23 Pls help!

nfahlgren commented 2 years ago

In RStudio, after loading FIELDimageR, can you check your environment to see what functions were imported by FIELDimageR? In the Environment toolbox in the upper right, select Global Environment and then select package:FIELDimageR (see screenshot below)

Screen Shot 2022-09-08 at 9 54 35 AM
tejasri19 commented 2 years ago

@nfahlgren Thanks for the reply.

Could not find package:FIELDimageR in the Global environment dropdown window.

I see the following error : Error in loadNamespace(name) : there is no package called ‘devtools’

Screenshot from 2022-09-09 11-11-43

tejasri19 commented 2 years ago

I tried to install FieldImageR by downloading zip file and running follwing commands. Still cannot solve.

setwd("~/FIELDimageR-master.zip") # ~ is the path from where you saved the file.zip unzip("FIELDimageR-master.zip") file.rename("FIELDimageR-master", "FIELDimageR") shell("R CMD build FIELDimageR") # or system("R CMD build FIELDimageR") install.packages("FIELDimageR_0.3.2.tar.gz", repos = NULL, type="source") # Make sure to use the right version (e.g. 0.3.2)

When I run install.packages("devtools"), I get the following warnings.

✔ Package 'devtools' successfully installed. Warning messages: 1: In utils::install.packages("pkgdown", repos = "https://cloud.r-project.org") : installation of package ‘systemfonts’ had non-zero exit status 2: In utils::install.packages("pkgdown", repos = "https://cloud.r-project.org") : installation of package ‘textshaping’ had non-zero exit status 3: In utils::install.packages("pkgdown", repos = "https://cloud.r-project.org") : installation of package ‘ragg’ had non-zero exit status 4: In utils::install.packages("pkgdown", repos = "https://cloud.r-project.org") : installation of package ‘pkgdown’ had non-zero exit status 5: In utils::install.packages("devtools", repos = "https://cloud.r-project.org") : installation of package ‘systemfonts’ had non-zero exit status 6: In utils::install.packages("devtools", repos = "https://cloud.r-project.org") : installation of package ‘textshaping’ had non-zero exit status 7: In utils::install.packages("devtools", repos = "https://cloud.r-project.org") : installation of package ‘ragg’ had non-zero exit status 8: In utils::install.packages("devtools", repos = "https://cloud.r-project.org") : installation of package ‘pkgdown’ had non-zero exit status 9: In utils::install.packages("devtools", repos = "https://cloud.r-project.org") : installation of package ‘devtools’ had non-zero exit status

LucianoRogerio commented 2 years ago

Try to install devtools before installing FIELDimageR It seems that you did not install devtools before, so you will not be able to use it's function install_github(). So try first this functions: install.packages("devtools") devtools::install_github("OpenDroneMap/FIELDimageR") That will install FIELDimageR package in your R package library Then you just need to require FIELDimageR package to your R environment library(FIELDimageR) With that you will have the FIELDimageR working in your R.

Have a great day Luciano de Andrade


From: Tejasri Nampally @.> Sent: Friday, September 9, 2022 2:43 AM To: OpenDroneMap/FIELDimageR @.> Cc: Subscribed @.***> Subject: Re: [OpenDroneMap/FIELDimageR] Could not find function "fieldCrop" (Issue #36)

I tried to install FieldImageR by downloading zip file and running follwong commands. Still cannot solve.

setwd("~/FIELDimageR-master.zip") # ~ is the path from where you saved the file.zip unzip("FIELDimageR-master.zip") file.rename("FIELDimageR-master", "FIELDimageR") shell("R CMD build FIELDimageR") # or system("R CMD build FIELDimageR") install.packages("FIELDimageR_0.3.2.tar.gz", repos = NULL, type="source") # Make sure to use the right version (e.g. 0.3.2)

— Reply to this email directly, view it on GitHubhttps://github.com/OpenDroneMap/FIELDimageR/issues/36#issuecomment-1241564559, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKHTSFB47C7ZYFOFWI2QO53V5LMB5ANCNFSM6AAAAAAQHQ5USM. You are receiving this because you are subscribed to this thread.Message ID: @.***>

tejasri19 commented 2 years ago

I could solve by upgrading R to 4.1 version. Thank you for your reply.