Re: [R] debug R device plot

2011-05-23 Thread Sharpie
cameron.bracken wrote: > > You need to look for a file (it may not be in your project directory) that > contains "___LOCK" in its file name and delete it. > Specifically, the rogue lockfile should be in the same directory as options('tikzMetricsDictionary'). Or, if you haven't set a permanent l

Re: [R] Incorrect positioning of raster images on Windows

2010-10-19 Thread Sharpie
Paul Murrell-2 wrote: > > Hi > > This is a rounding (truncation) problem. > Working on a fix. > > Paul > > Sharpie wrote: >> >> Michael Sumner-2 wrote: >>> I think there's something about the "discrete cell" versus "centre

Re: [R] Incorrect positioning of raster images on Windows

2010-10-18 Thread Sharpie
e2Grid(list(x = 1:ncol(test), y = 1:nrow(test), z = t(test))) > writeGDAL(x, "raster.png", driver = "PNG", type = "Byte") > > > > On Mon, Oct 18, 2010 at 3:17 PM, Sharpie wrote: > >> >> I am working on dumping raster data from R into PNG

[R] Incorrect positioning of raster images on Windows

2010-10-17 Thread Sharpie
I am working on dumping raster data from R into PNG files using rasterImage(). I am working with a test matrix from the rasterImage() example and using it to produce a PNG image with the following code: # From the example for rasterImage(). A 3 pixel by 5 pixel b/w checkerboard. testImage <- as

Re: [R] Fast string comparison

2010-07-11 Thread Sharpie
Ralf B wrote: > > What is the fastest way to compare two strings in R? > > Ralf > Which way is not fast enough? In other words, are you asking this question because profiling showed one of R's string comparison operations is causing a massive bottleneck in your code? If so, which one and how

Re: [R] F# vs. R

2010-07-11 Thread Sharpie
Sergey Goriatchev wrote: > > Hello, Marc > > No, I do not want to validate Cox PH. :-) > I do use R daily, though right now I do not use the statistical part that > much. > > I just generally wonder if any R-user tried F# and his/her opinions. > > Regards, > Sergey > In my work as a program

Re: [R] Passing a LaTeX length to Sweave

2010-07-10 Thread Sharpie
Thomas Levine wrote: > > I'd really love to do this > > \setkeys{Gin}{width=\columnwidth} > <>= > plot(y~x) > @ > > The \columnwidth macro does not work, of course, in the second line. > What can I do instead? > This may be difficult as there is no two-way communication between R and LaTeX i

Re: [R] how to profile R interpreter?

2010-05-16 Thread Sharpie
Erich Neuwirth wrote: > > Look for Rprof in the utils package. > This was already suggested- but the original poster clarified that he is looking to profile the R interpreter it's self, not R scripts. - Charlie Sharpsteen Undergraduate-- Environmental Resources Engineering Humboldt State

Re: [R] Path to R script

2010-05-13 Thread Sharpie
Johannes W. Dietrich wrote: > > At 19:29 Uhr -0400 12.05.2010, Gabor Grothendieck wrote: >>If you are running the file via source("myfile.R") then just put this >>in the file: >> >>this.dir <- dirname(sys.frame(1)$ofile) >> >>This is a bit fragile since changes to the internals of source could >

Re: [R] A primitive OO in R -- where next?

2010-05-12 Thread Sharpie
Ted.Harding-2 wrote: > > Greetings All, > > Out of curiosity, I've just done a very primitive experiment: > > Obj <- list(Fun=sum, Dat=c(1,2,3,4)) > Obj$Fun(Obj$Dat) > # [1] 10 > > That sort of thing (much more sophisticated) must be documented > mind-blowingly somewhere. Where? > > Wh

Re: [R] Path to R script

2010-05-12 Thread Sharpie
Johannes W. Dietrich wrote: > > There is certainly a trivial solution for my question, but I can't > find the answer in the documentation. > > I need a platform independent method to obtain the file path of the > current R script. > > My working group uses R on several machines with differen

Re: [R] inquiry about Version 2.11.0

2010-05-08 Thread Sharpie
Maria Clara Soto Velez wrote: > > Hello, > > I am trying to download the newest versión of R (R version 2.11.0), but I > haven´t been able, because it seems that the file is not working properly. > > Could you help me? > No. You have not provided enough information for us to even take a gue

Re: [R] Sourcing functions

