similar to: shell()/system() question

Displaying 20 results from an estimated 3000 matches similar to: "shell()/system() question"

2002 Aug 26
5
updating n within for(i in 1:n) loop
Hi folks: I think I'm having problems with figuring this one out: test1 <- function() { n <- 2 for(i in 1:n) { cat(paste("i =", i, "\n")); flush.console() n <- 5 # version 1 #n <<- 5 # version 2 #assign("n", 5, envir = environment(test1)) # version 3 } } I need the for(.) loop to run (say) n=5 times within the
2002 Mar 05
3
reading 2-byte integers using readBin and connections
Hi folks: This may be a stupid question, but I cannot seem to find a way to tell readBin that I want to read 2-byte integers from the connection. The input file is 150,720 bytes long containing 75,360 short (2-byte) integers. But specifying "integer" or "int" for what in readBin only returns me a vector of length 37680, leading me to believe that sizeof(integer) or
2003 Jan 29
1
dyn.load warning message in R1.6.2 on Windows XP
Hi folks: I used to load a DLL fine up until R 1.5.1. The same DLL dyn.loaded under R 1.6.2 prints the following warning message: > dyn.load("C:/Rajiv/Bin/rpdate.dll") Warning message: DLL attempted to change FPU control word from 8001f to 9001f > Any indication as to what the warning means, and whether I should be concerned about it? The DLL is made from a pure C code,
2004 Oct 17
2
Re: [R] Problem Compiling R-2.0.0 on Linux Alpha
Thanks, Peter, and Prof. Ripley. My efforts last night was mostly futile except that it told me about the embedded newline in Built field. Prof. Ripley: how do I get your fixes? Can I just download R-2.0.0-patched? Rajiv -------- Rajiv Prasad Scientist, Hydrology Group Pacific Northwest National Laboratory, P.O. Box 999, MSIN K9-33 Richland, WA 99352 Voice: (509) 375-2096 Fax: (509) 372-6089
2004 Oct 16
3
Problem Compiling R-2.0.0 on Linux Alpha
Hi folks: I'm trying to compile R-2.0.0 on my Alpha (164SX; alphapca56-unknown-linux-gnu) running RedHat Linux 7.2 with gcc3.4.1. Here is where the compile terminates: .... .... building package 'tcltk' mkdir -p -- ../../../library/tcltk/R mkdir -p -- ../../../library/tcltk/demo mkdir -p -- ../../../library/tcltk/exec mkdir -p -- ../../../library/tcltk/man make[4]: Entering directory
2004 Oct 16
3
Problem Compiling R-2.0.0 on Linux Alpha
Hi folks: I'm trying to compile R-2.0.0 on my Alpha (164SX; alphapca56-unknown-linux-gnu) running RedHat Linux 7.2 with gcc3.4.1. Here is where the compile terminates: .... .... building package 'tcltk' mkdir -p -- ../../../library/tcltk/R mkdir -p -- ../../../library/tcltk/demo mkdir -p -- ../../../library/tcltk/exec mkdir -p -- ../../../library/tcltk/man make[4]: Entering directory
2003 Nov 13
1
Can't get Sweave syntax highlighting with Emacs
I can't get Emacs to automatically do syntax highlighting of Sweave files. I have followed Friedrich's suggestion for code to insert into my .emacs file. The complete section from my .emacs file is given below. When I load a *.Snw file, font is white until I press M-x, then the first code and document chunks get highlighted, but not the rest of the file. Latex and Noweb menus are
2001 Nov 28
1
fill patterns
Hi folks: Any idea when the density and angle arguments to polygon() are to be implemented? Or is there another way to achieve hatching fill patterns? TIA. Rajiv. -------- Rajiv Prasad Postdoctoral Research Associate, Hydrology Group Pacific Northwest National Laboratory, P.O. Box 999, MSIN K9-33 Richland, WA 99352 Voice: (509) 375-2096 Fax: (509) 372-6089 Email: rajiv.prasad at pnl.gov
2001 Mar 28
1
Help: Using R from C
Hi folks: I am just beginning to try and use R from my own C programs. Platform is Windows2000, compiler Visual C++ 6.0. I built the import library R.lib from R.dll using the VC LIB.exe program. Here is a simple code I am trying to compile and run (no C++, VC++ is instructed to treat it strictly as C): #include "R.h" #include "Rinternals.h" int main(void) { int i; char
2001 May 10
3
lookup function for density(...) objects
Hi folks: Is there a lookup function that returns the variate given the cumulative probability for an object returned by the density(...) function? > mydata _ as.vector(mymatrix) > mydata.density _ density(mydata) > mydata.p80 _ lookup(mydata.density, p=0.8) # is there any function to accomplish this task? Thanks. Rajiv. -------- Rajiv Prasad, Postdoctoral Research Associate,
2001 May 14
0
followup: lookup function for density(...) objects
Thanks to Ross Ihaka and Bob Wheeler for responding to my earlier question. I looked into the Johnson system functions in SuppDists package. For now, I want to stick with the density(...) estimator, and so still need the variate lookup function. As per Ross' suggestion, I just did a numerical integration on the density object and used approxfun/splinefun to "lookup" the variate
2013 May 13
3
[PATCH] Specify PAM Service name in sshd_config
Hello All, The attached patch allows openssh to specify which pam service name to authenticate users against by specifying the PAMServiceName attribute in the sshd_config file. Because the parameter can be included in the Match directive sections, it allows different authentication based on the Match directive. In our case, we use it to allow different levels of authentication based on the
2004 Dec 16
2
Unsightly lines from x*y grid in levelplot with Postscript
When I generate levelplot figures with Postscript, the lines from the underlying grid (i.e., the x and y in z ~ x* y) show up as faint white lines in the output. If I have a dense grid, the lines wash out the contour colors. I can avoid the problem if I use png instead, but that brings up other problems. Any ideas for how I can get Postscript to not show those lines around the cells? Scott
2005 Jan 14
0
Code contributed for a gant (Gantt) chart
I searched CRAN for material on gant (or Gantt) charts, those schedule plots that look like horizontal barplots where the x-axis is time. Finding none, I wrote the following and am submitting it to the archive so that it may help someone in the future. plotfile <- "gant.eps" regular.color <- "lightgray" important.color <- "yellow" tasks <- list() #
2002 Mar 27
0
Re: RE Vertical bars with barchart()
Hi, [I'mm cc-ing r-help on this, since some others might be interested (Tony Rossini is, at least)] Yes, I saw your mail and was wondering about what would be the best approach to do it. It's definitely not trivial, mainly because Trellis is not designed to handle factors on the x-axis (chiefly for convenience, as factors typically have long names which are difficult to write on the
2007 Mar 08
1
sink with R-code
I have the same question that Eusebio had: Is there a function similar to "sink" that redirect also R code to a file that is: sink("R001") x <- c(2,-6,-4,8,5,4,1,3,4,-9,0,1) A <- matrix(x, ncol=3) A A.prima <- t(A) A.prima dim(A) dim(A.prima) sink() create a file "R001" with contents: ------------------------------------------ [,1] [,2] [,3] [1,]
2004 Jul 13
1
summary() doesn't work with Date class objects
The handy function summary() doesn't work correctly with Date class objects: > R.version.string [1] "R version 1.9.1, 2004-06-21" > b <- as.Date(c("2002-12-26", "2002-12-27", "2002-12-28", "2002-12-29", "2002-12-30")) > b [1] "2002-12-26" "2002-12-27" "2002-12-28" "2002-12-29"
2010 Mar 03
2
Screen settings for point of view in lattice and misc3d
I'm making some 3D plots with contour3d from misc3d and wireframe from lattice. I want to view them from below; i.e. the negative z-axis. I can't figure out how to do so. I would like my point of view looking up from below, with the z, y, and x axes positive going away. Can anyone tell me the correct settings for screen to achieve this? Here is what I've found so far:
2002 May 01
3
upgrading to 1.5.0/uninstalling 1.4.1 on Linux
Hi folks: I have a feeling this must be a FAQ, but I did not find the answer in R Installation and Administration manual. Please point me to the right place to look for answer to this question if it's already answered. I am running 1.4.1 on an Alpha PCA56 (aka 164SX) running Redhat Linux 7.1 (kernel 2.4.19-pre4). I built 1.4.1 from sources and it is installed in /usr/local (the
2002 Mar 27
2
Vertical bars with barchart()
I would like to create a barchart that has vertical instead of horizontal bars. My goal is something similar to Figure 6.10 (p. 166) in "The Basics of S and S-plus," except for the orientation of the bars. I don't think bwplot() or xyplot() will work. Any suggestions? Scott Waichler Hydrology Group/Environmental Technology Division Battelle Pacific Northwest National Laboratory