similar to: .Platform addition (was Re: where does R search when source()?)

Displaying 20 results from an estimated 4000 matches similar to: ".Platform addition (was Re: where does R search when source()?)"

2004 Sep 15
7
Splitting vector into individual elements
Is there a means to split a vector into its individual elements without going the brute-force route for arguments to a predefined function call? offred.rgb <- c(1, 0, 0) * 0.60; ## Brute force style offred.col <- rgb(offred.rgb[1], offred.rgb[2], offred.rgb[3], names = "offred") ## Desired style
2007 Apr 05
8
package for Matlab
Hallo, does a package for Matlab exist in R? If yes, where can I find it and how can I install it under R? Thanks, Corinna
2005 Feb 14
2
Test Tools
Anyone aware of tools available that can provide complexity metrics and/or code coverage analysis for R source? ---------------------------------------------------------- SIGSIG -- signature too long (core dumped)
2005 May 18
2
R Include File Guards
R 2.1.0/src/include from 2005/04/18 download Naming inconsistent for guards as well but that's pedantic. Simple convention: file <foo.h> #ifndef R_FOO_H file <R_ext/bar.h> #ifndef R_EXT_BAR_H Missing guards: <IOStuff.h> <Internal.h> <Parse.h> <R_ext/GraphicsBase.h> <R_ext/GraphicsDevice.h> <R_ext/GraphicsEngine.h>
2005 Jul 19
2
R_AllocatePtr
Had been looking into Luke Tierney's R_AllocatePtr() and was left with a question about exactly when does R reclaim heap memory. Implication of 'simpleref.nw' is that one can allocate C data on the R heap, and as long as pointer object is alive, the data and pointer will remain valid. But it calls allocString() which is implemented using R_alloc(). 'Writing R Extensions" says
2004 Jul 06
1
Enumeration in R
I want the equivalent of this 'C' declaration. enum StoplightColor { green = 3, yellow = 5, red = 7 }; This mostly works except the validity checking doesn't seem to occur automatically. What didn't I do to enable it? setClass("stoplightColor", representation(value = "integer"), prototype = integer(1))
2004 Aug 25
2
[Q] Apply Function Over Multiple Array Margins
Is there a canonical means to apply a function over multiple arrays simultaneously? For example, if I wanted to plot each line with a different color? Or is a for loop conversion my best option? x <- seq(0, 8, by = 2) y <- matrix(1:15, nrow = 5, byrow = TRUE) my.colors <- heat.colors(3) drawLines <- function(row) { lines(x, row) # want corresponding 'my.colors' here }
2004 Nov 09
1
Need car() and cdr() for '...'
Needed to redefine function "sum" for my MATLAB package. There's something similar in Chambers's Green Book (pg 351) so I modified it as such: library(methods) setGeneric("sum", function(x, ..., na.rm = FALSE) { if (nDotArgs(...) > 0) sum(c(sum(x, na.rm = na.rm), sum(..., na.rm = na.rm))) else standardGeneric("sum") })
2004 Jul 07
2
Win32 & C code
Hi, I'm trying to get C code working with R. This is my first time writing C on Windows and I'm making a mess of it. Help! I'm following the example in Roger Peng's "An Introduction to the .C interface to R". The C code is: #include <R.h> void hello(int *n){ int i; for(i=0; i < *n; i++) { Rprintf("Hello, world!\n"); } } I seem to be unable
2004 Sep 28
2
S4 method selection based on second argument
I'm translating some Matlab code and need some help figuring out how to change this call into an S4 generic method. In matlab, there's a function called 'repmat' with three calling sequences (all I have to deal with anyway): 1) B = repmat(A, m, n) 2) B = repmat(A, [m n]) 3) B = repmat(A, n) In all cases, A is the fill value, m is number of rows, and n is number of
2005 Jun 29
1
(PR#7972) row-side color bars ... in heatmap
Hi Kevin, >>>>> "krc" == krc <krc at odin.mdacc.tmc.edu> >>>>> on Mon, 27 Jun 2005 21:55:37 +0200 (CEST) writes: krc> Full_Name: Kevin R. Coombes krc> Version: 2.1.0 krc> OS: Windows XP krc> Submission from: (NULL) (143.111.224.169) krc> When revC = TRUE and RowSideColors is set to a list of krc>
2007 Dec 17
1
gene shaving method
Does anyone know if Hastie's gene shaving method is implemented in R Thanks, Aimin
2007 Apr 26
2
SweaveInput and absolute paths
Hi, Is there a way to turn off the automatic inclusion of "./" at the beginning of a path specified in an \SweaveInput{} instruction? I'd like to create some reusable "template modules" of Sweave code and put them in a standard directory like /Resources/Affymetrix Then the corresponding file that uses one of these would include a command like
2004 Jul 10
6
where does R search when source()?
Exactly where does R search for foo.R if I type source("foo.R")? Only from current working directory (same as getwd()), from all directories specified by e.g. $PATH? Thanks. Daehyok Shin
2004 Jul 10
6
where does R search when source()?
Exactly where does R search for foo.R if I type source("foo.R")? Only from current working directory (same as getwd()), from all directories specified by e.g. $PATH? Thanks. Daehyok Shin
2010 Jul 20
2
loop through files and create object
Hi R users, I am a newbie and therefore the naive question. Sorry but I was unable to find an answer online. I would like to read 47 data sets (country1.raw, country2.raw, ... country47.raw) and save into a matrix each time (data1, data2, ....data47). for (i in 1:47){ data(?) <- read.csv(file.path("country", i, ".raw", fsep = ""), header = TRUE) } The read.cvs
2009 May 22
2
Returning only a file path on Windows
I am choosing a file like this: #Bring up file selection box fn<-file.choose() fp<-file.path(fn,fsep='\\') Unfortunately, the file path contains the short file name and extension as well. I had hoped to get only the path so I could make my own long filenames (for output graphs) by concatenation with this file path. Of course I can split the string and assemble the components from
2009 Nov 23
6
CRAN Server download statistics (Was: R Usage Statistics)
Hi All, It seems that the question of how may people use (or download) R, and it's packages is one that comes up on a fairly regular basis in a variety of forums (There was also recent thread on the subject on Stack Overflow). A couple of students at UCLA (including myself), wanted to address the issue, so we set up a system to get and parse the cran.stat.ucla.edu APACHE logs every night, and
2018 Apr 13
0
Fwd: R Timeseries tsoutliers:tso
Hello, Writing to seek help in regard to some unexpected performance anomaly i am observing in using tsoutlers:tso on the mac vs on an AWS cloud server.. I am running the following code with very small dataset of about 208 records. d.dir <- '/Users/darshanpandya/xxxxxx' FNAME <- 'my_data.csv' d.input <- fread(file.path(paste0(d.dir,"/zzz/"),FNAME,fsep =
2007 Mar 15
1
Sweave bug using 'FDR' in chunk label (PR#9567)
Full_Name: Kevin Coombes Version: 2.4.0 OS: Windows XP Submission from: (NULL) (143.111.22.24) I'm running R 2.4.0 on a Windows XP machine, with only the default packages loaded. Running Sweave or Stangle on the following Rnw file: -------------- % bug.Rnw \begin{document} Demonstrate an Sweave/Stangle bug. <<info>>= sessionInfo() @ <<getFDR>>= x <- 1 @