top of page

R codes and data

Invasion

Alien flora are accumulating steadily in China over the last 80 years 
(2025, iScience)

 

Analysis 1: Temporal analysis of alien flora accumulation (based on the minimum residence time (MRT) of the alien plant species)

  1. Fitting nonlinear functions (fitting, compare, plot)

  2. Segmented regression (breakpoint estimation, plot, linear regression model to identify temporal trend)

  3. Bootstrap procedure (prediction of temporal trend in the future)

​

Analysis 2: Comparative analysis (compare the MRT values across categories of biotic and abiotic variables)

  1. Descriptive statistics

  2. Check for normality (Shapiro-Wilk test) and homogeneity of variance (Levene test)

  3. Compare (Kruskal-Wallis H test, post hoc Dunn test, ART ANOVA: non-parametric alternative of 2-way ANOVA)

​

Analysis 3: Identify the variables’ influence on MRT

  1. Testing for phylogenetic signals (Blomberg's K and Pagel's λ)

  2. Univariate regression: logistic regression for variables having no phylogenetic signals, phylogenetic generalised least squares (PGLS) for variables with phylogenetic signals

  3. Multivariate regression: Phylogenetic path analysis (PPA)

  4. LASSO regression: Identification of variables' categories that can influence the MRT

 

Access the script and data from here​

-----------------

​

Implications for biological invasion of non-native plants for sale in the world's largest online market 
(2024, Conservation Biology)

 

Analysis 1: Comparison of variables between categories (between the alien species offered for sale and not offered for sale in Chinese online marketplaces) Script

  1. Descriptive statistics (summarySE)

  2. Check for normality (Shapiro-Wilk test) and homogeneity of variance (Levene test)

  3. Compare and effect size estimation (Wilcox test and t-test, post hoc Dunn test)

  4. Subset data based on criteria

​

Analysis 2: Regression analysis (identify variables’ influence on the sale availability of alien plant species of three invasion categories) Script

  1. Fitting a generalised linear model (glm: binomial logistic regression)

  2. Plot regression results using the sjPlot package

​

Analysis 3: Structural equation modelling (identify variables’ direct and indirect influence on the sale availability of alien plant species of three invasion categories) Script

  1. Using the lavaan package

  2. Plot result using the semPlot package

 

Access the script and data from here

​

-----------------

​

Spatio-temporal pattern of cross-continental invasion: Evidence of climatic niche shift and predicted range expansion provide management insights for smooth cordgrass (2022, Ecological Indicators)

 

Analysis 1: Testing spatial niche conservatism (COUE framework) and the environmental analogy between native and non-native ranges

  1. Using the ecospat package

  2. Calculating niche overlap, niche similarity, and niche equivalency

  3. Quantify niche dynamics and plot centroid shift

  4. MESS analysis

​

Analysis 2: Estimate and compare the rate of spread between the three regions of the species’ introduced range

  1. Custom script

  2. Fitting the exponential growth model 

  3. Estimating slope and confidence intervals

​​

Access the script and data from here

​

-----------------

​

Different factors influence naturalisation and invasion processes – A case study of Indian alien flora provides management insights (2021, Journal of Environmental Management)

 

Analysis 1: Comparison of minimum residence time (MRT) between invasion categories

  1. Descriptive statistics (summarise function)

  2. Check for normality (Shapiro-Wilk test) and homogeneity of variance (Levene test)

  3. Compare (ANOVA, Tukey's HSD, Shapiro-Wilk test, Dunn test)

​

Analysis 2: Imputation of missing data

  1. Visualisation of missing data

  2. Imputation using the missForest package

  3. Standardisation of variables

 

Analysis 3: Logistic regression

  1. Testing the effects of the biotic and abiotic variables on invasion success (invasive aliens-1, casual aliens-0)

​

Analysis 4: Phylogenetic analysis

  1. Making a phylogenetic tree (V.PHYLOMAKER package), and pruning the tree to genus level

  2. Testing for phylogenetic signals (Blomberg's K and Pagel's λ), PHYTOOLS package

 

Access the script and data from here

​

-----------------

Phylogeography

Glacial vicariance and oceanic circulation shape population structure of the coastal legume Derris trifoliata in the Indo-West Pacific (2022, American Journal of Botany)

 

Analysis 1: Determine the relationship of genetic differentiation with geographic (IBD), environmental (IBE), and resistance (IBR) distances

  1. Partial Mantel test

  2. Multiple Regression on Distance Matrices (MRM)

  3. VIF analysis using the usdm package

  4. Compute Euclidean distances between points

​

Access the script and data from here

​

-----------------

​

Deciphering the global phylogeography of a coastal shrub (Scaevola taccada) reveals the influence of multiple forces on contemporary population structure (2021, Journal of Systematics and Evolution)

 

Analysis 1: Identify genetic clusters and describe the relationships between them

  • Discriminant analysis of principal components

​

Access the script and data from here

​

-----------------

​

Contrasting Phylogeographic Patterns in Lumnitzera Mangroves Across the Indo-West Pacific (2021, Frontiers in Plant Science)

 

Analysis 1: To estimate population differentiation based on cpDNA sequence data

  • Hedrick’s G/ST estimation

​

Access the script and data from here

​

-----------------

​

Prominent genetic structure across native and introduced ranges of Pluchea indica, a mangrove associate, as revealed by
microsatellite markers (2020, Journal of Plant Ecology)

 

Analysis 1: To investigate the genetic structure (by integrating the spatial information in the clustering algorithm)

  • Assess clustering pattern and plotting (GENELAND package)

​

Access the script and data from here

​

-----------------

​

Going with the flow: analysis of population structure reveals high gene flow shaping invasion pattern and inducing range expansion of Mikania micrantha in Asia (2020, Annals of Botany)

 

Analysis 1: To assess the relationship of genetic differentiation with isolation by distance, environment and resistance surfaces

  • Generalized Dissimilarity Modeling analysis in R to model how genetic differentiation changes with environmental conditions and geographic distance (GDM package) 

​

Access the script and data from here

​

-----------------

​

Native exotic relationships in plant communities: the role of exotic dominance in framing community composition (2017, Ecological Research)

 

Analysis 1: Likelihood ratio test for equality of Poisson means

  • To compare native species richness between sites invaded by two invasive species, either alone or in combination. The number of native species in a site was assumed to follow a Poisson distribution with mean depending on the presence or absence of the two focal species and their joint occurrence. 

​

Access the script and data from here

bottom of page