[R] Problems with roxygen2 when building package
Hi I am trying to build my own package. When I run in RStudio (R3.3.2, all packages updated, Roxygen available, Windows 10 machine) build-document, I get the following error message: ==> devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) Fehler in check_dep_version(pkg, version, compare) : Dependency package roxygen2 not available. Ruft auf: suppressPackageStartupMessages ... -> check_suggested -> check_dep_version Ausf�hrung angehalten Any suggestions, would be welcome Renger __ Dr. Renger van Nieuwkoop Department of Management, Technology and Economics Centre for Energy Policy and Economics Swiss Federal Institute of Technology Zurich Zürichbergstrasse 18, CH-8032 Zurich Mobile: +41 79 818 53 73 E-Mail: reng...@ethz.ch Director Modelworks Goldiwilstrasse 16 F CH-3600 Thun E-Mail: i...@modelworks.ch Blog: http://blog.modelworks.ch __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Problems with hmisc under WIndows 8
Hi I use hmisc on a Windows 9-x64 machine and it causes an error: running command 'cd C:\Users\Renger\AppData\Local\Temp\Rtmp4IOgfH pdflatex -interaction=scrollmode C:\Users\Renger\AppData\Local\Temp\Rtmp4IOgfH\file1b9482a7388' had status 127 It also gives an API error 2. The file is in the directory mentioned in the error message and, in a dos window, I can change to that directory and run pdflatex on the file without a problem. I tried to set the working directory to c:\temp and the tempdir also to c:\temp, but this did not help. The problem happens in ESS/Emacs and under RStudio. Any idea what can be the cause? (I searched the internet, but it seems nobody has a solution). Thanks Renger _ Renger van Nieuwkoop Goldiwilstrasse 16 F 3600 Thun +41 33 221'53'05 (p) +41 79 818'53'73 (m) ren...@vannieuwkoop.ch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tables with row sorted numerically although factors
Hi I am using the package tables and want to have the rows in the numerical order and not in the alphabetical order: library(tables) Nodes - c(1,10,20,2) Values- c(1,2,3,4) Data - data.frame(cbind(Nodes,Values)) data$Nodes- as.factor(as.character(data$Nodes)) # necessary to get factors for tabular tabular(Nodes ~ Values*mean, data=data) Values Nodes mean 1 1 102 2 4 203 And what I want is this: Values Nodes mean 1 1 2 4 102 203 Any idea how to do this? (the solution is not to write 01, 02, 10, 20, because I use Nodes in lot of places elsewhere, where I can't use 01, etc.) Cheers Renger _ Renger van Nieuwkoop Centre of Economic Research (CER-ETH) Zürichbergstrasse 18 (ZUE) CH - 8032 Zürich +41 44 632 02 63 mailto: reng...@etzh.ch blog.modelworks.ch [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Merging big data sets
Hi I have 6 rather big data sets (between 40 and 80 lines) on transport data (times, distances and travelers between nodes). They all have a common index (start-end nodes). I want to aggregate this data, but for that I have to merge them. I tried to use merge with the result that R (3.0.1) crashes (Windows 8 machine, 16 Gb Ram). Then I tried the join from the data.table package. Here I got the message that 2^34 is too big (no idea why it is 2^34 as it is a left join). Then I decided to do a loop using the tables and assigning them, which takes a very, very long time (still running at the moment). Here is the code: for (i in 1:length(dataP$Start)){ c-dataP$Start[i] d-dataP$End[i] dataP[J(c,d)]$OEV.T-ttoevP[J(c,d)]$OEV.T } dataP has 800'000 lines and ttoevP has about 500'000 lines. Any hints to speed up this process are welcome. Renger _ Centre of Economic Research (CER-ETH) Zürichbergstrasse 18 (ZUE) CH - 8032 Zürich +41 44 632 02 63 mailto: reng...@etzh.chmailto:reng...@etzh.ch blog.modelworks.ch [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Coloring comments differently
Hi I use outline mode in ESS and was wondering if it is possible to change the color of the comments depending on the level. E.g. # Green Red ### Blue Cheers Renger Modelworks Gewerbestrasse 15 3600 Thun - Switzerland +41 79 818 53 73 i...@modelworks.ch blog.modelworks.ch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Interfacing between Optimization Software and R
Dear all I was wondering, if there are reasons for R-Users to use (commercial) solver packages like GAMS, AMPL, Matlab, etc. These packages can solve all kind of mathematical optimization problems like (non-) linear problems, mixed complementarity problems, etc. Why I want to know? GAMS corporation developed a R package to send data from GAMS to R (or vice versa). It is called gdxrxw. I use this package a lot for my network models I solve with GAMS, sending the results from GAMS to R for plotting, generating tables in LaTeX and statistical analysis (see some of my post on blog.modelworks.ch). However, until now, for my personal use, I don't use the package the other way around (R - Gams). I am writing a small article on this interface and was wondering if there are situations, where R-Users would be grateful for having the possibility to interact with solver software. Any reaction would be very much appreciated. Renger Modelworks Gewerbestrasse 15 3600 Thun - Switzerland +41 79 818 53 73 i...@modelworks.ch blog.modelworks.ch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] rscript in cmd window stop
Hi I am trying to run a R-script in the windows command window: e.g. rscript example.R ... It plots some stuff, but using par(ask=T) doesn't let the plotting pause. Any idea how to do this? Thanks Renger __ Renger van Nieuwkoop Goldiwilstrasse 16 F / 3600 Thun Tel +41 33 221 53 05 / +41 79 818 53 73 mailto: ren...@vannieuwkoop.ch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Bug or just a problem with the computer precision?
Hi I have the following problem: I have a lot of numbers that identify import goods according to the Harmonised System (8 numbers in two groups with a dot in between). I want to move to the 6 numbers (4 numbers, dot, two numbers). My trick to do this works for all the numbers in the Harmonised Sytem but not for this one: A-4709.9000 (A-floor(100 * A ) / 100) = 4709.89 But this has to be 4709.90 If I do this in Excel it works fine...Any idea how to make sure that I get 4709.90 and not 4709.89? Renger _ ECOPLAN Forschung und Beratung in Wirtschaft und Politik Economic Research and Policy Consultancy Thunstrasse 22 / CH-3005 Berne (Switzerland) Phone: +41 31 356 61 61 / Fax: +41 31 356 61 60 mailto:[EMAIL PROTECTED] / http://www.ecoplan.ch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.