Re: [R] Loss of precision when importing data into R

2010-02-11 Thread Sharpie
Hanke, Alex-2 wrote: > > Hi Listers, > I can't seem to figure out why I loose precision when I try to import a > comma delimited file using read.csv or read.table. The fields of interest > are rounded to one decimal place. > If the fields of interest are rounded to one decimal place in the fi

Re: [R] How to get the source code for the assignment of a variable?

2010-02-11 Thread Sharpie
djhurio wrote: > > I believe there is not such thing as source code for a variable. I believe > if you define x=y*y, x is keeping only the values of y*y, but not how they > were computed. Am I right? > In general yes. Basic variables do not store a copy of the function call that created them.

Re: [R] How to get the source code for the assignment of a variable?

2010-02-11 Thread Sharpie
Sharpie wrote: > >> model$call > lm(formula = demand ~ Time, data = BOD) > > This object could be passed to the eval() function to basically re-run the > operation that generated `lm`. > That would be re-run the operation that generated `model`. I think

Re: [R] Help on loading "xlsx" package

2010-02-11 Thread Sharpie
Steven Kang wrote: > > Dear R users, > > > Im trying to load *"xlsx"* package which depends on *"xlsxjars"* and * > "rJava"* packages. > > All the 3 packages (zipped files) are installed successfully in windows. > > I have added "C:\Program Files\Java\jre1.6.0_03\bin\client" to the PATH > va

Re: [R] Is there a way to figure out what nonlocal variables and functions have been used in a function?

2010-02-12 Thread Sharpie
blue sky wrote: > > x=10 > f=function() {print('in f')} > g=function() {f(); print(x)} > g() > > Suppose I have the above code, I want to know what functions and > variables have been used in the function g (in this case, f and x). Is > there a function to do so? > > Try findGlobals() from t

Re: [R] Access dataframe with variable name in function

2010-02-12 Thread Sharpie
Philipp Rappold wrote: > > Sorry guys, but I have another one: > > > I want to write a function that returns a certain column of a > dataframe. The function accepts two argument: the dataframe and the > name of the column, but the column is not given as a "string" but as > a variable name.

Re: [R] Is there a way to figure out what nonlocal variables and functions have been used in a function?

2010-02-12 Thread Sharpie
blue sky wrote: > > I don't what '{' and functions available in R libraries. I can > manually exclude '{'. Is there an easy way to exclude the functions > from R libraries? > Well, you could write a function, say isPackaged( name ), that returns TRUE or FALSE depending on whether the object ma

Re: [R] R - Compiling and calling Fortran code that uses IMSL libraries - Help!

2010-02-12 Thread Sharpie
Nynese Tinsley wrote: > > > Good Afternoon R Help! > > > On of my users is seriously thinking about moving to R from Splus. In his > testing, he has already found some benefits to it. He has, however run > into one issue, calling his Fortran functions in R. Previously, in Splus, > he would

Re: [R] Plot different regression models on one graph

2010-02-13 Thread Sharpie
Rhonda Reidy wrote: > > The following variables have the following significant relationships (x is > the explanatory variable): linear, cubic, exponential, logistic. The > linear relationship plots without any trouble. > > Cubic is the 'best' model, but it is not plotting as a smooth curve usi

Re: [R] Printing 2 digits after decimal point [SOLVED]

2010-02-15 Thread Sharpie
T.Wunder wrote: > > Hi, > > I'm sorry, I've found the right answer: >> x <- 0 >> formatC(x,digits=2, format="f") > [1] "0.00" > > The above worked perfectly! > Thanks & Best wishes ;) > Tom > That old warhorse, sprintf(), can also be a trusty steed in situations like this. -Charlie -- View

Re: [R] executable R script under xp (to avoid migration toward Matlab or C++)

2010-02-15 Thread Sharpie
PtitBleu wrote: > > Hello, > > I discovered R two years ago and thanks to the R-community I managed to > write some scripts to analyze my data stored in mysql databases. > The only problem is that I am the only one using R in the lab. Colleagues > mainly use Matlab (but not with mysql, only wit

Re: [R] Which is the proper mail list?

2010-02-15 Thread Sharpie
Roy Mendelssohn wrote: > > Hi All: > > Even after reading the web pages, it is unclear to me exactly how it is > decided what goes into the base distribution, and more to the point, which > list I should post to if I want to suggest that a functionality now done > by a contributed package be a

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

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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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: > > 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

  1   2   >