Re: [R] Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}

2008-06-18 Thread Prof Brian Ripley
From the NEWS file for 2.7.0: o The default for 'stylepath' in Sweave's (default) RweaveLatex driver can be set by the environment variable SWEAVE_STYLEPATH_DEFAULT: see ?RweaveLatex. You want to set 'stylepath' to be false, and the easiest way to do this is to set that

Re: [R] longest common substring

2008-06-18 Thread Michael Lawrence
See: http://www.omegahat.org/Rlibstree/ Binds R to libstree for suffix tree operations. Libstree is included with the package, so don't worry about building it separately. Michael On Tue, Jun 17, 2008 at 10:28 PM, Daren Tan [EMAIL PROTECTED] wrote: i need to compute the longest common

Re: [R] Differential Equations

2008-06-18 Thread Michael Lawrence
On Tue, Jun 17, 2008 at 6:25 PM, David Arnold [EMAIL PROTECTED] wrote: All, I've found odesolve and lsoda. Any other packages for differential equations? There's Rsundials, which gives you an algebraic ode solver. Any good tutorials on using R and solving differential and partial

[R] Problem in Binning of a data set

2008-06-18 Thread sumit gupta
Hello, I am having problem with binning the data. I have a 50X3 matrix and I binned the data for all the 3 columns. Using table command I got the total no. of elements in a particular bin. Could you please tell me how to see that what all elements are there in a particular bin and then create a

Re: [R] Using the shape () function

2008-06-18 Thread Tom Backer Johnsen
hadley wickham wrote: You might try using the reshape package instead: last - function(x) x[length(x)] names(d) - c(value, person, time) cast(d, person ~ time, last) The first and the last line I think is clear, although I will have to experiment more to understand the call on cast () better.

Re: [R] x labels out of Quartz canvas

2008-06-18 Thread Prof Brian Ripley
On Tue, 17 Jun 2008, MeMooMeM wrote: Thanks a lot! I looked at the document. It shows how to set the size of the canvas, I don't believe it does. but not how to change it *after* plotting. Now I start with a bigger canvas, but the plot is scaled into it, so I am having the same problem

[R] matrix

2008-06-18 Thread Paul Adams
Hello everyone,I am having a difficult time understanding what commands are used to add and remove elements froma matrix or data frame.For ex ample if I want to remove element=[1,50] or elements [1,50:63] or elements  [2:4,20:35]from a matrix and replace with NA or any number what command must

Re: [R] read.spss {foreign} doesn't work over network?

2008-06-18 Thread Prof Brian Ripley
This looks like a restriction on your network (assuming the file is named correctly). I can read SPSS files with read.spss over ours, and the code in read.spss is just standard C I/O (fopen) that knows nothing about Windows network mappings. On Tue, 17 Jun 2008, Farley, Robert wrote: I'm

[R] Howto Compute Pairwise Similarity/Correlation Matrix from a Data Frame

2008-06-18 Thread Gundala Viswanath
Hi, I have the following 5 vectors. I wish to compute the pairwise Pearson Correlation matrix with this data.frame. Is there a compact way to do it? At the end I hope to create a heatmap out of this correlation matrix. __BEGIN__ data - read.table(mydata.txt) print(data) V1 V2

Re: [R] Howto Compute Pairwise Similarity/Correlation Matrix from aData Frame

2008-06-18 Thread Dimitris Rizopoulos
try this: mat.data - data.matrix(data) cor(t(mat.data)) I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web:

Re: [R] constrOptim with method = L-BFGS-B

2008-06-18 Thread lhaba
Thank you for your answer. I posted this problem as it is because I am benchmarking multiple solvers over this particular problem. I will enquire LowRankQP, kernlab and quadprog packages as you suggested. Thank you Georges Spencer Graves wrote: I believe that 'optim' will not

Re: [R] matrix

2008-06-18 Thread Uwe Ligges
Read the help page or better the manuals! And before posting, please read the posting guide. You get the help page for indexing by, e.g.: help([) Uwe Ligges Paul Adams wrote: Hello everyone,I am having a difficult time understanding what commands are used to add and remove elements

Re: [R] Error

2008-06-18 Thread Uwe Ligges
ppatel3026 wrote: My code seems to break out with error below for every 1000 files it processes. Then I re-run from the last file where it errored out and it runs without any bugs. Any ideas what might cause error below? Error in match(x, table, nomatch = 0) : formal argument nomatch

Re: [R] color2D.matplot axis names

2008-06-18 Thread Uwe Ligges
Looking into the color2D.matplot code showsthat this is by design. You might want to contact the package maintainer and send suggestions how to patch the function (or better, send the patch itself) in order to show appropriate labels. Of course, for a worksround, disable axes

[R] Number of digits in paste funciton

2008-06-18 Thread Tine
Hi! Does anyone know hot to set number of digits to be printed in function 'paste'? Tine Mlač __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] constrOptim with method = L-BFGS-B

