Hi there, I have the following problem and I hope somebody might help me. First of all: I am using WinXP SP3 (english and/or german) with R in Version 2.10.0. Now I am trying to install some packages but unfortunately I am getting a weird error. No matter which package I am trying to install - I nearly get the same error. It looks like this: ----------------------------------------------------------------------------- C:\Program Files\R\R-2.10.0\bin>R CMD INSTALL %SystemDrive%\rPAcsTemp\car_2.0-2. zip Warning in rawToChar(block[seq_len(ns)]) : truncating string with embedded nul: 'PK\003\004\n\0\0\0\0\01??G=\0\0\0\0\0\0\0 \0\0\0\0\0\004\0\0\0car/PK\003\004\n\0\0\0\0\0-??G=\0\0\0\0\0\0\0\0\0\0\0\0\t\0\0 \0car/data/PK\003\004\024\0\002\0\b\0-??G=+2&??[\t\003\0??-\003\0\022' Warning in rawToChar(block[101:107]) : truncating string with embedded nul: '\0\0\0car/' Error in switch(rawToChar(z), ` ` = { : invalid octal digit ----------------------------------------------------------------------------- I am trying to install with a batch-script that looks like this: ----------------------------------------------------------------------------- SET rVersion=2.10.0 SET RPfad=%ProgramFiles%\R\R-%rVersion%\bin\ set RPacPfad=software\R_packages REM ############################################# REM #### copyying to a folder without spaces REM ############################################# cd %windir% cd .. mkdir rPAcsTemp cd %OrdnerDIR%\%RPACPFAD% copy *.zip %SystemDrive%\rPAcsTemp cd %RPFAD% R CMD INSTALL %SystemDrive%\rPAcsTemp\car*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\dbi*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\zipfR*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\lme4*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\coda*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\languageR*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\lattice_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\mvtnorm_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\multcomp_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\R.oo_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\R.methodsS3_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\R.matlab_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\RPostgreSQL_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\tree_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\xtable_*.zip R CMD INSTALL %SystemDrive%\rPAcsTemp\emu*.tar.gz cd %Back-to-Normal% ----------------------------------------------------------------------------- Does anybody have an idea why I am recieving these error-messages? I thought about buggy files but after downloading the files (from http://cran.r-project.org/bin/windows/contrib/2.10/ ) again I could reproduce the messages. By the way: Is there a better method installing packages? I tried within R "install.packages" from online and local repository but that only works for the user I am installing with. Thanks in advance for the replies Erik
( hotmail just randomly decides not to prefix original text, my comments below) ---------------------------------------- Date: Tue, 14 Dec 2010 17:36:11 +0100 From: erikl at phonetik.uni-muenchen.de To: r-help at r-project.org Hi there, I have the following problem and I hope somebody might help me. First of all: I am using WinXP SP3 (english and/or german) with R in Version 2.10.0. Now I am trying to install some packages but unfortunately I am getting a weird error. No matter which package I am trying to install - I nearly get the same error. It looks like this: ----------------------------------------------------------------------------- C:\Program Files\R\R-2.10.0\bin>R CMD INSTALL %SystemDrive%\rPAcsTemp\car_2.0-2. zip Warning in rawToChar(block[seq_len(ns)]) : truncating string with embedded nul: MEEEE:::::: I used to build all from source then that stopped working and I have seen others here complain about installation failures. I have had? good luck with what others have suggested, and use install.packages() It goes into a script ok, for example, ( note that "myR" is my script that invokes R but you can change etc). This points to ucla mirror, writes a script into $tf to install $pkf,? installs $pkf by running the gerated script, and then shows you the results and deletes junk ( normally you want to check error codes before deling "junk" however) tf="$$_temp" cat - << DUMMTY? > $tf options(repos=c("http://cran.stat.ucla.edu")) install.packages(c("$pkf"),dep=TRUE) DUMMTY echo executing cat "$tf" myR -run "$tf" echo removing $tf rm "$tf" echo removing R output cat "$tf".Rout rm "$tf".Rout