From: <li...@us...> - 2007-09-14 10:12:29
|
Revision: 53 http://bugs-r.svn.sourceforge.net/bugs-r/?rev=53&view=rev Author: ligges Date: 2007-09-14 03:12:29 -0700 (Fri, 14 Sep 2007) Log Message: ----------- bugfix: we have to read the buffer as fixed width format now, unfortunately ... Modified Paths: -------------- trunk/BRugs/R/model.modules.R Modified: trunk/BRugs/R/model.modules.R =================================================================== --- trunk/BRugs/R/model.modules.R 2007-09-14 10:11:39 UTC (rev 52) +++ trunk/BRugs/R/model.modules.R 2007-09-14 10:12:29 UTC (rev 53) @@ -5,5 +5,9 @@ command <- "BugsEmbed.Modules" .C("CmdInterpreter", command, nchar(command), integer(1), PACKAGE="BRugs") buffer <- file.path(tempdir(), "buffer.txt") - read.table(buffer) + result <- read.fwf(buffer, c(50, 12, 12, 12, 12, 10), skip = 1, as.is=TRUE) + for(i in c(1,4,5,6)) + result[,i] <- gsub(" ", "", result[,i]) + names(result) <- c("Module", "Clients", "Version", "Maintainer", "Compiled", "Loaded") + return(result) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |