similar to: Readbin and file position

Displaying 20 results from an estimated 2000 matches similar to: "Readbin and file position"

2004 Feb 12
1
Importing BSQ/BIP/BIL files into R
I was hoping I could get some help with an import question. I work with remote sensing imagery which commonly comes in binary form in various interleaving formats (byte interleaved by line, by pixel, etc..). These files are 2d spatial x B bands in size, and I want to be able to extract the band values from various pixels (so each line of data into R would be one pixel x B bands). What's the
2004 Feb 19
4
1024GB max memory on R for Windows XP?
I have 2GB installed on my windows XP box running R 1.9.0, and after performing a prune.tree(intree,newdata), I get an out of memory error within R, but it says the maximum allowed is 1024gb (1/2 of what I have!) Can R not use more than 1GB on an XP box? I noticed I had ~600mb left over after R conked out, so clearly I had more memory... What about virtual memory? --j -- Jonathan Greenberg
2002 Mar 17
2
Running R on MacOS X
Hi there -- I downloaded the MacOS X binaries of R and followed the instructions on installing it, and when I go to perform a tree function, I get the error "Error: couldn't find function "tree"". Do I need to somehow preload the function? If so, how do I do that? Also, update.packages() works for some packages, but not all -- it often fails in the compilation. I have
2011 Aug 23
5
Easier ways to create .Rd files?
R-helpers: Are there any ways to auto-generate R-friendly (e.g. will pass a compilation check) .Rd files given a set of .R code? How about GUIs that help properly format the .Rd files? Thanks! I want a basic set of .Rd files that I can update as I go, but as with most things my documentation typically lags behind my coding by a few days. --j -- Jonathan A. Greenberg, PhD Assistant Project
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)
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, ...) :
2002 Nov 09
2
Nonlinear regression and categories
Hi there: I'm trying to run a large number of nonlinear regressions on a time series dataset, where the data will be formatted something to the effect of: ObservationID,time,dependentvar I'll have a number of time and dependentvars for each observation, and I want to apply a nonlinear regression to one ObservationID at a time, and I want to have a dataset that is the parameter
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
2009 Aug 27
19
Best R text editors?
Quick informal poll: what is everyone's favorite text editor for working with R? I'd like to hear from people who are using editors that have some level of direct R interface (e.g. Tinn-R, Komodo+SciViews). Thanks! --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar Center for Spatial Technologies and Remote Sensing (CSTARS) University of California, Davis One Shields Avenue The
2009 Mar 18
2
How do I set the Windows temporary directory in R?
I'm trying to redirect where temporary files go under R to D:\temp\somerandomname from its default (C:\Documents and Settings\username\Temp\somerandomname) -- how do I go about doing this? --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar Center for Spatial Technologies and Remote Sensing (CSTARS) University of California, Davis One Shields Avenue The Barn, Room 250N Davis, CA 95616
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?
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
2009 Oct 23
2
splitting a vector of strings...
Quick question -- if I have a vector of strings that I'd like to split into two new vectors based on a substring that is inside of each string, what is the most efficient way to do this? The substring that I want to split on is multiple characters, if that matters, and it is contained in every element of the character vector. --j -- Jonathan A. Greenberg, PhD Postdoctoral Scholar
2009 Mar 13
2
Using format to add leading zeroes
I have a numerical vector which contains a (poorly) formatted time column, which, in theory, should be HHMM, but was distributed as an integer, so, for 12:15 am, it is saved as "15" (e.g. HHMM = 0015 with the zeroes stripped). I'm trying to use this in conjunction with strptime, but I'm thinking because each time is an integer ranging from 1 to 4 digits, I probably need to
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
2009 Jun 16
2
Statistically detecting thresholds...
Rers: I have some ecological data (stream velocity vs. % cover of submerged weeds) that shows strong evidence of a thresholding step-function, e.g. below some velocity, % cover ranges from 0% to 100% (with no apparent relationship to velocity within this range of velocities), but above a certain "threshold" velocity, the % cover does not appear to exceed, say, 10%. There are good
2009 Nov 02
2
"Safe" way to automatically install required packages...
R-helpers: I'm working on an r-package that I want to make as easy-to-use as possible for a novice R-user, which includes automatically installing required packages. I, myself, am a novice R-packager, so the solution I came up with was to embed: print("Loading required packages...") if (!require("reshape")) { install.packages("reshape") } if
2011 Jun 29
1
Querying the path separator?
Hopefully this is a pretty easy fix -- I need to have R query the path separator for some code I'm trying to write (it involves using a system() call) -- the call requires a path and a wildcard, e.g.: command="mycommand /path/to/*.files" in the case of unix or, command="mycommand.exe C:\\path\\to\\*.files" on a windows box System.which is working correctly, so the
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