Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GloWPa
pathogenflows
Commits
9c9cc9da
Commit
9c9cc9da
authored
Sep 19, 2022
by
Nauta, Lisanne
Browse files
final fix getLoadings function. Tetsted by Nynke on 13-09-22.
parent
1f431e83
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/getLoadings.R
View file @
9c9cc9da
...
...
@@ -18,12 +18,12 @@ getLoadings<-function(inputDF=read.csv("data/input_file_new_kla_div_20200729-0Ba
df1
<-
inputDF
#comment out these lines after testing
#comment out these lines after testing
#df1<-df1[,c(1:42)]
#colnames(df1)<-c(colnames(df1[,c(1:19)]),substr(colnames(df1[,c(20:42)]),1,nchar(colnames(df1[,c(20:42)]))-4))
#colnames(df1)
#df1$excreted<-rep(1e10,5)
#comment out these lines after testing
#comment out these lines after testing
pathogenGroups
<-
c
(
"Virus"
,
"Bacteria"
,
"Protozoa"
,
"Helminth"
)
index
<-
which
(
pathogenGroups
==
pathogenType
)
...
...
@@ -33,7 +33,7 @@ getLoadings<-function(inputDF=read.csv("data/input_file_new_kla_div_20200729-0Ba
#persistence model in pits
persist
<-
read.csv
(
"http://data.waterpathogens.org/dataset/eda3c64c-479e-4177-869c-93b3dc247a10/resource/f99291ab-d536-4536-a146-083a07ea49b9/download/k2p_persistence.csv"
,
header
=
T
)
persist
<-
read.csv
(
"data/k2p_persistence_WR.csv"
,
header
=
T
)
#
persist<-read.csv("data/k2p_persistence_WR.csv",header=T)
persist
<-
persist
[
1
:
(
length
(
persist
)
-1
)]
#persist<-persist[persist$matrix=="Fecal sludge",]
persist
<-
subset
(
persist
,
matrix
==
"Fecal sludge"
)
...
...
@@ -320,4 +320,4 @@ getLoadings<-function(inputDF=read.csv("data/input_file_new_kla_div_20200729-0Ba
)
return
(
returned
)
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment