diff --git a/.Rbuildignore b/.Rbuildignore
new file mode 100644
index 0000000000000000000000000000000000000000..91114bf2f2bba5e0c5252e75018da19b869776f1
--- /dev/null
+++ b/.Rbuildignore
@@ -0,0 +1,2 @@
+^.*\.Rproj$
+^\.Rproj\.user$
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..62290e1bf31f5e9ef627a392941b3d0025adf2d8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,55 @@
+# History files
+.Rhistory
+.Rapp.history
+
+# Session Data files
+.RData
+
+# User-specific files
+.Ruserdata
+
+# Example code in package build process
+*-Ex.R
+
+# Output files from R CMD build
+/*.tar.gz
+
+# Output files from R CMD check
+/*.Rcheck/
+
+# RStudio files
+.Rproj.user/
+
+# produced vignettes
+vignettes/*.html
+vignettes/*.pdf
+
+# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
+.httr-oauth
+
+# knitr and R markdown default cache directories
+*_cache/
+/cache/
+
+# Temporary files created by R markdown
+*.utf8.md
+*.knit.md
+
+# R Environment Variables
+.Renviron
+
+# git log file
+git.log
+
+# CRAN related files
+CRAN-RELEASE
+CRAN-SUBMISSION
+cran-comments.md
+
+# other folders
+inst/doc
+/doc/
+/docs/
+/Meta/
+R/tmp
+/pkgdown/
diff --git a/DESCRIPTION b/DESCRIPTION
index 09f93ff3fc55fb3f0dd73ad2338b3fee5a1491cf..7e70f36931a99104e368541673f4e9e4fa9b12c9 100755
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -5,6 +5,8 @@ Version: 1.5-8
 Date: 2022-11-04
 Author: Raphael Pelissier [aut], Francois Goreaud [aut], Philippe Verley [ctb, cre]
 Maintainer: Raphael Pelissier <raphael.pelissier@ird.fr>
+URL: https://forge.ird.fr/amap/ads
+BugReports: https://forge.ird.fr/amap/ads/-/issues
 Imports: ade4, spatstat.geom
 Description: Perform first- and second-order multi-scale analyses derived from Ripley K-function (Ripley B. D. (1977) <doi:10.1111/j.2517-6161.1977.tb01615.x>), for univariate,
  multivariate and marked mapped data in rectangular, circular or irregular shaped sampling windows, with tests of 
diff --git a/INDEX b/INDEX
deleted file mode 100755
index a6c7ef218032904d5f7a752b0a6b65a1efa5eac5..0000000000000000000000000000000000000000
--- a/INDEX
+++ /dev/null
@@ -1,25 +0,0 @@
-Allogny       Spatial pattern of oaks suffering from frost shake in Allogny, France.
-BPoirier      Tree spatial pattern in Beau Poirier plot, Haye forest, France.
-Couepia       Spatial pattern of Couepia caryophylloides in Paracou, a canopy tree species of French Guiana.
-demopat       Artificial data point pattern from \code{spatstat.data} package.
-Paracou15     Spatial pattern of trees in plot 15 of Paracou experimental station, French Guiana.
-area.swin     Area of a sampling window.
-dval          Multiscale local density of a spatial point pattern.
-inside.swin   Test wether points are inside a sampling window.
-k12fun        Multiscale second-order neigbourhood analysis of a bivariate spatial point pattern.
-k12val        Multiscale local second-order neighbour density of a bivariate spatial point pattern.
-kdfun         Multiscale second-order neigbourhood analysis of phylogentic/functional spatial structure of a multivariate spatial point pattern. 
-kfun          Multiscale second-order neigbourhood analysis of an univariate spatial point pattern.
-kmfun         Multiscale second-order neigbourhood analysis of a marked spatial point pattern.
-kp.fun        (Formerly ki.fun) Multiscale second-order neigbourhood analysis of a multivariate spatial point pattern.
-kpqfun        (Formerly kijfun) Multiscale second-order neigbourhood analysis of a multivariate spatial point pattern.
-krfun         Multiscale second-order neigbourhood analysis of a multivariate spatial point pattern using Rao quadratic entropy.
-ksfun         Multiscale second-order neigbourhood analysis of a multivariate spatial point pattern using Simpson diversity.
-kval          Multiscale local second-order neighbour density of a spatial point pattern.
-mimetic       Univariate point pattern replication by mimetic point process.
-plot.fads     Plot second-order neigbourhood functions.
-plot.spp      Plot a Spatial Point Pattern object.
-plot.vads     Plot local density values.
-spp           Creating a spatial point pattern.
-swin          Creating a sampling window.
-triangulate   Triangulate polygon.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..42c71d0b8b8b0b535716e2cf98168eecd991ad05
--- /dev/null
+++ b/README.md
@@ -0,0 +1,51 @@
+ads
+================
+
+**Spatial Point Patterns Analysis**
+
+## Description
+
+ads is an R package that performs first- and second-order multi-scale analyses derived from Ripley K-function ([Ripley B. D. (1977)](https://doi.org/doi:10.1111/j.2517-6161.1977.tb01615.x)), for univariate, multivariate and marked mapped data in rectangular, circular or irregular shaped sampling windows, with tests of statistical significance based on Monte Carlo simulations.
+
+## Citation
+
+To cite 'ads', please use
+``` r
+citation("ads").
+```
+
+## Installation
+
+Install from CRAN:
+
+``` r
+install.packages("ads")
+```
+
+Install the latest version from git:
+
+``` r
+install.packages("remotes")
+remotes::install_git("https://forge.ird.fr/amap/ads.git")
+```
+
+To use it :
+
+``` r
+library("ads")
+
+# first example
+
+# load sample data
+data(BPoirier)
+BP<-BPoirier
+
+# plot a univariate point pattern in a rectangle sampling window
+plot(spp(BP$trees, win=BP$rect))
+```
+
+# Contact 
+
+Author: Raphaël Pélissier (raphael dot pelissier at ird dot fr)
+
+Bug report: https://forge.ird.fr/amap/ads/-/issues
diff --git a/ads.Rproj b/ads.Rproj
new file mode 100644
index 0000000000000000000000000000000000000000..21a4da087e1c026c953a49de88caea1247cd1f1b
--- /dev/null
+++ b/ads.Rproj
@@ -0,0 +1,17 @@
+Version: 1.0
+
+RestoreWorkspace: Default
+SaveWorkspace: Default
+AlwaysSaveHistory: Default
+
+EnableCodeIndexing: Yes
+UseSpacesForTab: Yes
+NumSpacesForTab: 2
+Encoding: UTF-8
+
+RnwWeave: Sweave
+LaTeX: pdfLaTeX
+
+BuildType: Package
+PackageUseDevtools: Yes
+PackageInstallArgs: --no-multiarch --with-keep.source