2010-05-01 Thread Sharpie
David Winsemius wrote: > > If you read the Installation and Administration document you should > find material on that process. Look for the section that describes the > care and feeding of .Rprofile or type > > ?Startup # in an R console session. > And when you are ready, the "Writing

Re: [R] How to create R package

2010-04-27 Thread Sharpie
Dinh Diep wrote: > > Hi, > > Can you tell me how to create R package in Windows, and give me an > example that works ? Thanks. > Hi Dinh, Check out the help page for the package.skeleton() function- it will create the outline of a package for you. The "Writing R Extensions" manual will

Re: [R] TikzDevice and texi2dvi

2010-04-27 Thread Sharpie
Lorenzo Isella wrote: > > I think I solved my problems by resorting to the Ubuntu packages at > > http://bit.ly/c8izKy > > Cheers > > Lorenzo > > > Dear All, > I am starting to use the tikzDevice package, but I am experiencing some > (minor problems). > If I try to run the script at the end

Re: [R] Matrix package + mfcol/mfrow

2010-04-27 Thread Sharpie
Gildas Mazo wrote: > > Hi, > > When I load the "Matrix" package, I cannot get the par(mfrow=c(..,..)) > to work, that is, I cannot get to display several images at a time. How > can I fix this problem ? > > Thanks in advance, > > Gildas Mazo > Hmm, the following: require(Matrix) par(mf

Re: [R] Merging files

2010-04-27 Thread Sharpie
Alex Jameson wrote: > > David, > > merg12 > > displays the files > with this message at the bottom > > [reached getOption("max.print") -- omitted 321526 rows]] > > str(merg12) displays the following message > > 'data.frame' : 329218 obs. of 13 variables > > $ patientid: > $ Name: > $ Age:

Re: [R] Scanning only specific columns into R from a VERY large file

2010-04-16 Thread Sharpie
Josh B-3 wrote: > > Hi, > > I turn to you, the R Sages, once again for help. You've never let me down! > > (1) Please make the following toy files: > > x <- read.table(textConnection("var.1 var.2 var.3 var.1000 > indv.1 1 5 9 7 > indv.21 2 9 3 8"), header = TRUE) > > y <- read.table(text

Re: [R] Does "sink" stand for anything?

2010-04-15 Thread Sharpie
Paul Miller wrote: > > Hello Everyone, >   > Learning about R and its wonderful array of functions. If it's not > obvious, I usually try to find out what a function stands for. I think > this helps me remember better. >   > One function that has me stumped is "sink." Can anyone tell me if this >

