[Distr-commits] r1334 - pkg/utils
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Mar 30 21:48:25 CET 2019
Author: ruckdeschel
Date: 2019-03-30 21:48:25 +0100 (Sat, 30 Mar 2019)
New Revision: 1334
Modified:
pkg/utils/DESCRIPTIONutils.R
pkg/utils/DESCRIPTIONutilsExamples.R
Log:
[utils] fixed the issue with annoying line feeds inserted by updatePackageHelp()
Modified: pkg/utils/DESCRIPTIONutils.R
===================================================================
--- pkg/utils/DESCRIPTIONutils.R 2019-03-29 10:46:27 UTC (rev 1333)
+++ pkg/utils/DESCRIPTIONutils.R 2019-03-30 20:48:25 UTC (rev 1334)
@@ -72,8 +72,10 @@
if(aktblock!="")
aktblock <- paste(aktblock,mark,x[i],sep="")
else aktblock <- x[i]
+ aktblock <- gsub("(;;;)+",";;;",aktblock)
if(grepl("\\\\cr",aktblock)){
j <- j + 1
+ aktblock <- gsub("(;;;)+\\\\cr","\\\\cr",aktblock)
x.0[j] <- aktblock
aktblock <- ""
}
@@ -82,17 +84,19 @@
}
revertLineSkips <- function(x){
+ x<- gsub("(;;;)+",";;;",x)
## undoes the binding
return(c(unlist(strsplit(x,";;;"))))
}
## we also have to introduce linebreaks at 80
-## getKommaPos80 finds the last comma before the 80th sign
+## getKommaPos80 finds the last comma or \cr before the 80th sign
getKommaPos80 <- function(x){
nx <- nchar(x)
npos <- numeric(nx)
ind <- 1:nx
for(i in 1:nx) npos[i] <- substr(x,i,i)==","
+ if(nx>2) for(i in 1:(nx-2)) npos[i] <- substr(x,i,i+2)=="\\cr"
if(sum(npos)==0) return(NA)
lc <- rev(ind[ind<=80 & npos])
if(length(lc)==0) return(NA)
Modified: pkg/utils/DESCRIPTIONutilsExamples.R
===================================================================
--- pkg/utils/DESCRIPTIONutilsExamples.R 2019-03-29 10:46:27 UTC (rev 1333)
+++ pkg/utils/DESCRIPTIONutilsExamples.R 2019-03-30 20:48:25 UTC (rev 1334)
@@ -152,7 +152,7 @@
updateHTMLpages(pkgVersions = c(rep("2.8.0",9),"1.2.0"))
}
-if(FALSE){## Version 2.8 in trunk second shift 20190327
+if(FALSE){## Version 2.8 in trunk second shift 20190328
Pkgs <- c("distrEx", "distrEllipse", "distrMod")
Names <- c("Version")
Values <- matrix(c("2.8.0"),1,length(Pkgs))
@@ -233,7 +233,7 @@
ReqDistrPkgVersion =ReqDistrPkgVersion0)
}
-if(FALSE){## Version 1.2 in trunk second shift 20190327
+if(FALSE){## Version 1.2 in trunk second shift 20190329
Pkgs <- c("RandVar", "ROptEstOld", "RobAStBase", "RobLox", "RobRex", "RobLoxBioC", "ROptEst", "RobExtremes", "ROptRegTS")
Names <- c("Version")
Values <- matrix(c("1.2.0"),1,length(Pkgs))
More information about the Distr-commits
mailing list