[R] help on fisher.test(stats)?

2007-07-09 Thread zhijie zhang
Dear friends, My dataset have many zeros, so i must use fisher exact test . Unfortunately, the fisher.test(stats) function fail to do it. Anybody knows how to do the fisher exact test with many zeros in the dataset? My dataset is:

[R] boot.ci

2007-07-09 Thread Fredrik Lundgren
Dear boot.ers, I ran a small program for training purposes and ended with problems in boot.ci bush - c(rep(1, 840), rep(0, 660)) f.mean - function(y, id) {mean(y[id])} bushB - boot(bush, f.mean, 1000) boot.ci(bushB, conf = 0.95, type = c('perc', 'bca')) Error in bca.ci(boot.out, conf,

[R] Calling R function in C

2007-07-09 Thread Deb Midya
Hi R Users! Thanks in advance. I am using R-2.5.1 on Windows XP and I have installed all necessary tools such as perl and tools.exe. I am trying to use sample(1:100, 3, rep=F) in C. How can I use this R function in C? Once again thank you very much for your time.

[R] rpart weight prior

2007-07-09 Thread Aurélie Davranche
Hi! Could you please explain the difference between prior and weight in rpart? It seems to be the same. But in this case why including a weight option in the latest versions? For an unbalanced sampling what is the best to use : weight, prior or the both together? Thanks a lot. Aurélie

[R] transform excel data into graph

2007-07-09 Thread cross123
Hello everyone, I have a set of data in the following form, which are stored in an Excel file: nick john peter lesson1 0.465 0.498 0.473 lesson2 0.422 0.44 0.134 lesson3 0.45 0.35 0.543

Re: [R] help on fisher.test(stats)?

2007-07-09 Thread Stefan Grosse
Original Message Subject: [R] help on fisher.test(stats)? From: zhijie zhang [EMAIL PROTECTED] To: R-help@stat.math.ethz.ch Date: 09.07.2007 09:03 Dear friends, My dataset have many zeros, so i must use fisher exact test . Unfortunately, the fisher.test(stats) function fail

[R] display data.frame with lines and colimns

2007-07-09 Thread elyakhlifi mustapha
hello, to display a data.frame I use this syntax dir.create(file.path(tempdir(),R2HTML)) target - HTMLInitFile(file.path(tempdir(),R2HTML),filename=sample, BackGroundColor=#EE) HTML(brDon't forget to use the CSS file in order to benefit from fixed-width font,file=target) tmp -

Re: [R] random sampling with some limitive conditions?

2007-07-09 Thread Gavin Simpson
Dear Jian, This came up on R-help recently; I haven't got time to find the thread for you, but it shouldn't take too much hunting out. I suggested the following approach, based on the swap method of Roberts and Stone (1990) Island-sharing by archipelago species. Oecologia 85: 560-567. The code

Re: [R] EM algorithm for Missing Data.

2007-07-09 Thread Ted Harding
On 09-Jul-07 02:20:47, Marcus Vinicius wrote: Dear all, I need to use the EM algorithm where data are missing. Example: x- c(60.87, NA, 61.53, 72.20, 68.96, NA, 68.35, 68.11, NA, 71.38) May anyone help me? Thanks. Marcus Vinicius The Dempster, Laird Rubin reference given by Simon

Re: [R] adding latex, html docs. to new packag

2007-07-09 Thread Uwe Ligges
Edna Bell wrote: Hi again! How do I create the Latex and HTML files for documentation for a new package, please? Is there something in the R CMD stuff that would do it, or do I need to produce by hand, pleaes? As the manual Writing R Extensions suggests, please write your

[R] [R-pkgs] ggplot 0.5.4

2007-07-09 Thread hadley wickham
ggplot2 === ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle (like drawing legends) as

[R] a little problem on selecting a subset from dataset A according to dataset B?

2007-07-09 Thread zhijie zhang
Dear Friends, I want to extract the records from A according to B, but the results are not correct because R says : The length of long object is not integer times on the length of short object. Anybody have met the same problem? How to do it correctly? length(A)=47 length(B)=6

[R] Message Acknowledgement

2007-07-09 Thread OrderInfo
This is just a quick confirmation to let you know that we received your message below at [EMAIL PROTECTED] Your input is important to us and we will get back to you as soon as we can. If you have any other questions please feel free to send us email or call our customer service department

Re: [R] a little problem on selecting a subset from dataset A according to dataset B?

2007-07-09 Thread Chuck Cleland
zhijie zhang wrote: Dear Friends, I want to extract the records from A according to B, but the results are not correct because R says : The length of long object is not integer times on the length of short object. Anybody have met the same problem? How to do it correctly?

Re: [R] rpart weight prior

2007-07-09 Thread Prof Brian Ripley
On Sun, 8 Jul 2007, Aurélie Davranche wrote: Hi! Could you please explain the difference between prior and weight in rpart? It seems to be the same. But in this case why including a weight option in the latest versions? For an unbalanced sampling what is the best to use : weight, prior or

Re: [R] a little problem on selecting a subset from dataset A accordingto dataset B?

2007-07-09 Thread Bill.Venables
AB - with(B, subset(A, coords.x1 %in% X1)) AB coords.x1 coords.x2 0 542250.9 3392404 7 541512.5 3394722 8 541479.3 3394878 9 538903.4 3395943 18 543274.0 3389919 19 543840.8 3392012 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

[R] Problem with Sweave and pdf version 1.4

2007-07-09 Thread ONKELINX, Thierry
Dear useRs, I'm trying to use ggplot2 in Sweave (R 2.5.1). The plots use the alpha channel, so I need to use pdf version 1.4. Search the mailinglist archive I found two solutions: \SweaveOpts{echo = FALSE, pdf.version=1.4} and explicit writing to a pdf 1.4 file. The latter works but the first

[R] character string to name

2007-07-09 Thread Jim Lemon
Hi folks, I thought I recalled a request for turning a character string into an object name as in: x$as.name(y)-1:4 OR x-data.frame(as.name(y)=1:4) However, as.name and a few other uninformed attempts didn't even come close. A search of character to name produced no helpful functions. This

[R] why function 'sum' within 'aggregate' need an 'index'?

2007-07-09 Thread jingjiang yan
Hi, people. I am using R-2.5.0 now, when tried the function aggregate with sum, it showed an error as following: a - gl(3,10) b - rnorm(30) aggregate(b,list(a),sum) # here is the error message, it complained that an error in FUN(X[[1L]], missing INDEX, and no defaults value. but the tapply

Re: [R] why function 'sum' within 'aggregate' need an 'index'?

2007-07-09 Thread Gavin Simpson
On Mon, 2007-07-09 at 20:14 +0800, jingjiang yan wrote: Hi, people. I am using R-2.5.0 now, when tried the function aggregate with sum, it showed an error as following: a - gl(3,10) b - rnorm(30) aggregate(b,list(a),sum) # here is the error message, it complained that an error in

Re: [R] character string to name

2007-07-09 Thread Gabor Grothendieck
Is one of these alternatives what you want? # 1 x - list() x[[y]] - 1:4 x - as.data.frame(x) x # 2 x - data.frame(1:4) names(x) - y x # 3 x - as.data.frame(sapply(y, function(x, y) y, 1:4, simplify = FALSE)) x On 7/9/07, Jim Lemon [EMAIL PROTECTED] wrote: Hi folks, I thought I recalled a

Re: [R] transform excel data into graph

2007-07-09 Thread John Kane
I am not sure exactly what you want but see if this will work. It will give you a dotchart. Assume your data.frame is dat First give the lessons column a name. See ?names convert numbers in data.frame to a matrix for dotchart dmat - as.matrix(dat[,2:4]) Draw dotchart using dat$lessons as a

[R] Speeding up

2007-07-09 Thread Van Campenhout Bjorn
Hi R-helpers, I am new in programming and R, so this may be basic. I need to speed up a procedure where I minimize some function on different partitions of the data. I can do this with a loop, as for instance in: i-1 meanmin-Inf while (ilength(x)) { ind-xxord[i] if (some

[R] using the function unique(), but asking it to ignore a column of a data.frame

2007-07-09 Thread Andrew Yee
Take for example the following data.frame: a-c(1,1,5) b-c(3,2,3) c-c(5,1,5) sample.data.frame-data.frame(a=a,b=b,c=c) I'd like to be able to use unique(sample.data.frame), but have unique() ignore column a when determining the unique elements. However, I figured that this would be setting for

Re: [R] using the function unique(), but asking it to ignore a column of a data.frame

2007-07-09 Thread hadley wickham
On 7/9/07, Andrew Yee [EMAIL PROTECTED] wrote: Take for example the following data.frame: a-c(1,1,5) b-c(3,2,3) c-c(5,1,5) sample.data.frame-data.frame(a=a,b=b,c=c) I'd like to be able to use unique(sample.data.frame), but have unique() ignore column a when determining the unique

Re: [R] using the function unique(), but asking it to ignore a column of a data.frame

2007-07-09 Thread Andrew Yee
Thanks. But in this specific case, I would like the output to include all three columns, including the ignored column (in this case, I'd like it to ignore column a). Thanks, Andrew On 7/9/07, hadley wickham [EMAIL PROTECTED] wrote: On 7/9/07, Andrew Yee [EMAIL PROTECTED] wrote: Take for

Re: [R] Writing Excel (.xls) files on non-Windows OSs using Perl

2007-07-09 Thread Hans-Peter
Hi, 2007/7/8, Marc Schwartz [EMAIL PROTECTED]: [snip] There exists the xlsReadWrite package on CRAN by Hans-Peter Suter, which is restricted to Windows, since it utilizes the non-FOSS MS Office API to write the Excel formats. The non-FOSS API is not the problem(#) but its implementation is:

[R] HTML.data.frame

2007-07-09 Thread elyakhlifi mustapha
I can't use the HTML.data.frame function maybe because the good package should however be charged I charged R2HTML and HTMLapplets could you indicate to me in which package this function is? _

Re: [R] Several quick questions

2007-07-09 Thread Sébastien
Thanks all of you guys for your help. It will most helpful. [EMAIL PROTECTED] a écrit : On 7/7/07, Sébastien [EMAIL PROTECTED] wrote: Dear R users, Here is a couple a quick questions, for which I was unable to not find any answer in the list archives and in the help: [...] 2- When a log

Re: [R] Speeding up

2007-07-09 Thread ONKELINX, Thierry
Dear Bjorn, Do you know that mean(xy*ind)+mean(xy*!ind) yields the same value for all i? Maybe you meant mean(xy[ind]) + mean(xy[!ind]) sapply(xord, function(xordi, xy = x){ ind - xy xordi mean(xy*ind)+mean(xy*!ind) }) Cheers, Thierry

Re: [R] using the function unique(), but asking it to ignore a column of a data.frame

2007-07-09 Thread Peter Dalgaard
Andrew Yee wrote: Thanks. But in this specific case, I would like the output to include all three columns, including the ignored column (in this case, I'd like it to ignore column a). df[!duplicated(df[,c(a,c)]),] or perhaps df[!duplicated(df[-2]),] Thanks, Andrew On 7/9/07, hadley

[R] [R-pkgs] New package proxy for distances and similiarities

2007-07-09 Thread David Meyer
Dear useRs, a new package for computing distance and similarity matrices made it to CRAN, and will propagate to the mirrors soon. It includes an enhanced version of dist() with support for more than 40 popular similarity and distance measures, both for auto- and cross-distances. Some

Re: [R] character string to name

2007-07-09 Thread Thomas Lumley
On Mon, 9 Jul 2007, Jim Lemon wrote: Hi folks, I thought I recalled a request for turning a character string into an object name as in: Yes. It's a FAQ. -thomas x$as.name(y)-1:4 OR x-data.frame(as.name(y)=1:4) However, as.name and a few other uninformed attempts didn't even

Re: [R] about scagnostics

2007-07-09 Thread hadley wickham
Hi Olivier, You can call scagnostics either with two vectors, or a data.frame (in which case it computes all pairwise scagnostics). I just double checked to make sure I didn't accidentally misname the vector of scagnostics in R, and it doesn't look like I did, so could you please send me a

Re: [R] using the function unique(), but asking it to ignore a column of a data.frame

2007-07-09 Thread hadley wickham
On 7/9/07, Peter Dalgaard [EMAIL PROTECTED] wrote: Andrew Yee wrote: Thanks. But in this specific case, I would like the output to include all three columns, including the ignored column (in this case, I'd like it to ignore column a). df[!duplicated(df[,c(a,c)]),] or perhaps

Re: [R] using the function unique(), but asking it to ignore a column of a data.frame

2007-07-09 Thread Prof Brian Ripley
On Mon, 9 Jul 2007, Andrew Yee wrote: Thanks. But in this specific case, I would like the output to include all three columns, including the ignored column (in this case, I'd like it to ignore column a). sample.data.frame[!duplicated(sample.data.frame[-1]), ] (index to exclude columns as

Re: [R] possible bug in ggplot2 v0.5.2???

2007-07-09 Thread hadley wickham
On 7/6/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 4 Jul 2007, hadley wickham wrote: On 7/4/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Tue, 3 Jul 2007, hadley wickham wrote: Hi Stephane, The problem is that the windows graphics device doesn't support

Re: [R] Writing Excel (.xls) files on non-Windows OSs using Perl

2007-07-09 Thread Marc Schwartz
On Mon, 2007-07-09 at 16:42 +0300, Hans-Peter wrote: Hi, 2007/7/8, Marc Schwartz [EMAIL PROTECTED]: [snip] There exists the xlsReadWrite package on CRAN by Hans-Peter Suter, which is restricted to Windows, since it utilizes the non-FOSS MS Office API to write the Excel formats. The

[R] Planet R - a weblog aggregator for statistical computing

2007-07-09 Thread elw
Announcing... Planet R - a weblog aggregator for statistical computing Q: What is it? A: An aggregator for weblog posts about statistical computing topics, focused primarily around the R community. Q2: Where is it? A2: For now, at http://planetr.stderr.org Q3: What's it good for? A3:

Re: [R] Writing Excel (.xls) files on non-Windows OSs using Perl

2007-07-09 Thread Gabor Grothendieck
Note that there already is a function, read.xls, in gdata that uses Perl. On 7/9/07, Marc Schwartz [EMAIL PROTECTED] wrote: On Mon, 2007-07-09 at 16:42 +0300, Hans-Peter wrote: Hi, 2007/7/8, Marc Schwartz [EMAIL PROTECTED]: [snip] There exists the xlsReadWrite package on CRAN by

Re: [R] using the function unique(), but asking it to ignore a column of a data.frame

2007-07-09 Thread Andrew Yee
Thanks, this works perfectly. On 7/9/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Mon, 9 Jul 2007, Andrew Yee wrote: Thanks. But in this specific case, I would like the output to include all three columns, including the ignored column (in this case, I'd like it to ignore column a).

[R] similar limma's contrasts.fit() for lme (mixed effect model) object

2007-07-09 Thread shirley zhang
Dear R help, In limma package, contrasts.fit() function is very useful. I am wondering whether there is a similar function for lme object, which means given a mixed linear model fit, compute estimated coefficients and standard errors for a given set of contrasts. Thanks, Shirley

[R] about scagnostics

2007-07-09 Thread Olivier ETERRADOSSI
Hi Hadley, thank you for providing this scagnostics primer I was trying to do some basic testing, and I see that I probably missed some points : first it's not clear for me if the argument of scagnostics should be raw data or processed data (results of calling splom or whatever...). If the

Re: [R] No convergence using ADAPT

2007-07-09 Thread Ravi Varadhan
Since the covariance is zero (i.e. you have independent normals), you can simplify your problem so that you just need to perform one-dimensional integration. Here is how you can do it: trial2 - function(input) { #pmvnorm(lower = c(0,0), upper = c(10, 10), mean = input, sigma = matrix(c(.01, 0,

Re: [R] similar limma's contrasts.fit() for lme (mixed effect model)object

2007-07-09 Thread Kuhn, Max
Shirley, The contrast package can do this. The method of specifying the contrast conditions/coefficients is different (and I think easier). Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of shirley zhang Sent: Monday, July 09, 2007 11:16 AM To:

Re: [R] similar limma's contrasts.fit() for lme (mixed effect model)object

2007-07-09 Thread shirley zhang
Hi Max, Thanks for your prompt reply. Actually I have already checked contrast package, but I still could not figure out how to set the contrast matrix for a 2x2 factorial design. I would like to set a contrast exactly similar to the limma's user guide, 8.7 Factorial Designs (page 45). For

Re: [R] Writing Excel (.xls) files on non-Windows OSs using Perl

2007-07-09 Thread Uwe Ligges
Gabor Grothendieck wrote: Note that there already is a function, read.xls, in gdata that uses Perl. Note that Marc talked about *writing* in his original message. Uwe Ligges On 7/9/07, Marc Schwartz [EMAIL PROTECTED] wrote: On Mon, 2007-07-09 at 16:42 +0300, Hans-Peter wrote: Hi,

Re: [R] calculating p-values of columns in a dataframe

2007-07-09 Thread Thomas Pujol
Uwe- thanks. After a little trial and error, I created these two very simple custom functions that calculate the t.stat and p.value of columns in a dataframe. I think they work correctly and as intended. I welcome comments critiques. myfn.t.stat - function(df) { apply(df,2,function(x)

[R] [R-pkgs] CRANberries -- An RSS feed about New and Updated CRAN packages

2007-07-09 Thread Dirk Eddelbuettel
Announcing CRANberries -- An RSS feed about New and Updated CRAN packages A new RSS feed [1] is now available that summarizes uploads to CRAN. This makes it possibly to quickly obtain concise information about which (of the now over one thousand !!) packages were added or updated at CRAN and

Re: [R] [R-pkgs] CRANberries -- An RSS feed about New and Updated CRAN packages

2007-07-09 Thread Barry Rowlingson
Dirk Eddelbuettel wrote: but the easiest way may just be to subscribe to Elijah's wonderful 'Planet R' feed aggregator My favourite RSS reader at the moment is the RSS cat caption generator: http://lol.ianloic.com/feed/dirk.eddelbuettel.com/cranberries/index.rss Barry

[R] [R-pkgs] Reshape version 0.8

2007-07-09 Thread hadley wickham
Reshape version 0.8 http://had.co.nz/reshape Reshape is an R package for flexibly restructuring and aggregating data. It's inspired by Excel's pivot tables, and it (hopefully) makes it very easy to get your data into the shape that you want. You can find out more at http://had.co.nz/reshape

Re: [R] similar limma's contrasts.fit() for lme (mixed effect model)object

2007-07-09 Thread Kuhn, Max
Shirley, Well, you picked the type of contrast that proves my statement wrong. The interface in the contrast package (and the Design package) may not be well suited for the type that you are interested in (or other types, such as SAS's lsmeans type contrasts). The good news is that the function

[R] When is the periodogram is consistent with white noise?

2007-07-09 Thread Andre Bastos
Hello everyone, This is my first time posting to the list, thanks in advance. I am calculating the smoothed periodogram for the residuals of an AR model that I fit to EEG data. The autocorrelation plot of the residuals shows the series is now approximately white (i.e. ACF = 1 at lag 0, and

[R] Clustering nested data

2007-07-09 Thread Scott Bearer
My apologies for cross-postings Hi all, I am interested in performing a cluster analysis on ecological data from forests in Pennsylvania. I would like to develop definitions for forest types (red maple forests, upland oak forests, etc.(AH AR in attached table)) based on measured attributes in

Re: [R] character string to name

2007-07-09 Thread Jim Lemon
Jim Lemon wrote: Hi folks, I thought I recalled a request for turning a character string into an object name as in: x$as.name(y)-1:4 ... Thanks to those who replied to this eminently dumb question. OT: I put this down to the Euthermic Model of Cognitive Efficiency. This model,

[R] Clustering nested data

2007-07-09 Thread Scott Bearer
Hi all, I am interested in performing a cluster analysis on ecological data from forests in Pennsylvania. I would like to develop definitions for forest types (red maple forests, upland oak forests, etc.(AH AR in attached table)) based on measured attributes in each forest type. To do this, I

[R] factanal frustration!

2007-07-09 Thread Talbot Katz
Hi. It seems that nearly every time I try to use factanal I get the following response: faa2db1-factanal(mretdb1,factors=2,method=mle,control=list(nstart=25)) Error in factanal(mretdb1, factors = 2, method = mle, control = list(nstart = 25)) : unable to optimize from these starting

[R] ANOVA: Does a Between-Subjects Factor belong in the Error Term?

2007-07-09 Thread Alex Baugh
I am executing a Repeated Measures Analysis of Variance with 1 DV (LOCOMOTOR RESPONSE), 2 Within-Subjects Factors (AGE, ACOUSTIC CONDITION), and 1 Between-Subjects Factor (SEX). Does anyone know whether the between-subjects factor (SEX) belongs in the Error Term of the aov or not? And if it does

Re: [R] Loading problem with XML_1.9

2007-07-09 Thread Duncan Temple Lang
Weijun and I corresponded off-list so that I could get a copy of the data. On a relatively modest machine with 2G of RAM, 10G swap, dual core 1Ghz 64bit AMDs, the code below takes approximately 100 seconds. It is not optimized in any particular way, so there is room for improvement. doc -

Re: [R] Antwort: Re: pgup/pgdown in R Graphics Window under Linux ['Watchdog': checked]

2007-07-09 Thread Deepayan Sarkar
On 7/8/07, Paul Matthias Diderichsen [EMAIL PROTECTED] wrote: Hi Deepayan, Deepayan Sarkar [EMAIL PROTECTED] schrieb am 06.07.2007 02:05:02: On 7/5/07, Paul Matthias Diderichsen [EMAIL PROTECTED] wrote: library(lattice) xyplot(speed~dist|speed, data=cars, layout=c(3,3)) If this is

Re: [R] ANOVA: Does a Between-Subjects Factor belong in the Error Term?

2007-07-09 Thread Peter Dalgaard
Alex Baugh wrote: I am executing a Repeated Measures Analysis of Variance with 1 DV (LOCOMOTOR RESPONSE), 2 Within-Subjects Factors (AGE, ACOUSTIC CONDITION), and 1 Between-Subjects Factor (SEX). Does anyone know whether the between-subjects factor (SEX) belongs in the Error Term of the aov

Re: [R] factanal frustration!

2007-07-09 Thread Prof Brian Ripley
factanal() does not have an argument method=mle. Trying to do factor analysis on 1000 columns is quite unrealistic, but you may find rescaling the matrix helps. On Mon, 9 Jul 2007, Talbot Katz wrote: Hi. It seems that nearly every time I try to use factanal I get the following response:

Re: [R] histogram with absolute figures

2007-07-09 Thread Mag. Ferri Leberl
Meanwhile I have recognized, that the breaks-option enforces density as the default. But if I try to force frequencies (freq=TRUE) I get the following feedback: Warning message: the AREAS in the plot are wrong -- rather use freq=FALSE in: plot.histogram(r, freq = freq, col = col, border = border,

[R] Problems with e1071 and SparseM

2007-07-09 Thread David Meyer
Chris: yes, this is indeed a bug (in predict.svm) - will be fixed in the next release of e1071. Thanks for pointing this out, David -- Hello all, I am trying to use the svm method provided by e1071 (Version: 1.5-16) together with a matrix provided by the SparseM

Re: [R] Writing Excel (.xls) files on non-Windows OSs using Perl

2007-07-09 Thread Gregory Warnes
Since I wrote the xls2csv.pl and read.xls() code for gdata, a perl module for writing MS-Excel files has come on the scene. I don't have the time at the moment to create an csv2xls.pl file, but it should be straightforward, and I would gladly add it to the gdata package. -G On Jul 9,

[R] Subject: transform excel data into graph

2007-07-09 Thread Nguyen Dinh Nguyen
Is this you want? library(gplots) n -(0.465,0.422,0.45,0.59,0.543,0.498,0.44,0.35,0.64,0.5,0.473,0.134,0.543,0. 11,0.32) graph - matrix(n, nrow=5, ncol=3) colnames(graph) - c(Nick, John, Peter) rownames(graph) - c(Lesson1,Lesson2,Lesson3, Lesson4,Lesson5) g - barplot2(graph, beside = TRUE,

[R] making groups

2007-07-09 Thread Mag. Ferri Leberl
Dear everybody! If I have an array of numbers e.g. the points my students got at an examination, and a key to group the numbers, e.g. the key which interval corresponds with which mark (two arrays of the same length or one 2x(number of marks)), how can I get the array of absolute frequencies of

[R] Split graphs

2007-07-09 Thread tian shen
Hello All, I have a question, which somehow I think it is easy, however, I just couldn't get it. I want to histogram each row of a 1000*2 matrix( means it has 1000 rows), and I want to see those 1000 pictures together. How can I do this? Am I able to split a graph into 1000 parts and in

[R] parsing strings

2007-07-09 Thread Drescher, Michael (MNR)
Hi All, I have strings made up of an unknown number of letters, digits, and spaces. Strings always start with one or two letters, and always end with one or two digits. A set of letters (one or two letters) is always followed by a set of digits (one or two digits), possibly with one or more

Re: [R] Split graphs

2007-07-09 Thread Charles Annis, P.E.
Jessie: How many pixels would you need to allocate for each of these 1000 parts? Is that feasible? Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: [R] how to use mle with a defined function

2007-07-09 Thread Lin Pan
Hi all, sorry for the misleading in the previous email. here is my function to calculate the maximum likelihood function for a multinormial distribution: mymle - function (sigmaX, sigmaY, constraints, env){ # build omega omegaX = abs(sigmaX) * kin + abs(env) * diag(1.0, n, n)

Re: [R] histogram with absolute figures

2007-07-09 Thread Sarah Goslee
Well, how about an example of what you are doing, and a description of what the results you get and the results you want are? When I do a histogram, I get frequencies. Sarah On 7/9/07, Mag. Ferri Leberl [EMAIL PROTECTED] wrote: Meanwhile I have recognized, that the breaks-option enforces

Re: [R] Split graphs

2007-07-09 Thread jim holtman
How many columns do you have? Is it 2 or 1000; can not tell from your email. A histogram of 2 values does not seem meaningful. Do you want 1000 separate histograms, one per page, or multiple per page? Yes you can do it, the question is what/how do you want to do it. On 7/9/07, tian shen

Re: [R] parsing strings

2007-07-09 Thread Gabor Grothendieck
strapply in package gsubfn can do that. The following matches the indicated regular expression against x and applies the function given in formula notation (which removes spaces) to each match, outputting the result as a list: library(gsubfn) x - c(AB10B10, A10 B5, AB 10 CD 12, A10CD2EF3)

Re: [R] parsing strings

2007-07-09 Thread jim holtman
Is this what you want: x - A10B10A10 B5AB 10 CD 12A10CD2EF3 x - gsub( , , x) # remove blanks y - gregexpr([A-Z]+\\s*[0-9]+, x )[[1]] substring(x, y, y + attr(y, 'match.length') - 1) [1] A10 B10 A10 B5 AB10 CD12 A10 CD2 EF3 On 7/9/07, Drescher, Michael (MNR) [EMAIL PROTECTED]

[R] Within matrix

2007-07-09 Thread cgenolin
Hi all, I am working on cluster, I am trying to evaluate a within and between matrix. Is there any facility for that ? I did my own function, but I am not a programmer, so I am affraid I am not really able to programme efficiant and fast function... Thanks Christophe

Re: [R] making groups

2007-07-09 Thread jim holtman
It would be nice if you could supply an example of what your input looks like and then what you would like your output to look like. You would probably use 'tapply', but I would have to see what you data looks like. On 7/9/07, Mag. Ferri Leberl [EMAIL PROTECTED] wrote: Dear everybody! If I

Re: [R] Question for svm function in e1071

2007-07-09 Thread adschai
thank you. This is definitely doable. - adschai- Original Message -From: David Meyer Date: Friday, July 6, 2007 6:34 amSubject: Re: [R] Question for svm function in e1071To: [EMAIL PROTECTED]: r-help@stat.math.ethz.ch Adschai: The function is written in C++, so debugging the source

[R] Extracting sums for individual factors in data frames

2007-07-09 Thread Norm.Good
Try this I used today aggregate(data, by=list(factor.name=data$FACTOR.NAME), sum) Norm Good CMIS/e-Health Research Centre A joint venture between CSIRO and the Queensland Government Lvl 20, 300 Adelaide Street BRISBANE QLD 4000 PO Box 10842 Adelaide Street BRISBANE QLD 4000 Ph: 07 3024

Re: [R] Within matrix

2007-07-09 Thread Bill.Venables
Unless you want to do this millions of times, efficiecy is probably not a big issue here, but simplicity always pays off. I'm presuming you are dealing with a single classification setup. Let f (n x 1) be a *factor* defining the classes Let X (n x p) be the data matrix. Then the steps I would

Re: [R] [R-pkgs] CRANberries -- An RSS feed about New and Updated CRAN packages

2007-07-09 Thread Roger Peng
LOL! -roger On 7/9/07, Barry Rowlingson [EMAIL PROTECTED] wrote: Dirk Eddelbuettel wrote: but the easiest way may just be to subscribe to Elijah's wonderful 'Planet R' feed aggregator My favourite RSS reader at the moment is the RSS cat caption generator:

Re: [R] Help in installing rggobi in ubuntu linux

2007-07-09 Thread Michael Lawrence
Looks like rggobi can't find GGobi. Make sure that PKG_CONFIG_PATH contains the path to your ggobi.pc file. For example: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig I would have assumed, however, that the ggobi package would have installed to the /usr prefix, in which case pkg-config should

Re: [R] Help in installing rggobi in ubuntu linux

2007-07-09 Thread Dirk Eddelbuettel
On 9 July 2007 at 22:38, Michael Lawrence wrote: | Looks like rggobi can't find GGobi. Make sure that PKG_CONFIG_PATH contains | the path to your ggobi.pc file. For example: | | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig | | I would have assumed, however, that the ggobi package would have