How to visualise the spatial distribution and competition
Example 1.
#I read in data from the experiment
df <-
read.table("C:/Users/matliz/Documents/OLD R/GRAN ASA/ALL TOGETHER NEW1.txt",
header=TRUE, sep="\t", na.strings="NA", dec=".", strip.white=TRUE)
#I restrict data frame to a plot
df1 <- subset(df, Yta == "8512" & treatment == "FIN")[c("x", "y", "diam90")]
#I load a library (MBA)
library(MBA)
## Loading required package: sp
df1=df1[ order(df1[,1], df1[,2],df1[,3]), ]
mba.int <- mba.surf(df1, 300, 300, extend=T)$xyz.est
#the method uses surface approximation from bivariate scattered data using multilevel B-splines
# I load the library fields
library(fields)
## Loading required package: spam
## Loading required package: grid
## Spam version 1.0-1 (2014-09-09) is loaded.
## Type 'help( Spam)' or 'demo( spam)' for a short introduction
## and overview of this package.
## Help for individual functions is also obtained by adding the
## suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
##
## Attaching package: 'spam'
##
## The following objects are masked from 'package:base':
##
## backsolve, forwardsolve
##
## Loading required package: maps
Plot
I plot distribution within the stand

plot2
I plot distribution within the stand
