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

2019-09-14 Thread Sarah Goslee
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  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  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  
>> 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

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


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

2019-09-12 Thread Sarah Goslee
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  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

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


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

2019-09-12 Thread Enoch Gyamfi Ampadu
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

-- 
*Enoch Gyamfi - Ampadu*

*Geography & Environmental Sciences*

*College of Agriculture, Engineering & Science*

*University of KwaZulu-Natal, Westville Campus*

*Private Bag X54001*
*Durban, South Africa **– 4000**.*
*Phone: +27 835 828255*

*email: egamp...@gmail.com *


*skype: enoch.ampadu*
*The highest evidence of nobility is self-control*.

*A simple act of kindness creates an endless ripple*.

[[alternative HTML version deleted]]

___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo