SCM

SCM Repository

[inlinedocs] Diff of /pkg/inlinedocs/R/parsers.R
ViewVC logotype

Diff of /pkg/inlinedocs/R/parsers.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 102, Fri May 14 18:48:40 2010 UTC revision 103, Tue May 18 16:33:29 2010 UTC
# Line 71  Line 71 
71           REP <- paste("\\1",SEP,"\\2",sep="")           REP <- paste("\\1",SEP,"\\2",sep="")
72           r <- strsplit(gsub(FIND,REP,after,perl=TRUE),split=SEP)[[1]]           r <- strsplit(gsub(FIND,REP,after,perl=TRUE),split=SEP)[[1]]
73           l <- strsplit(r,split="\n")           l <- strsplit(r,split="\n")
          if(length(l)<2||l[[2]]=="")return(list())  
74           excode <- c(l[[2]],"")           excode <- c(l[[2]],"")
75             if(length(l)<2||paste(excode,collapse="")=="")return(list())
76           prefixes <- gsub("(\\s*).*","\\1",excode,perl=TRUE)[grep("\\w",excode)]           prefixes <- gsub("(\\s*).*","\\1",excode,perl=TRUE)[grep("\\w",excode)]
77           FIND <- prefixes[which.min(nchar(prefixes))]           FIND <- prefixes[which.min(nchar(prefixes))]
78           list(examples=paste(sub(FIND,"",excode),collapse="\n"),           list(examples=paste(sub(FIND,"",excode),collapse="\n"),

Legend:
Removed from v.102  
changed lines
  Added in v.103

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge