Commit 4da4b6e5 authored by Holger Brandl's avatar Holger Brandl

renamed .inst_pack to install_package

parent d9e464cd
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#loadpack(Biostrings) #loadpack(Biostrings)
## install Biostrings if not yet there ## install Biostrings if not yet there
.inst_pack("Biostrings") install_package("Biostrings")
read.fasta <- function(fileName){ read.fasta <- function(fileName){
...@@ -40,7 +40,7 @@ write_fasta <- function(seq_names, sequences, file){ ...@@ -40,7 +40,7 @@ write_fasta <- function(seq_names, sequences, file){
} }
getSeqLengthFromFasta <- function(fileName){ get_sequence_lengths <- function(fileName){
assembly <- mutate(read_fasta(fileName), seq_len=nchar(Sequence)) assembly <- mutate(read_fasta(fileName), seq_len=nchar(Sequence))
assembly$Sequence = NULL assembly$Sequence = NULL
return(assembly) return(assembly)
...@@ -67,10 +67,6 @@ write_bed <- function(bedData, file){ ...@@ -67,10 +67,6 @@ write_bed <- function(bedData, file){
options(scipen=oldScipen) options(scipen=oldScipen)
} }
write.bed <- function(bedData, file){
warning("Deprecated: use write_bed instead!")
write_bed(bedData, file)
}
## reload to fix rename overloading ## reload to fix rename overloading
#reload_dplyr() #reload_dplyr()
...@@ -53,7 +53,7 @@ require_auto <- function(x){ ...@@ -53,7 +53,7 @@ require_auto <- function(x){
} }
## externalized installer to also allow for installation without loading ## externalized installer to also allow for installation without loading
.inst_pack <- function(x){ install_package <- function(x){
if(!isTRUE(x %in% .packages(all.available=TRUE)) && any(available.packages()[,1]==x)) { if(!isTRUE(x %in% .packages(all.available=TRUE)) && any(available.packages()[,1]==x)) {
# update.packages(ask=F) # update dependencies, if any. # update.packages(ask=F) # update dependencies, if any.
eval(parse(text=paste("install.packages('", x, "')", sep=""))) eval(parse(text=paste("install.packages('", x, "')", sep="")))
...@@ -73,7 +73,7 @@ require_auto <- function(x){ ...@@ -73,7 +73,7 @@ require_auto <- function(x){
load_pack <- function(x, warn_conflicts=T){ load_pack <- function(x, warn_conflicts=T){
x <- as.character(substitute(x)); x <- as.character(substitute(x));
.inst_pack(x) install_package(x)
## load it using a library function so that loadpack errors if package is still not ins ## load it using a library function so that loadpack errors if package is still not ins
eval(parse(text=paste("library(", x, ", quietly=T, warn.conflicts=", warn_conflicts, ")", sep=""))) eval(parse(text=paste("library(", x, ", quietly=T, warn.conflicts=", warn_conflicts, ")", sep="")))
...@@ -84,7 +84,7 @@ loadpack <- function(x, warn_conflicts=T){ ...@@ -84,7 +84,7 @@ loadpack <- function(x, warn_conflicts=T){
x <- as.character(substitute(x)); x <- as.character(substitute(x));
.inst_pack(x) install_package(x)
## load it using a library function so that loadpack errors if package is still not ins ## load it using a library function so that loadpack errors if package is still not ins
eval(parse(text=paste("library(", x, ", quietly=T, warn.conflicts=", warn_conflicts, ")", sep=""))) eval(parse(text=paste("library(", x, ", quietly=T, warn.conflicts=", warn_conflicts, ")", sep="")))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment