Shortcuts.r

#To Do:
#  Fix glibrary for ggplot2 and scles on fresh install

source("updateDesc.r") #code to update DESCRIPTION and upload the files
packageName <- "russmisc"
package.ver <- "2.5.5" #Just the package version
#Create published version
#R major.R minor.Package Major.Package Minor
packageVersion <- paste(sessionInfo()$R.version$major,
                        sessionInfo()$R.version$minor,
                        package.ver,sep=".")
source.name <- paste("../",packageName,"_",packageVersion,".tar.gz",sep="")
bin.name <- paste("../",packageName,"_",packageVersion,".zip",sep="")
updateDesc(packageVersion)


# R.ver <- paste("v",sessionInfo()$R.version$major,".",sessionInfo()$R.version$minor,sep="")
# RTools.version.number <- switch(R.ver,
#        "v2.15.1"="215",
#        "v2.15.2"="216"
# )
# RTools.version <- paste("c:\\rsp\\tools\\Rtools\\",RTools.version.number,sep="")
# #Check whether we need to change the RTools version
# if (ifelse(file.exists("C:/RTools/Version.txt"),
#   readLines(paste(RTools.version,"\\Version.txt",sep="")) != readLines("C:/RTools/Version.txt"),
#   TRUE))
# {
#   print("Copying RTools!")
#   shell(paste("cp -f -r ",RTools.version,"\\* c:\\rtools",sep=""))
#   file.copy(RTools.version,"c:\\RTools\\",recursive=TRUE)
# }

#send to and work in dev mode
#devtools::dev_mode() 
#When I'm happy with the thing, run the rest
shell("copy .\\R\\*.r ..\\repos\\plain\\*")
source.files <- list.files("c:/rsp/russmisc/repos/plain")
source.files <- source.files[!(source.files %in% c("Build-russmisc.R","rcpp_hello_world.R","updateDesc.r","latinsquare.digram.r","Shortcuts.r"))]
writeLines(paste("source('http://variablesolutions.org/repos/plain/",source.files,"')\n",sep=""),"c:/rsp/russmisc/repos/allplain.r")
file.copy(bin.name,"..\\repos\\bin\\windows/contrib/2.15/")
file.copy(source.name,"../repos/src/contrib/")
##Writing the PACKAGES file so the files can be found##
library(tools)
write_PACKAGES("../repos/src/contrib",unpacked=FALSE,latestOnly=FALSE,subdirs=TRUE,type="source")
write_PACKAGES("../repos/bin/windows/contrib/2.15",unpacked=FALSE,latestOnly=FALSE,subdirs=TRUE,type="win.binary",addFiles=TRUE)
##Putting the whole deal online##
shell("c:/rsp/tools/pscp -r -pw ucrr1b5235 ..\\repos russell@psychlab2.variablesolutions.org:/var/www/")

Try the russmisc package in your browser

Any scripts or data that you put into this service are public.

russmisc documentation built on May 2, 2019, 4:44 p.m.