[R-sig-Geo] Area calculation of forest cover classes.

Sarah Goslee @@r@h@go@|ee @end|ng |rom gm@||@com
Sat Sep 14 17:42:31 CEST 2019


Hi Enoch,

It's inappropriate to email just me, rather than the whole list - I
don't have the capacity to provide private tutorials.

You could import your prediction maps into a GIS you're more familiar with.
You could read a tutorial on the raster package, which provides tools
to do what you want.
If you're still struggling with basic R commands, you could read the
Introduction to R that comes with it, or one of the many other
tutorials that are available online and in your library.

In general, this email list is excellent for "I tried this and
couldn't get it to work. How do I fix my error?" and not great for "I
don't know anything about R but I have this project please explain
everything."

So: You have a map. What format is your map? What have you tried? What
didn't work? Where have you searched? What documentation have you
read?

Sarah

On Thu, Sep 12, 2019 at 6:59 PM Enoch Gyamfi Ampadu <egampadu using gmail.com> wrote:
>
> Hi Sarah,
> Thank you for the mail and information. Please I have done the predictions already and have the output maps for both the RF and SVM. Find attached the output map. There are 4 classes and I need to determine the area for each. As I indicated I am now learning area and so not very familiar with a lot of functions. I will be glad of you could provide me with some functions and codes, then I will edit it to suite what I have. I realized you recommended aggregate () and table(), but I don't know how to use them. I will be glad to have some help from you.
>
> Thank you.
>
> Best regards,
>
> Enoch.
>
> On Thu, 12 Sep 2019 at 18:06, Sarah Goslee <sarah.goslee using gmail.com> wrote:
>>
>> Hi,
>>
>> Without knowing any details of what you did, the general procedure is:
>>
>> Use your fitted Random Forest or SVM model to predict the class for
>> each pixel in your region of interest - the predict() function.
>> Use standard spatial data methods to aggregate the resulting spatial
>> data, or even standard non-spatial methods, since you know the pixel
>> size - perhaps aggregate() or even table().
>>
>> Sarah
>>
>> On Thu, Sep 12, 2019 at 3:30 AM Enoch Gyamfi Ampadu <egampadu using gmail.com> wrote:
>> >
>> > Dear List,
>> >
>> > Please I have carried out an RF and SVM forest cover classification in R. I
>> > want to determine the area in hectors for each of the forest cover classes.
>> > I have not been able to find my way out on it. I wanted to ask if it is
>> > possible to do this in R and will be glad to have assistance on how to
>> > carry that out. And possibly some lead codes to use (I am still learning R
>> > and and how to code.)
>> >
>> > Thank you.
>> >
>> > Best regards,
>> >
>> > Enoch
>> >
>>
>>
-- 
Sarah Goslee (she/her)
http://www.numberwright.com



More information about the R-sig-Geo mailing list