Skip to content

Commit 12033b4

Browse files
committed
Updated installation instructions
1 parent ea41573 commit 12033b4

File tree

1 file changed

+20
-31
lines changed

1 file changed

+20
-31
lines changed

README.md

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,36 @@ This repository provides tools and code to perform social network analysis, gene
1313
### 1. Data format
1414
The input data should be in `.csv` format, with one column containing author names. This CSV file can be exported from databases such as PubMed, Scopus, Web of Science, or university research databases.
1515

16-
### 2. Clone the repository
17-
Clone the entire repository to your computer using the `git clone` command or the `GitHub Desktop` application.
16+
### 2. Install the package
17+
Installing this package requires an R version >= 4.4.
1818

19-
### 3. Ruuning the repository
19+
Run the following commands in R to install the package:
20+
```R
21+
install.packages("pak")
22+
pak::pkg_install("BioRDM/Network-Analysis")
23+
```
24+
25+
#### For Linux users
26+
Additional dependencies might be needed. On Debian-based systems, they can be installed with this command:
27+
`sudo apt-get install -y --no-install-recommends libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev libtiff5-dev texlive-xetex`
28+
29+
### 3. Generating the report
2030

21-
#### 3.1 intsall Packages:
22-
Ensure that the following libraries are installed on your computer:
23-
(the list of required packages here.)
31+
Download the [generate_report.R](https://github.com/BioRDM/Network-Analysis/blob/main/Generate_report.r) script.
2432

25-
#### 3.2 Report generating:
26-
The primary file you will need is `Generate_report.R` . You can run this R script in RStudio or Visual Studio Code. Each function and line of code is well-documented, with instructions and explanations on how to modify it to suit your analysis needs.
33+
You can run this R script in RStudio or Visual Studio Code. Each function and line of code is well-documented, with instructions and explanations on how to modify it to suit your analysis needs.
2734
The code includes various filter functions that you may adjust depending on your research questions, such as:
2835

2936
- The maximum number of authors per paper in your dataset.
3037
- The minimum number of papers per author to be included in the analysis.
3138
- The timeframe (years) you wish to study.
3239
- Whether to split the analysis into smaller time intervals.
3340

34-
#### 3.3 output folder:
41+
#### 3.3 Output folder:
3542
After running the code, the output (including figures, PDFs, and additional CSV files) will be saved in a folder named `output`. This folder will be created automatically if it does not already exist.
3643
If you analyse multiple CSV files, a separate subfolder (under the same name of the csv file) will be created within the output folder for each dataset, containing the relevant results.
3744

38-
##### the generated outcomes:
45+
##### Generated outcomes:
3946
1. `Report_YYYY_YYYY.pdf`
4047
This is the main output of the automated code: a PDF report containing the analysis results. It includes a table of contents, detailed interpretations of the findings, and visualisations with captions.
4148
The corresponding markdown file, `Report_YYYY_YYYY.md`, is also generated.
@@ -59,19 +66,19 @@ If you analyse multiple CSV files, a separate subfolder (under the same name of
5966
## Repository Contents
6067

6168
|---------------- .github
62-
(Automatically generated folder used for GitHub workflows, such as building PDF files.)
69+
(Folder for GitHub workflows, for code testing purposes.)
6370
|---------------- Pure Data
6471
(Contains datasets extracted from the University of Edinburgh's Research Explorer (Pure))
6572
|---------------- R
6673
(Includes all R functions used to generate the analysis outcomes and build the PDF report.)
6774
|---------------- Trial Analysis
6875
(Contains datasets from the UOE Explorer (Pure) and RMarkdown files used to develop the code.)
6976
|---------------- assets
70-
(Stores additional resources, such as the .tiff file for the font type used in the PDF report.)
77+
(Stores additional resources, such as the .ttf file for the font type used in the PDF report.)
7178
|---------------- data
7279
(Contains datasets from the Centre for Engineering Biology at the University of Edinburgh.)
7380
|---------------- tests
74-
(Includes trial datasets and code used during the development and testing of the repository.)
81+
(Contains unit-tests for the package.)
7582
|------- .Rbuildignore
7683
(Specifies files and folders to ignore when building the R package.)
7784
|-------.gitignore
@@ -94,21 +101,3 @@ If you analyse multiple CSV files, a separate subfolder (under the same name of
94101
(This file, providing an overview of the repository and instructions for use.)
95102

96103
---
97-
98-
99-
### Adding new metrics
100-
To compute new metrics, edit `src/Interactions_class.r` to add a new method (both functions need to be added):
101-
```r
102-
get_diameter.Interactions <- function(interactions) {
103-
return(diameter(interactions$graph, directed = FALSE, weights = NA))
104-
}
105-
106-
get_diameter <- function(interactions) {
107-
UseMethod("get_diameter", interactions)
108-
}
109-
```
110-
111-
The method can then be called in the relevant function in `Report_text.r` to obtain the numbers:
112-
```r
113-
diameter <- get_diameter(interactions)
114-
```

0 commit comments

Comments
 (0)