Skip to content

Commit 3a2276a

Browse files
committed
Merge branch 'bugfixes' of https://github.com/thehyve/RInterface into bugfixes
2 parents caab462 + dd433ba commit 3a2276a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

R/getObservations.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ getObservations <- function(study.name, concept.match = NULL, concept.links = NU
4040
}
4141
}
4242
} else {
43-
concept.links <- paste("/studies/", study.name, sep = "")
43+
concept.links <- paste0("/studies/", study.name)
4444
}
4545
}
4646

@@ -57,15 +57,15 @@ getObservations <- function(study.name, concept.match = NULL, concept.links = NU
5757
listOfObservations <- c(listOfObservations, serverResult$observations)
5858
}
5959
}else{
60-
if(length(patient.set)>1){stop("Only one patient.set ID allowed as input")}
61-
if(!is.numeric(patient.set)){stop("Patient.set ID should be a numeric value")}
60+
if(length(patient.set) > 1) { stop("Only one patient.set ID allowed as input") }
61+
if(!is.numeric(patient.set)) { stop("Patient.set ID should be a numeric value") }
6262

63-
if(length(concept.links) == 1 & concept.links[1] == paste("/studies/", study.name, sep = "")){
63+
if(length(concept.links) == 1 && concept.links[1] == paste0("/studies/", study.name)) {
6464
tmpConceptPath<- studyConcepts$fullName[1]
65-
fullConceptNames <- gsub(paste(study.name,"\\\\.*", sep = ""),paste(study.name, "\\\\", sep = ""),
65+
fullConceptNames <- gsub(paste0(study.name,"\\\\.*"), paste0(study.name, "\\\\"),
6666
tmpConceptPath, ignore.case=T)
67-
}else{
68-
fullConceptNames<-studyConcepts$fullName[match(concept.links, studyConcepts$api.link.self.href)]
67+
} else {
68+
fullConceptNames <- studyConcepts$fullName[match(concept.links, studyConcepts$api.link.self.href)]
6969
}
7070
for (oneName in fullConceptNames) {
7171
serverResult <- .transmartGetJSON(

0 commit comments

Comments
 (0)