2008-06-18 Thread Hans W. Borchers
Dear Georges, if you are interested in optimization methods in R, there is the Optimization Task View that has been set up only a few weeks ago. Most likely it covers all the optimization algorithms available in R packages. For constraint handling there have been some postings in April and May

[R] paste data

2008-06-18 Thread Sybille Wendel
Hello, I need a command. I have a lot of data in different dataframes(auto.0a, auto.0b, auto.0c, auto.5Na,...), that has similar names. I could print the names all at once wih a loop with the command paste(), see below: plot-c(0a,0b,0c,5Na,5Nb,5Nc,PKa,PKb,PKc,5NPKa,5NPKb,

Re: [R] Number of digits in paste funciton

2008-06-18 Thread Søren Højsgaard
For detailed control of such things see ?sprintf and ?formatC Søren -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af Tine Sendt: 18. juni 2008 10:21 Til: r-help@r-project.org Emne: [R] Number of digits in paste funciton Hi! Does anyone know hot to

Re: [R] Number of digits in paste funciton

2008-06-18 Thread Peter Dalgaard
Tine wrote: Hi! Does anyone know hot to set number of digits to be printed in function 'paste'? Basically, you can't, because as.character always uses 15 digits (chopping trailing zeros). Instead, use round(), format(), formatC(), etc. Or sprintf()

Re: [R] Howto Compute Pairwise Similarity/Correlation Matrix from aData Frame

2008-06-18 Thread Gundala Viswanath
Dear Dimitris, Thanks so much for the reply. However I got this memory error,when I run it on my data (12.7Mb). Is there a way I can make the code more memory susceptible. My dataset can be found here: http://dpaste.com/57274/plain/ __BEGIN__ data - read.table(mydata.txt) nofsamp -

Re: [R] paste data

2008-06-18 Thread Søren Højsgaard
You can put all dataframes into a list L, e.g. L - list(auto.0a, auto.0b,...) and then do either a for-loop or use lapply. For example for (ii in 1:length(L)){ plot(y~x, data=L[[ii]],...) } or lapply(L, function(d) plot(y~x, data=d) Med venlig hilsen Søren Højsgaard

Re: [R] Number of digits in paste funciton

2008-06-18 Thread Prof Brian Ripley
On Wed, 18 Jun 2008, Tine wrote: Hi! Does anyone know hot to set number of digits to be printed in function 'paste'? paste() does not print, so we can only guess at what you mean. The help says 'paste' converts its arguments (_via_ 'as.character') to character strings, and

Re: [R] Reshape or Stack? (To produce output as columns)

2008-06-18 Thread Steve Murray
It sounds like something is going wrong with the melting. Could you please include the output of str(original data frame), and str(melted)? (Or even better a small version of your data created with dput) And this is a str output of the original data frame (first few rows of that

Re: [R] paste data

2008-06-18 Thread Hans-Joerg Bibiko
On 18 Jun 2008, at 10:36, Sybille Wendel wrote: I need a command. I have a lot of data in different dataframes(auto.0a, auto.0b, auto. 0c, auto.5Na,...), that has similar names. I could print the names all at once wih a loop with the command paste(), see below: plot-

Re: [R] paste data

2008-06-18 Thread Peter Dalgaard
Sybille Wendel wrote: Hello, I need a command. I have a lot of data in different dataframes(auto.0a, auto.0b, auto.0c, auto.5Na,...), that has similar names. I could print the names all at once wih a loop with the command paste(), see below:

[R] Cluster on both categorical and numerical data

2008-06-18 Thread Chua Siang Li
Hello there. Is there any function in R that can do cluster on a set of data that has both categorical and numerical variables? thanks. siangli __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] randomForest outlier

2008-06-18 Thread Birgitle
I try to use ?randomForest to find variables that are the most important to divide my dataset (continuous, categorical variables) in two given groups. But when I plot the outliers: plot(outlier(FemMalSex_NAavoid88.rf33, cls=FemMalSex_NAavoid88$Sex),

Re: [R] Measuring dispersion

2008-06-18 Thread Jan T. Kim
On Wed, Jun 18, 2008 at 12:10:18AM +0100, S. Nunes wrote: Thanks for the suggestion, however I'm looking for a score since my goal is to rank thousands of distributions. For instance, given a large text, I would like to rank all terms according to their distribution (dispersion) within the

Re: [R] color2D.matplot axis names

2008-06-18 Thread Jim Lemon
MeMooMeM wrote: Hi, I finally came up with a nice colored matrixplot, using the color2D.matplot function of the plotrix package. But I can't assign xtics and ytics to this plot. I made sure that the matrix has correct colnames() and rownames(). Here's what I do: a=matrix(1:16, 4, 4)

[R] inverse cumsum

2008-06-18 Thread Alfredo Alessandrini
I've a matrix like this: 1985 1.38 1.27 1.84 2.10 0.59 3.47 1986 1.05 1.13 1.21 1.54 0.21 2.14 1987 1.33 1.21 1.77 1.44 0.27 2.85 1988 1.86 1.06 2.33 2.14 0.55 1.40 1989 2.10 0.65 2.74

Re: [R] Cluster on both categorical and numerical data

2008-06-18 Thread Birgitle
You could have a look at library(analogue) , function ?distance and library (cluster), function ?agnes B. Chua Siang Li wrote: Hello there. Is there any function in R that can do cluster on a set of data that has both categorical and numerical variables? thanks. siangli

[R] Low-discrepancy sequences

2008-06-18 Thread Alberto Monteiro
Is there any way to _test_ if a given sequence is a low-discrepancy sequence? Or, equivalently, is there any way to measure the discrepancy of a sequence? WTIW, ... http://en.wikipedia.org/wiki/Low-discrepancy_sequence ... doesn't look like something implementation-friendly :-) Alberto

Re: [R] inverse cumsum

2008-06-18 Thread Wacek Kusnierczyk
Alfredo Alessandrini wrote: I've a matrix like this: 1985 1.38 1.27 1.84 2.10 0.59 3.47 1986 1.05 1.13 1.21 1.54 0.21 2.14 1987 1.33 1.21 1.77 1.44 0.27 2.85 1988 1.86 1.06 2.33 2.14 0.55 1.40

Re: [R] inverse cumsum

2008-06-18 Thread Alfredo Alessandrini
2008/6/18 Alfredo Alessandrini [EMAIL PROTECTED]: I've a matrix like this: 1985 1.38 1.27 1.84 2.10 0.59 3.47 1986 1.05 1.13 1.21 1.54 0.21 2.14 1987 1.33 1.21 1.77 1.44 0.27 2.85 1988 1.86 1.06 2.33 2.14

[R] Nonlinear multivariate regression

2008-06-18 Thread Christoph Scherber
Dear R users, Is there a way to do non-linear multivariate regression in R? Ideally, I would like to have a model like cbind(m,n,o)~a+b*x But I don?t know if functions like nls() or gls() accept multiple response variales. Many thanks for your help! Best wishes Christoph (using R 2.7.0 on

Re: [R] inverse cumsum

2008-06-18 Thread Ted Harding
On 18-Jun-08 10:17:09, Alfredo Alessandrini wrote: I've a matrix like this: 1985 1.38 1.27 1.84 2.10 0.59 3.47 1986 1.05 1.13 1.21 1.54 0.21 2.14 1987 1.33 1.21 1.77 1.44 0.27 2.85 1988 1.86 1.06 2.33

Re: [R] Cluster on both categorical and numerical data

2008-06-18 Thread Peng Jiang
hi, Chua Siang I think the mclust package is what you need. regards. On 2008-6-18, at 下午5:46, Chua Siang Li wrote: Hello there. Is there any function in R that can do cluster on a set of data that has both categorical and numerical variables? thanks. siangli

Re: [R] Measuring dispersion

2008-06-18 Thread Jim Lemon
S. Nunes wrote: Thanks for the suggestion, however I'm looking for a score since my goal is to rank thousands of distributions. For instance, given a large text, I would like to rank all terms according to their distribution (dispersion) within the text. Terms evenly distributed in the text

Re: [R] Cluster on both categorical and numerical data

2008-06-18 Thread Gavin Simpson
On Wed, 2008-06-18 at 03:45 -0700, Birgitle wrote: You could have a look at library(analogue) , function ?distance Thanks for the plug Birgit, but (and I say this as the author of distance), if you just want to compute a dissimilarity matrix using Gower's coefficient for mixed data, use daisy()

Re: [R] Capturing coxph warnings and errors

2008-06-18 Thread Terry Therneau
Error in fitter(X, Y, strats, offset, init, control, weights = weights, : NA/NaN/Inf in foreign function call (arg 6) In addition: Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Ran out of iterations and did not converge --- The warning message

Re: [R] combining two data frames (different question)

2008-06-18 Thread jim holtman
?merge On Tue, Jun 17, 2008 at 6:40 PM, calundergrad [EMAIL PROTECTED] wrote: i have two data frames. One data frame contains one column with the identificication number of a geographic place. The other columns are just some data about the corresponding geographic place. The other data

Re: [R] Problem in Binning of a data set

2008-06-18 Thread Abhijit Dasgupta
One issue you will have is that, if you're using the same cutpoints for the binning for all three tables, you'll probably get different numbers of values from each column in each bin, so you won't be able to form a matrix. Of course, I might be misunderstanding what you mean by binning :)

Re: [R] inverse cumsum

2008-06-18 Thread Gavin Simpson
On Wed, 2008-06-18 at 12:37 +0200, Wacek Kusnierczyk wrote: Alfredo Alessandrini wrote: I've a matrix like this: 1985 1.38 1.27 1.84 2.10 0.59 3.47 1986 1.05 1.13 1.21 1.54 0.21 2.14 1987 1.33 1.21 1.77 1.44 0.27

[R] Odp: Problem in Binning of a data set

2008-06-18 Thread Petr PIKAL
Hi Well. I am a bit lost in your bins. If I understand correctly you shall have some factor with bin values bin.f - cut(some data, levels) then you can split your data according to values of bin.f split(complete data, bin.f) If this does not solve your problem just throw it to some other bin

Re: [R] Cluster on both categorical and numerical data

2008-06-18 Thread Gavin Simpson
On Wed, 2008-06-18 at 12:43 +0100, Gavin Simpson wrote: On Wed, 2008-06-18 at 03:45 -0700, Birgitle wrote: You could have a look at library(analogue) , function ?distance Thanks for the plug Birgit, but (and I say this as the author of distance), if you just want to compute a dissimilarity

Re: [R] inverse cumsum

2008-06-18 Thread Erich Neuwirth
You did not specify exactly what you mean by the inverse of cumsum. If you want (in pseudocode) cumsumfromright(a)(k):=(sum(a(i),i=k..length(a)) giving you the sums over the tails of the sequence, then cumsumfromright - function(x) rev(cumsum(rev(x))) is probably what you want. If you want to

Re: [R] Insert raster image into an R graphic

2008-06-18 Thread Tudor Bodea
Creg: Thank you so much for your leads. I will take a look at the package and let you know how it goes. Tudor Quoting Greg Snow [EMAIL PROTECTED]: Look at the subplot function in the TeachingDemos package. One of the examples shows a scatterplot using the R logo as the points. You may

Re: [R] inverse cumsum

2008-06-18 Thread Wacek Kusnierczyk
Gavin Simpson wrote: rc = nrow(m) cumsums = apply(m[rc:1,], 2, cumsum)[rc:1,] Alternatively, just use rev() instead of doing it by hand: cs2 - apply(dat, 2, function(x) {rev(cumsum(rev(x)))}) yes, that's more elegant, but somewhat less efficient: m = matrix(1:10, 100,

Re: [R] Insert raster image into an R graphic

2008-06-18 Thread Roger Bivand
Tudor Bodea gtg757i at mail.gatech.edu writes: Creg: Thank you so much for your leads. I will take a look at the package and let you know how it goes. Greg's solution is more up-to-date, but you'll find that the pixmap package has a function called addlogo - see ?addlogo-methods - which

Re: [R] Capturing coxph warnings and errors

2008-06-18 Thread Daniel Brewer
Hi, I have enclosed the data load(coxtest.rdata) to get it into R. Here is the command line to produce the error coxph(Surv(RecFollowUpTime,Rec)~values,data=test) As you can see the values are almost all the same value, which is probably causing the problem. Dan Terry Therneau wrote: Error

Re: [R] Plot point patterns

2008-06-18 Thread Roger Bivand
Vanesa Maria Santos Sanchez vanesa.santossanchez at alum.uca.es writes: Hello! I want to plot a multitype point pattern called new in package spatstat. When I write plot(new) in the graphic window I can see a strech rectangle with a point inside, not the point pattern.If I write

Re: [R] Deming Regression

2008-06-18 Thread Tom La Bone
I believe that Deming regression also goes by the name of orthogonal regression, which can be performed in R using pca methods. If you do a search of the list for orthogonal regression you can see the previous discussions of this topic. Tom Dexter Riley wrote: Hi all. Has anyone ever done

[R] ifelse and vs

2008-06-18 Thread Christos Argyropoulos
Hi, I noticed whether some one could explain why and behave differently in data frame transformations. Consider the following : a-data.frame(r=c(0,0,2,3),g=c(0,2,0,2.1)) Then: transform(a,R=ifelse(r0 g 0,log(r/g),NA)) r g R 1 0 0.0 NA 2 0 2.0 NA 3 2 0.0 NA 4 3 2.1 NA but

Re: [R] paste data

2008-06-18 Thread Ray Brownrigg
get() is your friend. Try: for (x in 1:length(plot)) { thisdf - paste(auto., plot[x], sep=) plot(thisdf[, 1], thisdf[, 2], col=...) } HTH, Ray Brownrigg Sybille Wendel wrote: Hello, I need a command. I have a lot of data in different dataframes(auto.0a, auto.0b, auto.0c,

[R] example from arfimaOxFit

2008-06-18 Thread Chang, Li-Wei
Hi, I got some problem running the example of arfimaOxFit. The first three line of the examples I run are: library(Rmetrics) x = armaSim(model = list(ar = c(0.5, - 0.5), d = 0.3, ma = 0.1), n = 500) fit = arfimaOxFit(formula = x ~ arfima(2,1)) The error msg is: Error in eval(expr, envir, enclos)

[R] Scoring Leads / Regression

2008-06-18 Thread ajay ohri
Hi List, Has anyone used R for scoring leads. What has been your experience. I know the GLM function, but any other functions would help . Also I have tried the R GUI's rattle and R Cmdr ( a bit pressed for time and regression statistics ). What would be the best way to go about building this

Re: [R] combining two data frames (different question)

2008-06-18 Thread [EMAIL PROTECTED]
Try ?merge Andrey __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] paste data

2008-06-18 Thread Ido M. Tamir
I want to do very similar things with all the dataframes and their structure is also the same. Is there a way to write a loop? (so that I don't have to write the same 18 times) I tried things like that: for (x in 1:length(plot)) { plot(paste(auto.,plot[x],sep=)[,1],

[R] reformatting R scripts for htmlize()

2008-06-18 Thread Agustin Lobo
Hi! I have a bunch of (mainly class) R scripts that I would like to convert into html pages (although if someone thinks that what I want to do is easier with latex or pdf, please tell me). Considering the format of my files, htmlize() seems the best option. The only problem is that I would need

Re: [R] Differential Equations

2008-06-18 Thread Spencer Graves
I just got 37 hits from RSiteSearch('differential equation', 'fun') including odesolv{fda}, rk4{deSolve}, rk4{odesolve}, in addition to lsoda{odesolve} and the Rsundials package. hope this helps. Spencer Graves Michael Lawrence wrote: On Tue, Jun 17, 2008 at 6:25 PM, David

[R] PCA analysis

2008-06-18 Thread Monica Pisica
Monna, The way i do it is to re-create the biplot for the PCA . I am attaching my code (i am sure this can be done even easier . but this works as well) where i am using pca() function from labdsv and my data is called veg1. library (labdsv) pca.1-pca(veg1,cor=TRUE) # The scores are

[R] Extract only certain rows from a table

2008-06-18 Thread naw3
Hi, I have a table where column 1 has ID numbers and column two has data, and I have a vector containing a subset of those ID numbers. How can I create a new table with only the rows from the old table that match the IDs in the vector, like below: Original Table: ID Value 1123 2

Re: [R] Extract only certain rows from a table

2008-06-18 Thread Henrique Dallazuanna
Try: subset(tb, ID %in% vec) On Wed, Jun 18, 2008 at 10:36 AM, [EMAIL PROTECTED] wrote: Hi, I have a table where column 1 has ID numbers and column two has data, and I have a vector containing a subset of those ID numbers. How can I create a new table with only the rows from the old

Re: [R] ifelse and vs

2008-06-18 Thread Gustaf Rydevik
On Wed, Jun 18, 2008 at 3:10 PM, Christos Argyropoulos [EMAIL PROTECTED] wrote: Hi, I noticed whether some one could explain why and behave differently in data frame transformations. Consider the following : a-data.frame(r=c(0,0,2,3),g=c(0,2,0,2.1)) Then: transform(a,R=ifelse(r0 g

[R] attention plot

2008-06-18 Thread Michael Schulte
Dear all, I am looking for a method to draw multiple rectangles in different colors plus arrows between them (given a data matrix with the relevant coordinate and size information). After looking around mainly on: http://cran.r-project.org/web/views/Graphics.html and the Rseek page the Grid

Re: [R] Deming Regression

2008-06-18 Thread Cleber Nogueira Borges
Hello Dexter, I have interest in this topic! In my search in web, I find things about the MethComp package! In this package, there is a Deming function ... for Deming regression! http://staff.pubhealth.ku.dk/~bxc/MethComp/Archive/ http://staff.pubhealth.ku.dk/~bxc/MethComp/ Cleber Hi all.

[R] computing the average and standard deviation for many sets of triplicates, using R-approach

2008-06-18 Thread Daren Tan
Below example has 4 sets of triplicates, without using for loop and iteratively cbind the columns, what is the R-approach of generating a matrix of 8 columns that are the averages and standard deviations ? The average and standard deviation columns should be side by side i.e. A.mean A.sd

[R] How to create strata out of the data.frame table

2008-06-18 Thread Ana Kolar
My data.frame table consist of 3 variables (x,y and z) where each variable has 1000 units. I need to create 5 equal size strata according to one of the variable (let's say x) whereas units of x variable with a higher value have higher probability to be selected in a strata with a higher number

[R] operations on all pairs of columns from two matrices

2008-06-18 Thread Daren Tan
m1 - matrix(rnorm(40), ncol=4) m2 - matrix(rnorm(40), ncol=4) I would like to subtract first column of m1 from all columns of m2, subtract 2nd of m1 from all columns of m2, and so on. Obviously, I am not using the appropriate function outer(m1, m1, -), since the first column isn't all 0s.

Re: [R] computing the average and standard deviation for many sets of triplicates, using R-approach

2008-06-18 Thread Henrique Dallazuanna
Try this: f - function(x) { sub - subset(t, select = x) cbind(Mean = rowMeans(sub, na.rm = T), Sd = apply(sub, 1, sd, na.rm = T)) #return(sub) } do.call(cbind, lapply(lapply(seq(1, ncol(t), by = ncol(t)/4), seq, l = 3), f)) On Wed, Jun 18, 2008 at 11:17 AM, Daren Tan [EMAIL

Re: [R] attention plot

2008-06-18 Thread Gabor Grothendieck
Perhaps gplot from sna package? library(gplot) gplot(rgraph(5), vertex.sides = 4, vertex.cex = 1:5, vertex.col = 1:5) On Wed, Jun 18, 2008 at 9:53 AM, Michael Schulte [EMAIL PROTECTED] wrote: Dear all, I am looking for a method to draw multiple rectangles in different colors plus arrows

Re: [R] How to create strata out of the data.frame table

2008-06-18 Thread hadley wickham
On Wed, Jun 18, 2008 at 9:20 AM, Ana Kolar [EMAIL PROTECTED] wrote: My data.frame table consist of 3 variables (x,y and z) where each variable has 1000 units. I need to create 5 equal size strata according to one of the variable (let's say x) whereas units of x variable with a higher value have

[R] Editor for Mac OSX

2008-06-18 Thread Sebastian Leuzinger
Dear R-list I am (forced) to change from Linux to Mac and am now looking for a new editor for R. I would like one that features a split window (console + editor) as well as syntax highlighting. Can anyone help? Especially the split-window feature does not seem to be easily available in the

Re: [R] operations on all pairs of columns from two matrices

2008-06-18 Thread Stephen Tucker
how about this? m1 - matrix(rep(1:3,each=5),ncol=3) m2 - matrix(1:15,ncol=3) array(apply(m1,2,function(x,m) m-x,m2),dim=c(dim(m2),ncol(m1))) - Original Message From: Daren Tan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 18, 2008 7:36:45 AM Subject: [R] operations on

Re: [R] x labels out of Quartz canvas

2008-06-18 Thread MeMooMeM
Dr. Ripley, I appreciate all your help. The graph looks great now. Just in case someone searches for a similar problem: You need to set the *margins* not the size of the canvas. See par's mai and mar and the figures in that document. Here's how I do that: par(mar=c(7,7,7,7))

Re: [R] computing the average and standard deviation for many sets of triplicates, using R-approach

2008-06-18 Thread stephen sefick
#is this what you want? t - matrix(rnorm(120), ncol=12) (colnames(t) - paste(rep(LETTERS[1:4], each=3), 1:3, sep=.)) f-as.matrix(cbind(c(t[,1:3]), c(t[,4:6]), c(t[7:9]), c(t[10:12]))) colnames(f)-paste(rep(LETTERS[1:4])) library(prettyR) describe(f, num.desc=c(mean, sd)) On Wed, Jun 18, 2008 at

[R] unscribe

2008-06-18 Thread dong kim
MIME-Version: 1.0 Content-Type: text/plain; charset=euc-kr Content-Transfer-Encoding: quoted-printable Hello,=0A=0AIt doesn't seem to work for me when I was trying to unsubscribe= R-help mailing list (I did not get confirmation email). =0ACould you pleas= e unsubscribe me from the mail list

Re: [R] Editor for Mac OSX

2008-06-18 Thread Erik Iverson
Sebastian Leuzinger wrote: Dear R-list I am (forced) to change from Linux to Mac and am now looking for a new editor for R. I would like one that features a split window (console + editor) as well as syntax highlighting. Can anyone help? Especially the split-window feature does not seem to be

Re: [R] Editor for Mac OSX

2008-06-18 Thread Graham Smith
Have a look at TextMate http://macromates.com/ Graham 2008/6/18 Sebastian Leuzinger [EMAIL PROTECTED]: Dear R-list I am (forced) to change from Linux to Mac and am now looking for a new editor for R. I would like one that features a split window (console + editor) as well as syntax

[R] Build a R into a single static library on windows?

2008-06-18 Thread Chen, Zehao
Hi R users, I've been developing a C++ library that depends on R through R.dll. The current way is to have R directories somewhere and have R_HOME pointing to it. This works. But it's inconvenient when deploying this library since the whole R distribution has to be deployed with it. It

[R] Transform data to uniform variates

2008-06-18 Thread Aloui Riadh
To estimate Copula using canonical maximum likelihood method we need first tranforming data to uniform variates. I found this code written by Jun Yan: cbind((rank(dat[, 1]) - 0.5)/n, (rank(dat[, 2]) - 0.5)/n) where dat represent the considered data. Why do not use this formula rank(dat)/(n+1)

[R] Small Bug in constrOptim documentation

2008-06-18 Thread Matthias Gondan
Dear list, I think there is a small bug in the constrOptim documentation (R-2.7.0): ## from optim fr - function(x) { ## Rosenbrock Banana function x1 - x[1] x2 - x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } grr - function(x) { ## Gradient of 'fr' x1 - x[1] x2 - x[2]

Re: [R] computing the average and standard deviation for many sets of triplicates, using R-approach

2008-06-18 Thread hadley wickham
On Wed, Jun 18, 2008 at 9:17 AM, Daren Tan [EMAIL PROTECTED] wrote: Below example has 4 sets of triplicates, without using for loop and iteratively cbind the columns, what is the R-approach of generating a matrix of 8 columns that are the averages and standard deviations ? The average and

Re: [R] inverse cumsum

2008-06-18 Thread Alfredo Alessandrini
i guess you mean columnwise cumsums computed starting from the bottom up? yes then this should do (given that your data is in matrix m, and years are row labels, not data): rc = nrow(m) cumsums = apply(m[rc:1,], 2, cumsum)[rc:1,] ok...work very well.. data 1987 1.33 1.21

Re: [R] Editor for Mac OSX

2008-06-18 Thread Thomas Adams
Sebastian, You may also want to look at BBEdit (http://www.barebones.com/). Welcome to Macintosh! Regards, Tom Sebastian Leuzinger wrote: Dear R-list I am (forced) to change from Linux to Mac and am now looking for a new editor for R. I would like one that features a split window (console

[R] Maximum Likelihood Estimation

2008-06-18 Thread Todd Brauer
Using R, I would like to calculate algorithms to estimate coefficients á and â within the gamma function: f(costij)=((costij)^á)*exp(â*costij).  I have its logarithmic diminishing line data (Logarithmic Diminishing Line Data Table) and have installed R¢s Maximum Likelihood Estimation package;

[R] strptime

2008-06-18 Thread Eric Elguero
Hi, what's wrong with that? strptime(06:00:00 03.01.2008,format=%H:%M%:%S %d.%m.%Y,tz=GMT) [1] NA the command seems to comply with the rules in the help file but returns NA (R 2.6.1 Windows XT) Eric Elguero __ R-help@r-project.org mailing list

Re: [R] Editor for Mac OSX

2008-06-18 Thread Markus Gesmann
Smultron http://smultron.sourceforge.net/ is a nice (and free) alternative to the R build in editor. However, I would suggest to send Mac specific questions to the R-Mac mail list: https://stat.ethz.ch/mailman/listinfo/r-sig-mac Best regards, Markus Markus Gesmann │Associate Director│Libero

[R] Help with axis labels

2008-06-18 Thread Tariq Perwez
Hi I have patched together (from various sources) the following code to get semi-logarithmic plot. Unfortunately, my labels come out also at intermediate places between 10^2, 10^3, 10^4 etc. Since I put the code together from various sources and do not understand fully how the code is working, I

Re: [R] strptime

2008-06-18 Thread Erik Iverson
Eric Elguero wrote: Hi, what's wrong with that? strptime(06:00:00 03.01.2008,format=%H:%M%:%S %d.%m.%Y,tz=GMT) [1] NA the command seems to comply with the rules in the help file But it does not. Look closely at the format, and then you'll see %M%... but returns NA (R 2.6.1 Windows

Re: [R] computing the average and standard deviation for many setsof triplicates, using R-approach

2008-06-18 Thread Bert Gunter
Folks: Assuming that you want row statistics of each block, it seems to me that solutions so far proposed are either unnecessarily complex (a matter of personal taste, I know) or depend unnecessarily on the specific arrangement of the columns (with those beginning with same letter occurring

Re: [R] Help with axis labels

2008-06-18 Thread Gabor Grothendieck
See ?axTexpr in the sfsmisc package. There are several examples on that page. On Wed, Jun 18, 2008 at 12:59 PM, Tariq Perwez [EMAIL PROTECTED] wrote: Hi I have patched together (from various sources) the following code to get semi-logarithmic plot. Unfortunately, my labels come out also at

Re: [R] strptime

2008-06-18 Thread Prof Brian Ripley
On Wed, 18 Jun 2008, Eric Elguero wrote: Hi, what's wrong with that? User error. Look up all the terms beginning with % -- the third one (%:) is not described in the help file. strptime(06:00:00 03.01.2008,format=%H:%M%:%S %d.%m.%Y,tz=GMT) [1] NA the command seems to comply with the

Re: [R] keeping original order in factor()

2008-06-18 Thread Charles C. Berry
On Wed, 18 Jun 2008, Andrew Yee wrote: Thanks for everyone's suggestions. I think factor(foo, levels = unique(foo)) works best for my needs. (By the way, I'm still trying to figure out how to use the ordered option in factor().) Some functions behave differently if the factor levels are in

Re: [R] Editor for Mac OSX

2008-06-18 Thread Hans-Jörg Bibiko
On 18.06.2008, at 18:09, Graham Smith wrote: Have a look at TextMate http://macromates.com/ There are three extensions (bundles) available dealing with R for TextMate [up to now in the Review repository]: [in very short terms] 1) R - writing R scripts and executing it (plots are inside

[R] help with manipulating data frames (survey analysis)

2008-06-18 Thread Marvin Lists
Dear all, Can anyone recommend a good book or an online tutorial for using data frames in R? I want to do statistical analysis on some survey data and I can specify what I would like to do very easily in algorithmic terms. However, being a n00b to R I am struggling with getting R to execute what

Re: [R] Editor for Mac OSX

2008-06-18 Thread Charilaos Skiadas
One more advantage of TextMate is support for Sweave files. You can have a Sweave file open, and the LaTeX parts of it are syntax colored according to LaTeX and one can use all the facilities of the LaTeX extension (bundle) in LaTeX (which probably has some things similar to AucTeX, has a

Re: [R] help with manipulating data frames (survey analysis)

2008-06-18 Thread stephen sefick
an introduction to R On Wed, Jun 18, 2008 at 2:11 PM, Marvin Lists [EMAIL PROTECTED] wrote: Dear all, Can anyone recommend a good book or an online tutorial for using data frames in R? I want to do statistical analysis on some survey data and I can specify what I would like to do very

Re: [R] Maximum Likelihood Estimation

2008-06-18 Thread Ben Bolker
Todd Brauer toddbrauer at yahoo.com writes: Using R, I would like to calculate algorithms to estimate coefficients á and â within the gamma function: f(costij)=((costij)^á)*exp(â*costij).  I have its logarithmic diminishing line data (Logarithmic Diminishing Line Data Table) and have

Re: [R] help with manipulating data frames (survey analysis)

2008-06-18 Thread Marvin Lists
If you mean: http://cran.r-project.org/doc/manuals/R-intro.pdf I have already gone through that. I has no examples and only introductory text about what data frames are. I am looking for something a bit more comprehensive - perhaps something that uses a scenario or example to illustrate how

  1   2   >