similar to: Ignoring version numbers when installing packages...

Displaying 20 results from an estimated 2000 matches similar to: "Ignoring version numbers when installing packages..."

2011 Nov 21
3
How do I query "..." in a function call?
This is probably a very noobish question, but if I want to create a function that allows an undetermined number of, say, numeric vectors to be fed to it, I would use: myfunction = function(...) { # Do something } Right? If so, how do I a) count the number of vectors "fed" to the function, and b) how do I treat those vectors as variables, e.g. for the call:
2012 Apr 05
4
Best way to search r- functions and mailing list?
R-helpers: It looks like http://finzi.psych.upenn.edu/search.html has stopped spidering the mailing lists -- this used to be my go-to site for searching for R solutions. Are there any good replacements for this? I want to be able to search both functions and mailing lists at the same time. Cheers! --j -- Jonathan A. Greenberg, PhD Assistant Professor Department of Geography University of
2012 Apr 09
1
Listing the contents of an FTP directory via R?
R-helpers: I'd like to be able to store all the file information from an ftp site (e.g. file and foldernames) through an R command. Any ideas how to do this? Here's an example site to use: ftp://e4ftl01.cr.usgs.gov/MOTA/MCD15A3.005 --j -- Jonathan A. Greenberg, PhD Assistant Professor Department of Geography and Geographic Information Science University of Illinois at
2012 May 02
6
Quickest way to make a large "empty" file on disk?
R-helpers: What would be the absolute fastest way to make a large "empty" file (e.g. filled with all zeroes) on disk, given a byte size and a given number number of empty values. I know I can use writeBin, but the "object" in this case may be far too large to store in main memory. I'm asking because I'm going to use this file in conjunction with mmap to do parallel
2013 Jul 12
2
"Proper" way to use a "hidden" function in an R-package?
R-developers: I'm working on updating my R package "spatial.tools", and one thing I was wondering was the proper way to have hidden functions -- should I simply not export them to the namespace and use the ::: operator to call them (which is what I currently do)? --j -- Jonathan A. Greenberg, PhD Assistant Professor Global Environmental Analysis and Remote Sensing (GEARS)
2011 Nov 21
1
Creating a list from all combinations of two lists
R-helpers: Say I have two lists of arbitrary elements, e.g.: list1=list(c(1:3),"R is fun!",c(3:6)) list2=list(c(10:5),c(5:3),c(13,5),"I am so confused") I would like to produce a single new list that is composed of all combinations of the "top level" of list1 and list2, e.g.: listcombo=list(list(list1[[1]],list2[[1]]),list(list1[[1]],list2[[2]]
2012 Apr 02
1
Parallel writes in R
R-helpers: I'm curious what support R has for parallel writes to a binary file? If I want to use snow to have each node write different "rows" of a flat binary file (possibly out of sequence), are there any tricks/issues I should be aware of? --j -- Jonathan A. Greenberg, PhD Assistant Professor Department of Geography University of Illinois at Urbana-Champaign 607 South Mathews
2011 Nov 21
1
Setting hostname in the .Renvironment
This is a follow-up to a question I asked a few years back. We have a pair of computers that share a common home directory (and therefor a common .Renviron) with identical hardware, but very different sets of libraries such that using a "shared" R_LIBS between two computers does not work. They both use this as the default library for user installations:
2012 Apr 19
3
Solve an ordinary or generalized eigenvalue problem in R?
Folks: I'm trying to port some code from python over to R, and I'm running into a wall finding R code that can solve a generalized eigenvalue problem following this function model: http://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.eig.html Any ideas? I don't want to call python from within R for various reasons, I'd prefer a "native" R solution if one
2013 Jan 22
2
Adding a line to barchart
R-helpers: I need a quick help with the following graph (I'm a lattice newbie): require("lattice") npp=1:5 names(npp)=c("A","B","C","D","E") barchart(npp,origin=0,box.width=1) # What I want to do, is add a single vertical line positioned at x = 2 that lays over the bars (say, using a dotted line). How do I go about doing this?
2013 Jun 10
1
Policy/best practices on renaming functions in packages
R-developers: I'm beginning to work on a manuscript for a set of functions I developed for a package I have on CRAN (spatial.tools), and I'd like to rename a function in my package to give a better idea of what it does prior to manuscript submission -- is there a "safe" way to do a backwards-compatible rename of a function within a CRAN package (so functions that rely on the
2013 Feb 01
3
Loading a list into the environment
R-helpers: Say I have a list: myvariables <- list(a=1:10,b=20) Is there a way to load the list components into the environment as variables based on the component names? i.e. by applying this theoretical function to myvariables I would have the variables a and b loaded into the environment without having to explicitly define them. --j -- Jonathan A. Greenberg, PhD Assistant Professor
2013 Apr 16
4
Singular design matrix in rq
Quantreggers: I'm trying to run rq() on a dataset I posted at: https://docs.google.com/file/d/0B8Kij67bij_ASUpfcmJ4LTFEUUk/edit?usp=sharing (it's a 1500kb csv file named "singular.csv") and am getting the following error: mydata <- read.csv("singular.csv") fit_spl <- rq(raw_data[,1] ~ bs(raw_data[,i],df=15),tau=1) > Error in rq.fit.br(x, y, tau = tau, ...) :
2013 Oct 03
1
Including R code from another package...
R-developers: I had a quick question for the group -- let's say a package I am developing depends on a single, small function from a large CRAN-listed package. I can, of course, set a dependency within my own package, but are there means by which I can include the R script + man file DIRECTLY in my package (of course attributing the code to the original programmer). Does it require me
2013 Mar 21
2
Check if a character vector can be coerced to numeric?
Given an arbitrary set of character vectors: myvect1 <- c("abc","3","4") myvect2 <- c("2","3","4") I would like to develop a function that will convert any vectors that can be PROPERLY converted to a numeric (myvect2) into a numeric, but leaves character vectors which cannot be converted (myvect1) alone. Is there any simple way
2013 Oct 20
1
Question about selective importing of package functions...
I'm working on an update for my CRAN package "spatial.tools" and I noticed a new warning when running R CMD CHECK --as-cran: * checking CRAN incoming feasibility ... NOTE Maintainer: 'Jonathan Asher Greenberg <spatial-tools@estarcion.net>' Depends: includes the non-default packages: 'sp' 'raster' 'rgdal' 'mmap' 'abind'
2013 Oct 30
2
Where to drop a python script?
R-developers: I have a small python script that I'd like to include in an R package I'm developing, but I'm a bit unclear about which subfolder it should go in. R will be calling the script via a system() call. Thanks! --j -- Jonathan A. Greenberg, PhD Assistant Professor Global Environmental Analysis and Remote Sensing (GEARS) Laboratory Department of Geography and Geographic
2012 Oct 17
2
Completely ignoring an error in a function...
The code base is a bit too complicated to paste in here, but the gist of my question is this: given I have a function myfunction <- function(x) { # Do something A # Do something B # Do something C } Say "#Do something B" returns this error: Error in cat(list(...), file, sep, fill, labels, append) : argument 2 (type 'list') cannot be handled by 'cat' A standard
2012 Dec 06
2
Best way to coerce numerical data to a predetermined histogram bin?
Folks: Say I have a set of histogram breaks: breaks=c(1:10,15) # With bin ids: bin_ids=1:(length(breaks)-1) # and some data (note that some of it falls outside the breaks: data=runif(min=1,max=20,n=100) *** What is the MOST EFFICIENT way to "classify" data into the histogram bins (return the bin_ids) and, say, return NA if the value falls outside of the bins. By classify, I mean
2013 Sep 27
2
Error: C stack usage is too close to the limit when using list.files()
R-helpers: I'm running a file search on my entire drive (Mac OS X) using: files_found <- list.files(dir="/",pattern=somepattern,recursive=TRUE,full.names=TRUE) where somepattern is a search pattern (which I have confirmed via a unix "find / -name somepattern" only returns ~ 3 results). I keep getting an error: Error: C stack usage is too close to the limit when