Re: [R] What is the HEX code for "transparent" color?

2024-06-07 Thread Roland Rau via R-help
On 6/6/24 18:41, Duncan Murdoch wrote: On 2024-06-06 4:37 a.m., Yosu Yurramendi wrote: What is the HEX code for "transparent" color? I've tried "" "FF00" "", but they don't work. If the other answers don't solve your problem, you should give us some context.  Not all graph

[R] Is there a canonical way to pronounce CRAN?

2022-05-04 Thread Roland Rau via R-help
Dear all, I talked with colleagues this morning and we realized that some people (=me) pronounce CRAN like the German word "Kran" (probably pronounced like "cruhn" in English -- if it was a word). My colleague pronounced it as "Sea-Ran" or "Sea-Run". The colleague was a student and has worked

Re: [R] Change position in package rgl

2014-04-13 Thread Roland Rau
On 04/12/2014 07:03 PM, Duncan Murdoch wrote: > I think you could hack something like that (see the description in > ?par3d of how rendering is accomplished), but there's currently no > support for it, and it wouldn't be easy, as currently P and M in that > description are read-only quantities comp

[R] Change position in package rgl

2014-04-12 Thread Roland Rau
Dear all, I am using package rgl and I want to change the position where I "stand". Maybe a small example might clarify what I am looking for: # Begininng of explanatory example library(rgl) data(volcano) # the example ?rgl.surface y <- 2 * volcano x <- 10 * (1:nrow(y)) z <- 10 * (1:ncol(y)) yl

Re: [R] reading files from two folders

