Skip to main content
added 1 character in body
Source Link
radouxju
  • 49.9k
  • 2
  • 71
  • 144

Based on your description, the simplest answer to your question (not be the best solution, see why below) would be to call a Python script from R with system()

> system(paste('python ExportedModelBuilder.py', argumentIn, argumentOut, sep=" "))

for the python file, you can export it from model builder and change some of the required variables as arguments using argv[]. The main drawback with this method would be the fact that you will import arcpy at each launch of Python, which will considerably slow down your process.

The best solution is to do everything in R: the functions that you mention in your first paragraph are all available with the rgdal and raster packages.

Based on your description, the simplest answer to your question (not be the best solution, see why below) would be to call a Python script from R with system()

> system(paste('python ExportedModelBuilder.py', argumentIn, argumentOut, sep=" ")

for the python file, you can export it from model builder and change some of the variables as arguments using argv[]. The main drawback with this method would be the fact that you will import arcpy at each launch of Python, which will considerably slow down your process.

The best solution is to do everything in R: the functions that you mention in your first paragraph are all available with the rgdal and raster packages.

Based on your description, the simplest answer to your question (not be the best solution, see why below) would be to call a Python script from R with system()

> system(paste('python ExportedModelBuilder.py', argumentIn, argumentOut, sep=" "))

for the python file, you can export it from model builder and change the required variables as arguments using argv[]. The main drawback with this method would be the fact that you will import arcpy at each launch of Python, which will considerably slow down your process.

The best solution is to do everything in R: the functions that you mention in your first paragraph are all available with the rgdal and raster packages.

added 8 characters in body
Source Link
radouxju
  • 49.9k
  • 2
  • 71
  • 144

Based on your description, the simplest answer to your question (not be the best solution, see why below) would be to call a Python script from R with system()

> system(paste('python myfirstpythonfileExportedModelBuilder.py', argumentargumentIn, argumentOut, sep=" ")

for the python file, you can export it from model builder and change some of the variables as arguments using argv[]. The main drawback with this method would be the fact that you will import arcpy at each launch of Python, which will considerably slow down your process.

The best solution is to do everything in R: the functions that you mention in your first paragraph are all available with the rgdalrgdal and rasterraster packages.

Based on your description, the simplest answer to your question (not be the best solution, see why below) would be to call a Python script from R with system()

> system(paste('python myfirstpythonfile.py', argument, sep=" ")

for the python file, you can export it from model builder and change some of the variables as arguments using argv[]. The main drawback with this method would be the fact that you will import arcpy at each launch of Python, which will considerably slow down your process.

The best solution is to do everything in R: the functions that you mention in your first paragraph are all available with the rgdal and raster packages.

Based on your description, the simplest answer to your question (not be the best solution, see why below) would be to call a Python script from R with system()

> system(paste('python ExportedModelBuilder.py', argumentIn, argumentOut, sep=" ")

for the python file, you can export it from model builder and change some of the variables as arguments using argv[]. The main drawback with this method would be the fact that you will import arcpy at each launch of Python, which will considerably slow down your process.

The best solution is to do everything in R: the functions that you mention in your first paragraph are all available with the rgdal and raster packages.

Source Link
radouxju
  • 49.9k
  • 2
  • 71
  • 144

Based on your description, the simplest answer to your question (not be the best solution, see why below) would be to call a Python script from R with system()

> system(paste('python myfirstpythonfile.py', argument, sep=" ")

for the python file, you can export it from model builder and change some of the variables as arguments using argv[]. The main drawback with this method would be the fact that you will import arcpy at each launch of Python, which will considerably slow down your process.

The best solution is to do everything in R: the functions that you mention in your first paragraph are all available with the rgdal and raster packages.