Re: [R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-15 Thread Sharpie
yehengxin wrote: > > Dear R experts: > > I attempted to compile c source code into DLL using "R CMD SHLIB" but I > found the DLL run in R is almost twice slower than the codes compiled in > C++ 6.0 when I chose "release" option and is as fast as the situation > where I chose "debug" option in

Re: [R] R package documentation

2010-04-14 Thread Sharpie
pomchip wrote: > > Dear R users, > > I am currently writing the documentation for my first package. I have > created a short user manual using sweave/pdflatex which is distinct from > the > manual/summary-of-package-functions created by R CMD CHECK. I was > wondering > how could I seamlessly co

Re: [R] SSH Through R Script

2010-04-12 Thread Sharpie
Sorry about the double post, but this line: Sharpie wrote: > > ssh u...@webserver.com -e "cd ~/.ssh;cat webKey.pub >> authorized_keys" > Should be: ssh u...@webserver.com "cd ~/.ssh;cat webKey.pub >> authorized_keys" I.e., omit the -e f

Re: [R] SSH Through R Script

2010-04-12 Thread Sharpie
tic access by using ssh-agent to hold the identities. For example, I could create a new key for my web server like so: ssh-keygen Enter file in which to save the key (/Users/Sharpie/.ssh/id_rsa): /Users/Sharpie/.ssh/webKey Enter passphrase (empty for no passphrase): superSecretPassword

Re: [R] Rprintf not updating

2010-04-05 Thread Sharpie
Erik Wright wrote: > > Hi Charlie, > > Thanks, I got it working by looking at your myRunIfConcise function. > > SEXP changePercent(SEXP pBar) > { > int *rPercentComplete; > SEXP utilsPackage, percentComplete; > PROTECT(utilsPackage = eval(lang2(install("getNamespace"), > Scal

Re: [R] Rprintf not updating

2010-04-05 Thread Sharpie
Erik Wright wrote: > > Hi Charlie, > > I like your idea of updating an R progress bar from C, but I don't at all > understand how to call txtProgressBar from C. I have looked at Writing R > Extensions and it is equally confusing. Any help would be appreciated. > > Thanks!, > Erik > Hi Erik

Re: [R] Rprintf not updating

2010-04-05 Thread Sharpie
Erik Wright wrote: > > Hello all, > > I am using Rprintf in a C for loop (from .Call) to print a progress > indicator showing the current percent complete. The loop I am doing is an > time intensive call to another function. I have noticed that Rprintf does > not print to the R-window until th

Re: [R] R 2.6 Support Question

2010-04-05 Thread Sharpie
Raadt, Timothy W. wrote: > > > Hello, > > I have a question on the support of the R 2.6 software. We are in the > process of planning for a hardware refresh and our new machines will be > running Windows 7 and Internet Explorer 8. My question is if the R 2.6 > software would be supported o

Re: [R] Creating R packages, passing by reference and oo R.

2010-04-05 Thread Sharpie
Gabor Grothendieck wrote: > > Passing by value does not necessarily mean physical copying. Check out > this: > >> x <- matrix(1:1000^2, 1000, 1000) >> gc() > used (Mb) gc trigger (Mb) max used (Mb) > Ncells 114520 3.1 35 9.4 35 9.4 > Vcells 577124 4.51901092 14.6

Re: [R] memory error

2010-03-31 Thread Sharpie
Janet Choate-2 wrote: > > Thanx for clarification on stating my problem, Charlie. > > I am attempting to merge to files, i.e.: > hi39 = merge(comb[,c("hillID","geo")], hi.h39, by=c("hillID")) > > if this is relevant or helps to explain: > the file 'comb' is 3 columns and 1127 rows > the file '

Re: [R] memory error

2010-03-31 Thread Sharpie
Janet Choate-2 wrote: > > Hi R community, > i have what appears to be a memory allocation problem: > > R(51150) malloc: *** mmap(size=158068736) failed (error code=12) > *** error: can't allocate region > *** set a breakpoint in malloc_error_break to debug > > can anyone tell me how to increas

Re: [R] Confusing concept of vector and matrix in R

2010-03-29 Thread Sharpie
yehengxin wrote: > > Why does R need the concept of "Vector"? In my opinion, it is a useless > and confusing concept. A vector is simply a special case of a matrix > whose row or column number is equal to 1. When I take submatrix from one > matrix and if row or column number is 1, R will auto

Re: [R] Page width figures in Latex

2010-03-28 Thread Sharpie
Rolf Turner wrote: > > > On 29/03/2010, at 4:21 PM, Sharpie wrote: > > > >> There are a bunch of caveats such as the figure/table will only appear at >> the top or bottom of a page and will not appear on the same page as the >> point at which it was

Re: [R] Page width figures in Latex

2010-03-28 Thread Sharpie
Jim Lemon wrote: > > bRotheRs & sisteRs, > I am once again attempting to learn enough Latex voodoo to get something > done, and failing comically. The document "RJAuthorguide.pdf" > mentions that one can get page width figures through the use of the > "figure*" or "table* environments, but des

Re: [R] Competing with SPSS and SAS: improving code that loops throughrows (data manipulation)

2010-03-27 Thread Sharpie
hadley wickham wrote: > >>  exp1^(a[case] * l * 10) >> >> would be better written out of the loop as >> >>  b <- exp1^(a * l * 10) > > And even better as > > b <- exp(a * l * 10) > > Hadley > Aye, exp() functions tend to be heavily optimized compared to general functions such as `^` even if

Re: [R] More efficient alternative to combn()?

2010-03-26 Thread Sharpie
elgorgonzola wrote: > > Hi, > > i am working on a problem where i need to compute the products of all > possible combinations of size m of the elements of a vector. I know that > this can be achieved using the function combn(), e.g.: > >> vector <- 1:6 >> combn(x = vector, m = 3, FUN = functio

Re: [R] Creating a vector of categories

2010-03-26 Thread Sharpie
Sharpie wrote: > > testData$bin <- cut( testData$count, binBreaks, include.lowest = TRUE ) > I also made a slight mistake, you will want to replace inclde.lowest = TRUE with right = FALSE to the call to cut() to preserve the greater-than-or-equal boundary at the lower end

Re: [R] Creating a vector of categories

2010-03-26 Thread Sharpie
Christoffer Karlsson wrote: > > Hi, > > I have a column in a data frame looking something like: > > $sex $language $count > male english 0 > male english 0 > female english 32 > male spanish 154 > female english 11 > female norweigan 7 > > and so on. > What I want to do is to order

Re: [R] netlabR package in English

2010-03-25 Thread Sharpie
Keith McMillan wrote: > > Dear R users, > > > > Is documentation for the netlabR package available in English? > > > > If not does anyone know if or when it will be? > > > > Regards, > > > > Keith > I don't see a package named netlab or netlabR on CRAN, which package are you ta

Re: [R] Create blocks or observations

2010-03-25 Thread Sharpie
tj wrote: > > Anyone who can help me with this? > I have 48 observations (I dont want to alter their order). I want to group > these observations into 16 blocks. So I should have 3 observations for > each block. This is what I did in R, but it has warnings. > >> y #contains my

Re: [R] Basic graphs: something like groups, but where each plot has independent axis?

2010-03-25 Thread Sharpie
Ben Bimber wrote: > > I am trying to graph weight data for our colony. We a data frame with > Animal, Weight and Date. I'd like to display this data a series of simple > xyplots. We only need to display these plots together, we do not need to > make comparisons between animals. Each animal h

Re: [R] Abstract classes

2010-03-25 Thread Sharpie
Albert-Jan Roskam wrote: > > Hi R lovers, > > I'm looking for more information about, and implementations of abstract > classes. After reading "Head First Design Patterns" (O'Reilly). I want to > know whether I could use this to build an interface, i.e. a placeholder > for all possible methods

Re: [R] how to deal with vector[0]?

2010-03-25 Thread Sharpie
Jin wrote: > > Hi, > > I have a vector with 4 elements, e.g., tau_i=c(100,200,300,400), but > potentially tau_i[0]=0. In a "for" loop, > > tau_i=c(100,200,300,400) > m=4 > tau_i[0]=0 # <--- ? > P_i=1 > for(i in 2:m) > { > P_i = P_i*(tau_i[i-1]-tau_i[i-2]) >

Re: [R] Insert .eps files in to an R plot.

2010-03-25 Thread Sharpie
mnstn wrote: > > Hello Everybody, > I have an eps figure an awesome bacteria and a plot (generated using R) > also in eps format. Now it looks like there is space for only one figure > and I have to insert the picture of the bacteria into the plot. Is there a > way to insert figures (eps/png/jpg

Re: [R] How to use the paste function to create an already used variable

2010-03-25 Thread Sharpie
"Biedermann, Jürgen" wrote: > > Perfekt! > > So, the code below does, what I want it does. > > for (m in 1:AnzRat) { > Daten_akt <- eval(parse(text=paste("Daten",m,"_akt",sep=""))) > ... > ... > assign(paste("Daten",m,"_akt",sep=""),Daten_akt) > } > You may want to consider r

Re: [R] write: write array to file without NAs

2010-03-24 Thread Sharpie
jannis-2 wrote: > > Dears, > > does anyone know, how I can get R to save the values of an array in a csv > like file using write(), but without printing NA to the file? I use ';' to > seperate the elements, so : > > a=c(1,NA,2,3,3) > > write(a) > > should produce > > > 1;;2;3;3 > > > in

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Sharpie
Gary Miller wrote: > > Thanks for your reply Sharpie. I completely understand that it may not be > the best to go with muti-panel pie charts, but my group would like to have > this utility along with barplot/dotplot (may be, using it for proportions > data). Thanks, > Well,

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Sharpie
Gurmeet wrote: > > Hi All, > > I'm trying to find out a way to plot multi-panel pie charts. It may not be > the best way to present data, but I would still need one. > Would paneled bar charts not suffice? I don't mean to be harsh, but the only situation I can think of where I would consider

Re: [R] string problems in R

2010-03-24 Thread Sharpie
Muting Zhang wrote: > > Hello all > > I have been working on my thesis using R. I am a newbie to R and met a > problem > that bothered me for a while due to my lack of acquaintance of R. > > I am using R to query from SQL. I got a list of crsp_fundno of G-style > mutual > funds which is still

Re: [R] install ncdf package

2010-03-24 Thread Sharpie
Pinto wrote: > > Dear R users > > I am attempting to add lncdf_1.6.tar.gz libraries within R, and have > failed. I have R version 2.8.1, and are running on fedora 10 Kernel Linux > 2.6.293.-60.fc10.x86_64. > I've run R CMD INSTALL ncdf_1.6.tar.gz > and I have the following > ---

Re: [R] Saving tab/csv delimited data with NaN's

2010-03-23 Thread Sharpie
Rolf Turner wrote: > > > On 24/03/2010, at 12:34 PM, Sharpie wrote: >>> foo <- matrix(0,nrow=3,ncol=3) >>> foo >> [,1] [,2] [,3] >> [1,]000 >> [2,]000 >> [3,]000 >> >>> foo[3,3] &l

Re: [R] Saving tab/csv delimited data with NaN's

2010-03-23 Thread Sharpie
shankar-17 wrote: > > Hello, > I am working multiple simulated data sets with missing values, I would > like to store these data sets in either tab delimited format for .csv > format with missing values marked as NaN's instead of NA's. > > I read the import/export document which mentions th

Re: [R] rpad ?

2010-03-23 Thread Sharpie
sjaffe wrote: > > Yes, I've tried Sage (briefly) and it is very interesting. But what I'm > looking for here is a client-server system that allows multiple users to > access the results of R without exposing the details. > Maybe you're looking for something similar to this webapp: http://rw

Re: [R] rpad ?

2010-03-23 Thread Sharpie
sjaffe wrote: > > Based on a private response, it seems that rpad is no longer being > maintained and in fact no longer works with the latest R release. I > noticed that the web site listed in the FAQ no longer works, the code is > being hosted by google code but it appears no one is working on

Re: [R] Operator overloading for custom classes

2010-03-23 Thread Sharpie
Chidambaram Annamalai wrote: > > Hi, > > I need some help to get some of the object orientation, specifically the > methods that overload the basic arithmetic operations, from sample C++ > code to R. I don't have experience with such advanced language features > inside of R. So I was wondering

Re: [R] If else statements

2010-03-23 Thread Sharpie
tj wrote: > > Thanks Sam for the short but very helpful answer. That's what I only want > to know. > Thanks.=) > > ~tj > Even though you got the answer you were looking for, I would still browse the material Matthew posted. The "Introduction to R" is a standard R manual that helped me g

Re: [R] Creating pdfs using qplot in qqplot2

2010-03-23 Thread Sharpie
Bos, Roger-2 wrote: > > I am trying to create plots within a for loop and output them to a pdf. > Here is a working example using plot: > > gg <- data.frame(datadate=1:4, spread=5:8) > pdf() > for (i in 1:3) { > plot(gg$datadate, gg$spread, main=i) >

Re: [R] ctable error with Hmisc and Sweave (on a Mac)

2010-03-22 Thread Sharpie
Clay Heaton wrote: > > Hi, pretty new with R and LaTeX here... > > I'm trying to use the latex() function from the Hmisc table with Sweave. > When I try: > > pdflatex myfile.tex > > I get an error that reads: > > ! Undefined control sequence. > l.22 \ctable > > > It seems like this is an o

Re: [R] Embed R code in C++

2010-03-22 Thread Sharpie
mans wrote: > > Hi thanks for your help but > > I tried to install the pakage but i have got a installing error: > > {SNIP} > > I do not understand what's going on to be honest. > Anyone can help me? > When debugging, it's usually a good idea to start with the first error: Error in loadN

Re: [R] importing .bil files

2010-03-22 Thread Sharpie
Barry Rowlingson wrote: > > GIS and spatial data formats can often be handled by readGDAL (for > raster grids) from the rgdal package. > > .bil files seem to be handled by the Ehdr driver in GDAL: > > http://www.gdal.org/frmt_various.html > > so if your rgdal package has that driver (run gd

Re: [R] Embed R code in C++

2010-03-22 Thread Sharpie
mans wrote: > > Hi, > Can anyone tell me how to embed R code in a C++ file. > > I am actually using a mac running on the OSX 10.6.2 and the IDE Xcode > Version 3.2 and I would like to embed the basic function like geometric, > binomial, normal and hyper geometric distributions in a sample cp

Re: [R] calling external .EXE file in R macOSX

2010-03-21 Thread Sharpie
Alex Anderson wrote: > > Hi All, > I am currently working on an analysis which requires a call to an > external FORTRAN routine contained within a file called MCDS.EXE. This > file is usually called from within a WINDOWS program called DISTANCE. I > have some R script from the developers of

Re: [R] EM algorithm in R

2010-03-20 Thread Sharpie
tj wrote: > > Thanks David. I already tried two different programs for this. The first > one has errors. > I'm working right now on my alternative program ( i hope it will work), > BUT I still prefer to use the first program I made because it is more > detailed. So, I'm trying how to correct the

Re: [R] Substitute NAs in a data frame

2010-03-18 Thread Sharpie
Marsh wrote: > > Excuse me for what I'm sure is a stupid beginner's question, but I've > given up trying to find the answer to this question from the help, > RSiteSearch, or any of the usual places. > > I have a list that looks like this: > >myList > $first > [1] "--" "18" "8" "32" > > $sec

Re: [R] R front end help

2010-03-18 Thread Sharpie
rrp wrote: > > hi > I am doing a project in R language.I need help with creating a front end > in R language. > i created a dialog box with file menu n file consists of load ,save and > quit options. But these options are not working.I try to load my data into > r using these options but its not

Re: [R] list names

2010-03-18 Thread Sharpie
Robert M. Flight wrote: > > So I have a list variable, and each item has a name. Is it possible to > return just the names in the list and not the contents of each one? > > Example: > > Currently, if I have a list variable "matrices", and it contains 3 > matrices, "M1", "M2", and "M3", if I ty

Re: [R] Unable to install Cairo package

2010-03-18 Thread Sharpie
Alla Bulashevska wrote: > > Dear R users, > I'm running R version 2.10.1. > I tried installing the Cairo package and I got the > following message: > > > * installing *source* package ‘Cairo’ ... > > {snip} > > checking cairo.h usability... no > checking cairo.h presence... no > checking for

Re: [R] Sweave and kile

2010-03-17 Thread Sharpie
pomchip wrote: > > Dear R-users, > > I want to give a try to Sweave and Latex but I am having some problems > compiling my .Rnw files within Kile. I have followed the recommendations > given in http://tolstoy.newcastle.edu.au/R/e5/help/08/10/4277, but they do > not seem to address my particular

Re: [R] Writing own simulation function in C

2010-03-17 Thread Sharpie
TheSavageSam wrote: > > Thanks for the huge help. I have learned a lot and been able to start > writing my own code. > > If you could give me a reference(a link, name of a book, etc.) to a good > manual of how to use and manipulate and use SEXP variables in C > (considering creating R libraries

Re: [R] Help running a Fortran subroutine from R

2010-03-16 Thread Sharpie
dc896148 wrote: > > useR's, > I need help getting a Fortran DLL successfully returning the correct > output. The attached fortran source code (filter2d.f) and DLL > (filter2d.dll) are attached. Also, I attached a text file for which I > want to apply the filter to (time702.txt). > > Here is w

Re: [R] Creating images without X11

2010-03-13 Thread Sharpie
Jillian E Kozyra wrote: > > Dear Colleagues, > > We are attempting to create trees using R with our Ruby on Rails > application. However, we are running into a problem involving the > creation of the graphic. We would like them to be in either jpg or png > format so that users can save, but due

Re: [R] Help! I need to use R to calculate a recursive function!

2010-03-09 Thread Sharpie
anan1986 wrote: > > I tried! but my solution is not correc! > What is not correct? What did you try? You need to supply us with details! Specifically, the details that are mentioned in the posting guide for this mailing list: http://www.r-project.org/posting-guide.html "Data! Data! Data

Re: [R] Writing own simulation function in C

2010-03-05 Thread Sharpie
TheSavageSam wrote: > > I am wishing to write my own random distribution simulation function using > C programmin language(for speed) via R. I am familiar with R programming > but somewhat new to C programming. I was trying to understand "Writing R > extensions" -guide and its part 6.16, but I f

Re: [R] turn character string into unevaluated R object

2010-03-02 Thread Sharpie
Tim Calkins-2 wrote: > > fortune('parse') > -- > Tim Calkins > 0406 753 997 > Or would that be: fortune( 106 ) ? - Charlie Sharpsteen Undergraduate-- Environmental Resources Engineering Humboldt State University -- View this message in context: http://n4.nabble.com/turn-character-str

Re: [R] Three most useful R package

2010-03-02 Thread Sharpie
Ralf B wrote: > > Hi R-fans, > > I would like put out a question to all R users on this list and hope > it will create some feedback and discussion. > > 1) What are your 3 most useful R package? and > > 2) What R package do you still miss and why do you think it would make > a useful addition

Re: [R] capturing errors in Sweave

2010-03-01 Thread Sharpie
Sundar Dorai-Raj-2 wrote: > > Hi, > > I'm writing a manual using Sweave and I want to be able to print errors > from > bad code. Here's an example: > > >= > MySqrt <- function(x) { > if (missing(x)) { > stop("'x' is missing with no default") > } > if (!is.numeric(x)) { > stop("'x

Re: [R] wrap long lines in table using "latex" in Hmisc

2010-03-01 Thread Sharpie
Tao Shi wrote: > > > Thank you guys for the wonderful suggestions! > > Charlie, > > You obviously foresaw my problem!   It took me a while to figure out that > the \raggedright and other justification commands should be applied to > each cell.  It didn't work for me when applied to the headin

Re: [R] remove from mailing list

2010-03-01 Thread Sharpie
mirauta wrote: > > Hello, > I receive a lot of emails from the forum members.Is there any way to make > the option for a daily summary?If not can may email be removed from the > list?I want to continue using the forum but the numebr of emails I receive > dialy is too big :) > Thanks,Bogdan > T

Re: [R] Why software fails in scientific research

2010-02-28 Thread Sharpie
John Maindonald wrote: > > I came across this notice of an upcoming webinar. The issues identified > in the > first paragraph below seem to me exactly those that the R project is > designed > to address. The claim that "most research software is barely fit for > purpose > compared to equiva

Re: [R] A slight trap in read.table/read.csv.

2010-02-28 Thread Sharpie
Rolf Turner wrote: > > I solved the problem by putting in a colClasses argument in my > call to read.csv(). But I really think that the read functions > are being too clever by half here. If field entries are surrounded > by quotes, shouldn't they be left as character? Even if they are > all

Re: [R] R help question: How can we enable useRs to contribute corrections to help files faster ?

2010-02-28 Thread Sharpie
After reading some more, I think Tal's Wiki idea was also a good one-- conceivably a server could be set up that pulled tarballs from CRAN, unpacked them, and converted the man folders to HTML. Then the server could provide a sort of a "master list" version of help.start() where each page was edi

Re: [R] R help question: How can we enable useRs to contribute corrections to help files faster ?

2010-02-28 Thread Sharpie
Duncan Murdoch wrote: > > Yes, I agree. In fact, I think the whole system needs to be updated. > Anyone like doing HTML design? > If I had the time, I would raise my hand for this one-- unfortunately school, work and other commitments leave me with a full schedule for the foreseeable future

Re: [R] Slightly OT: Does anyone use latex2rtf with sweave output ?

2010-02-28 Thread Sharpie
Paul Hurley wrote: > > Hello, > > I'm trying to use R (and Sweave) to pull some data out of a database and > produce some standard reports. unfortunaltey, the people who want the > reports want them in an editable format so they can add wordy bits to > the automatically generate tables and

Re: [R] Best Hardware & OS For Large Data Sets

2010-02-27 Thread Sharpie
David Winsemius wrote: > > > Perhaps the fact that the stable CRAN version of R for (any) Windows > is 32-bit? It would expand your memory space somewhat but not as much > as you might naively expect. > > (There was a recent announcement that an experimental version of a 64- > bit R was

Re: [R] R Aerodynamic Package(s)?

2010-02-27 Thread Sharpie
Charles Annis, P.E. wrote: > > Jason: > > What are you trying to do? Your reference link provides several Fortran > programs. Why can't you use those? Or you could translate them into R > code > if you would like to take advantage of R's wonderful graphics and > multitudinous other statistic

Re: [R] wrap long lines in table using "latex" in Hmisc

2010-02-26 Thread Sharpie
Ista Zahn wrote: > > Hi Tao, > Just set the appropriate *.just argument, e.g.: > > Dat <- data.frame(x1 = rep("this value consists of a long string of > text", 5), x2 = rep("this value consists of an even longer string of > text", 5)) > > library(Hmisc) > latex(Dat, col.just = rep("p{1in}", 2

Re: [R] text editors

2010-02-26 Thread Sharpie
Sharpie wrote: > > For example, I spend an equal amount of time working on Windows, OS X and > Linux. There are a ton of great Windows-only editors out there, but they > aren't a good option for me because I only use windows 1/3 of the time I'm > at a computer. > &

Re: [R] text editors

2010-02-26 Thread Sharpie
Dwayne Blind wrote: > > Dear all, > > Do you use a text editor ? What would you recommend for Windows users ? > What > about Tinn-R ? > > Thank you very much, > Dwayne > > Learning a text editor is a significant and very valuable investment of your time. In order to maximize the return fro

Re: [R] two questions for R beginners

2010-02-25 Thread Sharpie
Patrick Burns wrote: > > * What were your biggest misconceptions or > stumbling blocks to getting up and running > with R? > R was the first scripting language that I *really* invested time in learning. Prior to R I had a few years experience programming in Fortran and had worked on a few pro

Re: [R] How to use a 'hidden' function directly?

2010-02-24 Thread Sharpie
Dale Steele wrote: > > methods(ansari.test) > stats:::ansari.test.default > > the two functions that are part of ansari.test.default: > > qansari <- function(p, m, n) { > .C(R_qansari, as.integer(length(p)), q = as.double(p), > as.integer(m), as.integer(n))$q

Re: [R] How to use a 'hidden' function directly?

2010-02-24 Thread Sharpie
Dale Steele wrote: > > I would like to be able to use two functions; qansari and pansari > which are found in the > function ansari.test. How can I evaluate these functions > independently? Thanks. --Dale > > For example, when I load the function ... > > qansari <- function(p, m, n) { >

Re: [R] R Graphics into Latex‏

2010-02-24 Thread Sharpie
Lars Bishop-2 wrote: > > Hi, > > I'm new in Latex and I'm trying to include an R chart into a Latex > document. > > This is what I'm doing: > > 1) In R: save the chart as a a Postcript in a folder C:/xxx/Density.eps > So, to be clear, your graphic is saved on the C drive. Lars Bishop-2 w

Re: [R] how to pass external parameters to an R script

2010-02-23 Thread Sharpie
mauede wrote: > > How, if possible, can I run an R script, from command line, passing > external parameters just like > I can run a C main program passing parameters: > > # Cprog p1 p2 p3 > > Cprog can access its arguments (p1,p2,p3) through the built-in structures > "argv" and "argc". > Sinc

Re: [R] First. Last. Data row selection

2010-02-23 Thread Sharpie
wookie1976 wrote: > > I am in the process of switching from SAS over to R. I am working on very > large CSV datasets that contain vehicle information. As I am processing > the data, I need to select the first (or sometimes the second) record (by > date) for any records that have the same licen

Re: [R] R on 64-Bit…

2010-02-21 Thread Sharpie
Axel Urbiz wrote: > > Dear R users, > > I know this issue came up in the list several times. I’m currently > running > R on 32-bit on Windows and due to memory limitation problems would like to > move to a 64-bit environment. I’m exploring my options and would > appreciate > your expertise: >

Re: [R] Exporting Graphs

2010-02-21 Thread Sharpie
Karthik wrote: > > Hello Tal, > This is the code. > > >> hist(rnorm(100)) >> jpeg("histogram.jpeg") > --- > > Even when I decrease the quality, I still have the same problem. > > >> hist(rnorm(100)) >> jpeg("histogram.j

Re: [R] converting character vector "hh:mm" to chron or strptime 24 clock time vectors

2010-02-16 Thread Sharpie
Jim Lemon wrote: > > On 02/16/2010 09:47 PM, Alex Anderson wrote: >> ... > This is the problem >> 6 96.88 2008/04/24 24:00 >> >> Error in `$<-.data.frame`(`*tmp*`, "time2", value = list(sec = c(0, 0, : >> replacement has 9 rows, data has 10 > > Hi Alex, > You have a problem with an invalid time

Re: [R] extract the data that match

2010-02-16 Thread Sharpie
Roslina Zakaria wrote: > > Hi r-users, >   > I would like to extract the data that match. > I'm interested in matchind the value in column 'intg' with value in column > 'rand_no' > Match how? Rows where intg equals rand_no at the same position? The rows of intg that are present somewhere in r

Re: [R] Keyboard

2010-02-16 Thread Sharpie
Steven Martin wrote: > > All, > > I installed R-2.10.1 with Readline=no. Now for some reason R does not > recognize some key strokes like the directional arrows. > I am not sure if Readline is the problem or not. > Yes-- readline supplies functionality such as command history. Steven Martin

Re: [R] READ.TABLE for Mac

2010-02-16 Thread Sharpie
Mestat wrote: > > Hi listers, > I just got a MAC, so I am trying to use the command READ.TABLE but I am > getting a error that is probably caused by the wrong path that I am > using... > The command is the following... > > file<-read.table("/Users/Márcio/UdeM/Travail Dirigé/Data/MU284 > Populat

Re: [R] Adressing multiple cores (CPUs)

2010-02-15 Thread Sharpie
Benilton Carvalho-2 wrote: > > http://cran.r-project.org/web/views/HighPerformanceComputing.html > Also, of the links at the bottom of that page, I found the journal article: "State of the Art in Parallel Computing with R" To be a particularly helpful and easy to read overview of the avail

  1   2   >