2012-03-28 Thread Roland Rau
Hi, On 03/28/2012 08:48 AM, uday wrote: > I would like to read data from two different folder and then combine this > together > the code which I have tried are as follows > setwd("/Groups/data_first/") > file_was <- list.files(path = ".", pattern = "v2.0.2.was", all.files = > FALSE, full.names

Re: [R] How to call R-squared values from lm's?

2010-12-02 Thread Roland Rau
On 12/02/2010 03:15 PM, Wegan, Michael (DNRE) wrote: I would like to call both p-values and R-squared values from lm's in a function. I can get the p-values from coef(summary(name.lm))[r,c], however, I cannot figure out how to call the R-squared values without manually calling the summary and

Re: [R] Plot a matrix recursively

2010-12-01 Thread Roland Rau
On 12/01/2010 02:43 PM, alcesgabbo wrote: I plot the first column with the following function: plot(m[,1],type="o", xaxt="n",ylim=c(min(m[,1:length(colnames(m))])-1, max(m[,1:length(colnames(m))])+1)) for the other columns I use there functions: lines(m[,2],type=\"o\") lines(m[,3],type=\"o\")

[R] a bit off topic: data for dragsters?

2008-11-17 Thread Roland Rau
Dear all, does anyone of you know where to get some simple data from dragster racing (the race where you go for 1/4 mile straight)? Best would be some data where you have two columns with Col 1 "Time since start of race in miliseconds" and Col 2 "Distance traveled". Thank you very much, Roland

Re: [R] Fw: How to learn R language?

2008-08-27 Thread Roland Rau
Ajay ohri wrote: - go with Bob and Peter's book. Too many sources can be confusing. - Join the list, create filters for keywords of your specialty (like from R -Help ) contains regression. - Try use it for a live project . I think this is really very good advice: - 2 books (I would

Re: [R] Large Data Set Help

2008-08-25 Thread Roland Rau
Hi, Jason Thibodeau wrote: I am attempting to perform some simple data manipulation on a large data set. I have a snippet of the whole data set, and my small snippet is 2GB in CSV. Is there a way I can read my csv, select a few columns, and write it to an output file in real time? This is what

Re: [R] mean for vector with NA

2008-08-21 Thread Roland Rau
Hi, [EMAIL PROTECTED] wrote: I have tried mean(Incubation) and mean(as.numeric(Incubation)) what about mean(Incubation, na.rm=TRUE) ? I get the following result: > mean(Incubation, na.rm=TRUE) Time difference of 4.295455 hours > but I think that, since there are so many NA values in Incu

Re: [R] Large data sets with R (binding to hadoop available?)

2008-08-21 Thread Roland Rau
Hi Avram Aelony wrote: Dear R community, I find R fantastic and use R whenever I can for my data analytic needs. Certain data sets, however, are so large that other tools seem to be needed to pre-process data such that it can be brought into R for further analysis. Questions I have for t

Re: [R] how can i get hessian matrix at "constrOptim"

2008-08-19 Thread Roland Rau
Hi, Kanak Choudhury wrote: Hi, i have made a code for optimizing a function using "constrOptim". i need hessain matrix of the parameters. how could i get hessain matrix when i will use "constrOptim"? May i get get any help from anyone? the function fdHess from package 'nlme' can help you? li

Re: [R] readable dendrograms with many units

2008-08-18 Thread Roland Rau
Hi, since you are new to R, you might not be aware of some nice feature at the homepage of R: the task view http://cran.r-project.org/web/views/ For various topics, somebody kindly provided an overview of packages and functions for the specific topic. Also for cluster analysis: http://cran.r-

Re: [R] changing plot font for Times new roman

2008-08-18 Thread Roland Rau
Hi, I have forgotten something: in case you don't want to produce postscript or pdf files, have also a look at the nice article by Paul Murrell in R News, Vol 4. No. 2: http://cran.r-project.org/doc/Rnews/Rnews_2004-2.pdf Best, Roland Roland Rau wrote: Hi, milton ruser wrote: we c

Re: [R] changing plot font for Times new roman

2008-08-18 Thread Roland Rau
Hi, milton ruser wrote: we choose an family of fonts. I tryed par(family="times") without success. what about this: pdf("plot1Times.pdf", family="Times") plot(1,1) dev.off() pdf("plot1NotTimes.pdf") plot(1,1) dev.off() Maybe you check also the help for ?postscriptFonts I hope this helps yo

Re: [R] ignoring zeros or converting to NA

2008-08-13 Thread Roland Rau
Hi, since many suggestions are following the form of x[x==0] (or similar) I would like to ask if this is really recommended? What I have learned (the hard way) is that one should not test for equality of floating point numbers (which is the default for R's numeric values, right?) since the bina

Re: [R] Memory allocation problem

2008-08-12 Thread Roland Rau
Jamie Ledingham wrote: becomes too much to handle by the time the loop reaches 170. Has anyone had any experience of this problem before? Is it possible to 'wipe' R's memory at the end of each loop - all results are plotted and saved or written to text file at the end of each loop so this may b

Re: [R] how can I do this sum?

2008-08-11 Thread Roland Rau
dott wrote: Hi, Suppose I have a vector in real number (x1, x2, x3, x4, x5, x6) My question is how I can get x5*x3*x1 + x6*x4*x2 ? Thanks a lot. Dot. hard to say what you mean? Maybe summing up all elements in odd positions and the ones in even positions? myvector <- 1:6 1*3*5 + 2*4*6

Re: [R] number of an element in a matrix

2008-08-11 Thread Roland Rau
Hi, Brandon Invergo wrote: You can use the length() and which() functions for that: > length(which(m == 2)) Or even shorter since TRUE Values have a value of 1 mymatrix <- matrix(sample(x=1:10, size=1000, replace=TRUE), ncol=5) sum(mymatrix==2) length(which(mymatrix==2)) #should give the sam

Re: [R] Exporting a list of lists

2008-08-11 Thread Roland Rau
Hi Kevin, check ?dump set.seed(1234) list1 <- list(a1=rnorm(100), a2=rnorm(10)) list2 <- list(a1=rnorm(50), a2=rnorm(25)) mylist <- list(top1=list1, top2=list2) dump(list="mylist", file="mydumpedlist.r") rm(mylist) # please note that you have to quote the name # of the object(s) you want to du

Re: [R] Differential Equations there use in R (population modeling)

2008-08-11 Thread Roland Rau
Hi, stephen sefick wrote: e1 <- function(x,b,t){ d<-(x)*(b^t) plot(d) } e1(2, 2,seq(from=0, to=6, by=1)) Is there a way to do this with a change in time. I would like to use differential equations. I am trying to model a population with an initial value, fecundity per time st

Re: [R] RPro

2008-08-11 Thread Roland Rau
Charles C. Berry wrote: Should someone start a pool on when SAS will offer 'R language support' ?? At least Biostatistics Denmark developed something in this direction. Too bad that Rolf Poalis made only this announcement: http://tolstoy.newcastle.edu.au/R/help/04/04/0009.html in the beginning

Re: [R] Tcl\tk not supported on this system

2008-08-08 Thread Roland Rau
Hi, have a look here: http://tolstoy.newcastle.edu.au/R/e4/help/08/07/17379.html Hope this helps, Roland Michael Gormley wrote: trying to install the pbatR package, I was greeted with the error Error: package 'tcltk' does not have a name space Execution halted Directly installing the packag

Re: [R] long run time for loop operation & matrix fill

2008-08-08 Thread Roland Rau
Hi, Bert Gunter wrote: speedup over explicit loops. As you said, their greatest advantage is elegance and code readability (as functional programming, rather than procedural programming, constructs). As you also said, vectorizing calculations is a central theme in R that takes some getting used

Re: [R] long run time for loop operation & matrix fill

2008-08-07 Thread Roland Rau
Hi rcoder, rcoder wrote: Hi everyone, I'm running some code containing an outer and inner loop, to fill cells in a 2500x1500 results matrix. I left my program running overnight, and it was still running when I checked 17 hours later. I have tested the operation on a smaller matrix and it execut

[R] Programming Contest

2008-08-05 Thread Roland Rau
Dear all, for those of you who have too much time (nobody) and those who enjoy participating in programming contests (maybe some of you), I found an interesting site linked from reddit's programming section: http://www.reddit.com/r/programming/ The actual contest is at the site: http://selfex

Re: [R] how to replace NA values in a list

2008-08-01 Thread Roland Rau
Hi, to be honest, I never created a matrix of lists before, but hopefully this code will help you? set.seed(12345) my.pool <- c(NA, 0:10) n <- 25 alist <- list(sample(x=my.pool, size=n, replace=TRUE)) alist mymatrix <- matrix(rep(alist, 6*3), nrow=6) mymatrix2 <- lapply(X=mymatrix, FUN=funct

Re: [R] creating image using RGB values

2008-08-01 Thread Roland Rau
Hi Rostam, did you check ?rgb already? Hope this helps, Roland rostam shahname wrote: Hi R users, I would like to create an image using three matrices which contain the values of Red, Green, and Blue of each pixel, i.e. one matrix which has values of red, one which has values of green, and on

Re: [R] Random subset

2008-07-30 Thread Roland Rau
But probably you will need to set replace=FALSE if you want to sample from your original data set without replacement. Sorry for the possible confusion, Roland Roland Rau wrote: Hi, check ?sample n <- 200 mydata.set <- rnorm(10) my.random.subset <- sample(x=mydata.set, size=n

Re: [R] Random subset

2008-07-30 Thread Roland Rau
Hi, check ?sample n <- 200 mydata.set <- rnorm(10) my.random.subset <- sample(x=mydata.set, size=n, replace=TRUE) my.random.subset I hope this helps, Roland Alessandro wrote: Hi all, I wish to do a random subset (i.e. 200 or 300 points) from a dataset, but I don't find the right

Re: [R] R -Legality Question about R's Open Source GNU GPL License

2008-07-30 Thread Roland Rau
Hi, Stevens, Martin Henry H. Dr. wrote: The limit of use is that you cannot profit from it. It is Open Source. I am not sure what you mean exactly. If you mean that you can not earn any money selling free software (in terms of the GPL2, which is R's licence), this seems to be not the case:

Re: [R] Case statements in R

2008-07-29 Thread Roland Rau
Dear all, may I suggest to include this quotation of Patrick Burns in the fortunes package? :-) Best, Roland Patrick Burns wrote: A good reason to use '&&' rather than '&' is if evaluating whatever is on the right will create an error if what is on the left is FALSE. '&&' and '||' stop if

Re: [R] Legality Question about R's Open Source GNU GPL License

2008-07-28 Thread Roland Rau
Jim Porzak wrote: All this is included in the distribution in "doc" folder: 1. see FAQ: "2.11 Can I use R for commercial purposes?" 2. Specific GNU License is in file COPYING Furthermore, the start-up message of R can (hopefully) help you in your case. It mentions to type in license() or lice

Re: [R] Case statements in R

2008-07-28 Thread Roland Rau
Hi, maybe the following code helps to achieve what you want? It seems to me it is basically a 'recode' question. set.seed(1234) # not neccessary but this ensures we have the same #results random.values <- runif(n=30, min=0, max=100) newgrouping <- cut(x=random.values, breaks=c(0,0.1, 1, 2, 5, 10

Re: [R] Dividing by 0

2008-07-25 Thread Roland Rau
Hi, what about: mydata <- c(1,2,3,NA, Inf, -Inf, NaN, 5, 6, 7) mydata2 <- ifelse(is.na(mydata) | is.infinite(mydata), 0, mydata) mydata mydata2 nmarti wrote: I know I can use x <- na.omit(x), and other forms of this, to get rid of some of these errors. I know what y

[R] Minor Bug in Documentation of merge()

2008-07-25 Thread Roland Rau
Dear all, I would like to point to a minor bug in the documentation of merge(). The documentation (?merge) says all logical; all = L is shorthand for all.x = L and all.y = L. I think the correct description should be all logical; all = T is shorthand for all.x = T and all.y = T. The so

Re: [R] How to filter a data frame?

2008-07-22 Thread Roland Rau
Hi, rlearner309 wrote: I have a question about how to filter the data frame: Suppose my data frame has variables like gender, age,... How to get a subset of the data frame, with only female (or male) and/or age > 50...? What is the typical syntax? I tried several condition expressions, but non

Re: [R] smooth.spline

2008-07-18 Thread Roland Rau
Spencer Graves wrote: I found the first chapter of Paul Dierckx (1993) Curve and Surface Fitting with Splines (Oxford U. Pr.). Beyond that, I've learned a lot from the 'fda' package and the two companion volumes by Ramsay and Silverman (2006) Functional Data Analysis, 2nd ed. and (2002) Applie

Re: [R] Problem with TLC/TK on Ubuntu

2008-07-18 Thread Roland Rau
Hi Davide, did you check the R Installation and Administration Manual? In Section A.2.1 you will find some more information. Make sure that you have the 'dev' packages installed of tcl8.x and tk8.x. If you don't know where 'tclConfig.sh' and 'tkConfig.sh' are located, just find them: locate t

Re: [R] First attempt to use R

2008-07-03 Thread Roland Rau
Hi Ted, hopefully the following information gets you started: Ted wrote: What I want to do is extract time series data from a database(say, PostgreSQL or MySQL - I routinely use both), analyse it, and put a selection of the statistical results into specific tables. Check the following docume

Re: [R] R perfomance question !!!

2008-06-18 Thread Roland Rau
Hi, diver495 wrote: Using Visual Basic I can complete the same script (simple loop of 500 itterations) in 0.1 sec. Is it realy R not suitable for huge computing. If you are happy with Visual Basic, then there is no need for you to use R. In case your message was not a flamebait, it is well

Re: [R] Linear Regression ?

2008-06-16 Thread Roland Rau
Hi, did you have a look at the manual "An Introduction to R"? (http://cran.r-project.org/doc/manuals/R-intro.html). Chapter "Statistical Models in R" should answer (most of) your questions concerning linear regression. kayj wrote: Also each x is a categorical variable with 4 categories so I

Re: [R] R + Linux

2008-06-06 Thread Roland Rau
Dear all, a related follow up -- with the hope for some feedback from the specialists. Is the following general advice justified: = If one has not more than 4GB RAM and one wants to run primarily R on one's Linux machine, it is a good idea

Re: [R] Datasets in R

2008-05-30 Thread Roland Rau
Hi Carlos, Carlos López wrote: I´m trying to find datasets that will give me residuals, after applying the lm function, with no normality, non linearity, and heteroscedacity so I can try to exemplify those cases in the linear regression model. Can you give any advice on what datasets would be

Re: [R] lm() function

2008-05-29 Thread Roland Rau
Hi, Cleber Nogueira Borges wrote: hanen wrote: hi, my linear model is y=c+a*x1+b*x2 i tried to found a, c, b by the use of: mymodel<-lm(y~1+x1+x2) where y, x1, x2 are 3 vectors with the same length the result is a=NA.so i want to know where is the problem. It's the sum of x1 and x2 equal t

Re: [R] Datasets in R

2008-05-29 Thread Roland Rau
Carlos López wrote: I´m trying to find datasets that will give me residuals, after applying the lm function, with no normality, non linearity, and heteroscedacity so I can try to exemplify those cases in the linear regression model. Can you give any advice on what datasets would be appropiate?

Re: [R] How do you exit a function in R?

2008-05-29 Thread Roland Rau
Hi Bill Cunliffe wrote: For example, based on a certain condition, I may want to exit my code early: # Are there the same number of assets in "prices" and "positions"? if (nAssetPositions != nAssetPrices) { cat("Different number of assets! \

Re: [R] need help for building R in Ubuntu 8.04

2008-05-25 Thread Roland Rau
Hi, Nitesh Agrawal wrote: Hi everyone I have been trying to build R in ubuntu 8.04 from its source code but am getting the following error. configure: error: --with-x=yes (default) and X11 headers/libs are not available I am currently sitting in front of a Windows machine but I built R on m

Re: [R] Configuring emacs/ess on Ubuntu

2008-05-25 Thread Roland Rau
Hi Wade, Wade Wall wrote: I first installed through the package manager, but was unable to start R without opening a script file. So I installed from the tarball, but am still unable to open R using any commands; ESS loads into a buffer; but I can't use M-x-R to open R. the only way I can

Re: [R] Configuring emacs/ess on Ubuntu

2008-05-25 Thread Roland Rau
Hi Wade, Wade Wall wrote: Hi all, I don't know if this is the proper place to ask this, but I am trying to configure emacs/ess on Ubuntu 8.04 to run the way described for ESS and I think the easiest way to install emacs/ess on Ubuntu 8.04 is via the repositories. Simply use your favorite pac

Re: [R] R outside of universities

2008-05-24 Thread Roland Rau
Hi, Antony Unwin wrote: R has spread far and wide with great success. It is not only used extensively in universities, but also apparently in governmental organisations and in industry. As the recent discussion of R's Pros and Cons shows, there are many reasons for this. It would be in

Re: [R] Pros and Cons of R

2008-05-23 Thread Roland Rau
Monica Pisica wrote: - You can save scripts, but not *.exe. If you want to contrast R with statistical packages like SPSS or Stata (and if your audience has rather a background in those than in general purpose languages), I think this is not really a problem unless I missed something recentl

Re: [R] strip white in character strings

2008-05-14 Thread Roland Rau
"Europe" "United_States" "a_longer_string" > On Wed, May 14, 2008 at 12:06 PM, Roland Rau <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Dear all, I have several datasets and I want to generate pdf plots from them. I

[R] strip white in character strings

2008-05-14 Thread Roland Rau
Dear all, I have several datasets and I want to generate pdf plots from them. I also want to generate automatically the names of the files. They are country-specific and the element mycurrentdata[1,1] contains this information. So what I do is something like this: pdf(file=paste(mycurrentdata

Re: [R] what kind of residuals are the ones calculated in coxph?

2008-05-13 Thread Roland Rau
Hi Karen, those are martingale residuals. You don't have to be a Guru to find it out. Did you check ?coxph Under values it tells you "an object of class "coxph". See coxph.object for details." So you can ask for help for coxph.object ?coxph.object and then you will see among the components: res

Re: [R] basehaz and newdata

2008-04-07 Thread Roland Rau
Hi, just looked at it briefly and I don't know if it is the real cause for your problems. But 'data' as well as 'newdata' require a data.frame and not a list as input. Does this help? Best, Roland mah wrote: > I am unable to get the basehaz function to apply a proportional > hazards model to

Re: [R] NEW: Sociolects in R

2008-04-01 Thread Roland Rau
Dear Peter, congratulations. Looks very impressive. Seems like you guys in Denmark are very productive this time of the year. This brings me to my actual problem: isn't Lars Polifo a close relative of Rolf Poalis? Has there been any recent progress with the 'sas2r' parser? http://tolstoy.newcas

Re: [R] Beginner help with retrieving frequency and transforming a matrix

2008-03-28 Thread Roland Rau
Hi Sean, is this roughly what you are looking for (please note that in the example data you provided there is only one level of ID given, no "S-4", ...) ? > DF ID Cl Co BrdInd A AB AB.1 frq 1 S-3 IND A BR_F BR_F01 1 00 1.0 2 S-3 IND A BR_F BR_F01 1 00 1.0 3 S-3 IND A

Re: [R] Dimensions of a List

2008-03-25 Thread Roland Rau
Hi, Shubha Vishwanath Karanth wrote: > l=list(list(c(1,2),c(4,5),c(6,7)),list(c(11,22,33),c(44,55,66))) > > How do I know the dimensions of this list?... In other words, how many > sub-lists, sub-sub-lists etc...are there in l? How do I know this? > > > l=list(list(c(1,2),c(4,5),c(6,7)),list

Re: [R] Graphic text

2008-03-04 Thread Roland Rau
Hi Maura, Maura E Monville wrote: > I tried to install "ade4TKGUI" but it failed maybe because I did not > install Tcl/Tk on my Linux/SuSE ??? > > * Installing *source* package 'ade4TkGUI' ... > ** R > ** inst > ** preparing package for lazy loading > Loading required package: ade4 > > Attaching

Re: [R] problem

2008-03-04 Thread Roland Rau
Hi, Erika Frigo wrote: > Good evening to everybody, > I have problems to import in R a really big dataset (more than 100 > values). Which is the best package to install? > Is there someone who works with this kind of dataset and can help me, please? > Maybe the package SQLiteDF could be use

Re: [R] How to read HUGE data sets?

2008-02-28 Thread Roland Rau
Hi, Jorge Iván Vélez wrote: > Dear R-list, > > Does somebody know how can I read a HUGE data set using R? It is a hapmap > data set (txt format) which is around 4GB. After read it, I need to delete > some specific rows and columns. I'm running R 2.6.2 patched over XP SP2 in such a case, I would

Re: [R] Drawing several pictures on a plot

2008-02-22 Thread Roland Rau
Hi Marcin, in addition to Greg Snow's answer, you may also check the "Introduction to R" Manual, especially Section 12.5. In subsection 12.5.3 (in the PDF version), there is also a graphical example of the margins. http://cran.r-project.org/doc/manuals/R-intro.pdf Mam nadzieje, ze to pomoze. D

Re: [R] coloring a graph left or right of an abline

2008-02-21 Thread Roland Rau
Hi Georg, Georg Ehret wrote: > Dear R community, >I would wish to color the background of my histogram differently to the > left and right of an abline... Can you please help? maybe not very elegant or beautiful, but I hope it will get you started: ### Start of Code Example n

Re: [R] Nested frailty model

2008-02-21 Thread Roland Rau
Hi, the package 'survival' provides the possibility to estimate Cox PH models with a frailty term. library(survival) ?frailty If this is not what you are looking for, there is also a package called 'frailtypack'. But I have no experience with that. I hope this helps. Best, Roland P.S. Boccon

Re: [R] History of R

2008-02-19 Thread Roland Rau
Hi Kathy, maybe this article could be also of use for you? Ihaka, R., and Gentleman, R. (1996)," R: A Language for Data Analysis and Graphics," The Journal of Computational and Graphical Statistics, 5, 299-314 Best, Roland Kathy Gerber wrote: > Earlier today I sent a question to Frank Harrell

Re: [R] good references on "survival analysis"

2008-02-19 Thread Roland Rau
Hi, Marc Bernard wrote: > Dear all, > > I am looking for a good reference on "Survival analysis". I am looking for > a booking containing both applications and Maths. Explaining different > methods in survival analysis > since I just answered in another thread with a book recommen

Re: [R] Compare mean survival time

2008-02-19 Thread Roland Rau
Hi, Xing Yuan wrote: > Dear List, > > Does anybody no how to compare mean survival times for two (more) groups in > R? What test statistics should I use? my answer is less of an R answer than a literature answer: John P. Klein and Melvin L. Moeschberger devote section 4.5 in their book "Surviv

Re: [R] writing a simple function

2008-02-13 Thread Roland Rau
Hi, Ben Bolker wrote: > Roland Rau gmail.com> writes: > >> does this do what you want? >> >> overlap <- function(a,b,c,d) { >> all(c:d %in% a:b) >> } >> overlap(1,5,3,4) >> overlap(1,2,3,4) > > Do you really want this

Re: [R] writing a simple function

2008-02-13 Thread Roland Rau
Hi, mohamed nur anisah wrote: > Dear lists, > > any suggestion on how to write a function to return a TRUE if interval > [a,b] overlaps the interval [c,d]. I've tried it but an error occur saying > that 'could not find function v ; in addition warning message occur'. Below > is my codes.Pl

Re: [R] R programming style

2008-02-11 Thread Roland Rau
Hi, Earl F. Glynn wrote: > Instead of using "1" or "2" in an "apply", I'll write something like this > trying for some sort of mnemonic > > apply(x, BY.ROW<-1, sum) > or > apply(z, BY.COL<-2, mean) > It think it makes sense to use those "magic numbers" in the given case. Please let me give you

Re: [R] R programming style

2008-02-11 Thread Roland Rau
Hi, I think using Emacs+ESS [1,2] is always a good starting point for a clear layout with consistent and meaningful indentation. I don't know how other people think about it, but in my opinion, "Elements of Programming Style" by Kernighan and Plauger is still an interesting read -- although th

Re: [R] display pictures

2008-01-31 Thread Roland Rau
-project.org/rwiki/doku.php?id=tips:graphics-misc:translucency > > On Jan 31, 2008 7:17 PM, Roland Rau <[EMAIL PROTECTED]> wrote: > > Dear all, > > > > is there a possibility to display pictures (jpegs, pngs, ...) in R? > > > > Maybe the following

[R] display pictures

2008-01-31 Thread Roland Rau
Dear all, is there a possibility to display pictures (jpegs, pngs, ...) in R? Maybe the following (hypothetical) code makes it clearer what I have in mind: plot(x=0:100, y=0:100, type="n") rect(xleft=25, xright=75, ybottom=30, ytop=95, fill="apicture.png") Thank you, Roland [[alternat

Re: [R] [OT] emacs / xemacs for unix without compile

2008-01-31 Thread Roland Rau
Hi, Wensui Liu wrote: > Dear All, > Is there a emacs/xemacs for unix without compiling it? If it is > possible, I prefer something that I can use immediately after putting > it on the unix server. > Is it possible or am I too stupid to ask this kind of question? > > Thanks for your insight! > I

Re: [R] Integer vs numeric

2008-01-28 Thread Roland Rau
Christophe Genolini wrote: > Hi the list. > > I do not understand the philosophy behind numeric and integer. > - 1 is numeric (which I find surprising) > - 2 is numeric. > - 1:2 is integer. > Why is that ? > I hope I can answer your question at least partly: Numeric means "double", i.e. intern

Re: [R] How to execute R code

2008-01-25 Thread Roland Rau
Hi, one possibility is to start R in a terminal window by entering R then R should be started. now simply enter: source(exmaple.r) and everything should be fine. Hope this helps, Roland Prateek Singh wrote: > Hi, > > I have 'R' code in file. saved it as exmaple.r > here is the code... > >

Re: [R] Non linear regression with 2 explanatory variables

2008-01-16 Thread Roland Rau
Gavin Simpson wrote: > hits=-2.6 tests=BAYES_00 > X-USF-Spam-Flag: NO > > On Wed, 2008-01-16 at 11:02 +0100, Janice Kielbassa wrote: >> Hello! >> >> I want to do a non-linear regression with 2 explanatory variables >> (something like : length ~ a * time * exp( b* temperature)), having a >> data

Re: [R] things that are difficult/impossible to do in SAS or SPSS but simple in R

2008-01-15 Thread Roland Rau
Hi Matthew, something else came to my mind: why don't you post something similar to the newsgroups: comp.soft-sys.stat.spss comp.soft-sys.sas R-help is obviously biased and maybe there are things "we" (the R community) are just missing. Maybe there are things possible in SPSS or SAS which R peo

Re: [R] things that are difficult/impossible to do in SAS or SPSS but simple in R

2008-01-15 Thread Roland Rau
Hi, maybe I missed something while using SAS or SPSS. So please make sure that I am not talking nonsense here. - How would you re-use results in SPSS or SAS? If it is possible for SAS and SPSS, I am fairly sure it is not as easy as in R: lmmodel1 <- lm(Y~X) myslope <- coef(lmmodel1)[2] - You ha

Re: [R] help with R

2008-01-09 Thread Roland Rau
Hi, please have a look at the posting guide (link is at the bottom of your message). Most (if not all) of your problems should be solved if you follow the advice given there. Anyway, please have a look below: [EMAIL PROTECTED] wrote: > Folks, Two simple questions : > > (1) I have a data set (

Re: [R] Result depends on previous result; easy with a loop; but without a loop?

2007-12-14 Thread Roland Rau
(all(initial.matrix==initial.matrix2)) cat("Good\n") else cat("Bad\n") ## yes, I know, such comparisons of floats are notoriously problematic Roland Rau wrote: > Dear all, > > I am pretty sure that this has been discussed before. Unfortunately, I > can not fi

[R] Result depends on previous result; easy with a loop; but without a loop?

2007-12-14 Thread Roland Rau
Dear all, I am pretty sure that this has been discussed before. Unfortunately, I can not find anything in the archives -- probably because I am "RSiteSearching" for the wrong terms. If I remember correctly, I think I even asked this question a few years ago. But I cannot even find this. The ba

Re: [R] low level plotting question on R

2007-12-07 Thread Roland Rau
Hi Jack, Jack Luo wrote: > Dear List, > > I am trying to modify the xlab and ylab for a current figure that was > plotted by a package, I searched through the low level plotting command and > they do not seem to contain how to do this (the only way is to use xlab, > ylab as arguments in "plot" co

Re: [R] Is R portable?

2007-12-04 Thread Roland Rau
Hi Tom, did you check the R for Windows FAQ? http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-run-R-from-a-CD-or-USB-drive_003f Hope this helps, Roland Tom Backer Johnsen wrote: > Recently I came across an interesting web site: > http://portableapps.com/. The idea is simple, this

Re: [R] Linux editor for R+LaTeX, but not Emacs

2007-10-05 Thread Roland Rau
Christian Salas wrote: > I want something like Emacs (of course including auctex and ess), but > not Emacs. Something like Tinn-R [http://www.sciviews.org/Tinn-R/] is > the best solution, as far as I know for it, unfortunately is only > available for Windows. XEmacs? :-) If you don't want Emac

Re: [R] Call C code from R

2007-09-13 Thread Roland Rau
Hi! Olga K. Kamneva wrote: > Hello, All! > > I have function which is written in C, the function uses other functions > also builded bu me. Now I need to use the function to build R function. > My questions are: > 1. How can I include libraries (for example, iomanip, sstream, tcl.h)? > 2. Should