[R] The old question: R vs MATLAB vs Mathematica vs ...

2006-10-16 Thread Ali -
Hi, This question seems to be old, however I am asking it from a different point of view. R introduces itself as a 'statistical' language and environment. There are many discussions about comparing R to MATLAB or mathematica (or other similar software). It seems to me that these other

[R] call c function in R

2006-10-16 Thread lan gao
Hi, I need to call a c funtion in R.I created the Dll in Visual C++. And In R , I used the dyn(path) no erro. Then when I call .c (function m=name , parameter) it always says the c entry point product not in load table I really need your help. Many thanks Gao

Re: [R] Mute script

2006-10-16 Thread Prof Brian Ripley
How are you running this 'script'? If you use source(), you do need to explicitly print or use the 'print.eval' argument. If you use R CMD BATCH or similar (which is what most people mean by running a script), you do get autoprinting. On Sun, 15 Oct 2006, Alexandre Aguiar wrote: Hi, I

Re: [R] Execution halting of lmer on UNIX when no problem on windows

2006-10-16 Thread Prof Brian Ripley
See ?try ?tryCatch FAQ 7.32 This is not a Windows/UNIX difference as you suppose, but an interactive/batch difference. You could also look into using options(error=). On Sun, 15 Oct 2006, Toby Gardner wrote: Dear R-users, I have a frustrating problem that I am hoping has a simple fix.

[R] Generate a random bistochastic matrix

2006-10-16 Thread Florent Bresson
Please, I would like to generate a random bistochastic matrix, that is a squared matrix of non-negative numbers with each row and each column sum to 1, for example : .2.3.5 .6.3.1 .2 .4 .4 I don't know of to code this. Do you have any idea ? Thanks Florent Bresson

[R] Fill a matrix with vectors of different lengths

2006-10-16 Thread Serguei Kaniovski
Hello, how can I best fill a (fixed) matrix with vectors of varying lengths by column, setting the superfluous elements to zero? Here is my code: v-(1,1,2,3,4,6) binc-function(x){ l-sum(x)+1 y-c(1,rep(0,l-1)) for (i in x) y-y+c(rep(0,i),y)[1:l] } mat-matrix(0,

Re: [R] Fill a matrix with vectors of different lengths

2006-10-16 Thread Dimitris Rizopoulos
you can try something like the following: out - lapply(1:length(v), function(i) binc(v[1:i])) nout - max(sapply(out, length)) sapply(out, function(x) c(x, rep(0, nout - length(x I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public

Re: [R] Fill a matrix with vectors of different lengths

2006-10-16 Thread David Barron
for (i in 1:length(v)) { bi - binc(v[1:i]) mat[1:length(bi),i]=mat[1:length(bi),i]+bi } On 16/10/06, Serguei Kaniovski [EMAIL PROTECTED] wrote: Hello, how can I best fill a (fixed) matrix with vectors of varying lengths by column, setting the superfluous elements to zero? Here is

Re: [R] Sweave, R and complex latex projects

2006-10-16 Thread Friedrich Leisch
On Sat, 14 Oct 2006 23:00:27 +0100, Mark Wardle (MW) wrote: Hello all, I've been able to use R very successfully to run simple statistics and generate the plots I require. I've been evaluating Sweave, and have hit upon a small problem that I don't seem to be able to workaround.

Re: [R] Sweave, R and complex latex projects

2006-10-16 Thread Friedrich Leisch
On Sat, 14 Oct 2006 16:04:50 -0700, Deepayan Sarkar (DS) wrote: %.tex: %.Rnw echo library(tools); Sweave('$') | ${R_PROG} --vanilla --silent Note that we now have R CMD Sweave (new in R 2.4.0) for this purpose. Best, Fritz __

Re: [R] set linetype with plotCI

2006-10-16 Thread JeeBee
Sorry, the plot_linetypes[1] is a debugging leftover. It's plot_linetypes[graph_idx] in my actual code ... And plot_linetypes is just the sequence 1,2,3,4... etc plotCI( x = xvals.f[sorted], y = yvals.f[sorted], xlim = c(xmin, xmax), ylim = c(ymin, ymax), pch =

Re: [R] set linetype with plotCI

2006-10-16 Thread David Barron
You could look at the plotCI function in the plotrix package, which has a separate parameter for setting the linetype of the error bars. (An additional benefit is that it works with R 2.4.0 -- gplots seems not to have been updated, or at least the windows binary hasn't, and still includes a now

Re: [R] call c function in R

2006-10-16 Thread Duncan Murdoch
On 10/15/2006 11:24 PM, lan gao wrote: Hi, I need to call a c funtion in R.I created the Dll in Visual C++. And In R , I used the dyn(path) no erro. Then when I call .c (function m=name , parameter) it always says the c entry point product not in load table Check that

Re: [R] set linetype with plotCI

2006-10-16 Thread JeeBee
Thanks, I tried using plotCI in the plotrix library. This, however, gives me the below error. CODE:: cat(x = ); print(xvals.f[sorted]) cat(y = ); print(yvals.f[sorted]) cat(pch = ); print(plot_symbols[graph_idx]) cat(lty = ); print(plot_linetypes[graph_idx]) cat(col

Re: [R] set linetype with plotCI

2006-10-16 Thread David Barron
Looking at the source code for plotCI, I see that it calls plot with type specified as n when the error bars are not being added to an existing plot, so you cannot use the type argument in a call to plotCI. If you want to add lines as well as points, I think you will have to use

Re: [R] set linetype with plotCI

2006-10-16 Thread JeeBee
Great, why didn't I think of that. Thanks :) If you want to add lines as well as points, I think you will have to use lines(x,y,type=b,lty = plot_linetypes[graph_idx]) in addition to plotCI, __ R-help@stat.math.ethz.ch mailing list

[R] linear mixed effects models with breakpoints

2006-10-16 Thread Ewan Wakefield
Hi folks I have some data to which I've been fitting linear mixed effects models. I am currently using a lme model in the nlme package, with terms for random effects due to repeated measures on individuals and the corCAR1 serial correlation structure. However, there is some suggestion in the data

[R] NULL or NA for missing function arguments?

2006-10-16 Thread Hans-Peter
Hi, I am troubled by the use of NULL or NA to indicate missing/non-specified function arguments. In the R code that I have looked at, it seems that both forms are used (NULL seems to be used more often though). Sometimes both variants are in the same declaration, e.g. format.default -

Re: [R] Generate a random bistochastic matrix

2006-10-16 Thread Richard M. Heiberger
bistochastic.3x3 - function() { B - matrix(0, 3, 3) ## 2 df tmp.1 - runif(3) B[1,] - tmp.1/sum(tmp.1) ## 1 df tmp.2 - runif(2) B[2:3, 1] - (1-B[1,1]) * tmp.2/sum(tmp.2) ## 1 df B[2, 2] - runif(1, max=min(1-B[1,2], 1-B[2,1])) ## Fill in the rest B[2,3] - 1-sum(B[2,

Re: [R] NULL or NA for missing function arguments?

2006-10-16 Thread Gabor Grothendieck
There is also a third way, namely use the missing function in the code: f - function(x) if (missing(x)) print(missing) else print(x) f() On 10/16/06, Hans-Peter [EMAIL PROTECTED] wrote: Hi, I am troubled by the use of NULL or NA to indicate missing/non-specified function arguments. In the

[R] grep function with patterns list...

2006-10-16 Thread Stéphane CRUVEILLER
Dear R-users, is there a way to pass a list of patterns to the grep function? I vaguely remember something with %in% operator... Thanks, Stéphane. -- La science a certes quelques magnifiques réussites à son actif mais à tout prendre, je préfère de loin être heureux plutôt qu'avoir raison.

Re: [R] grep function with patterns list...

2006-10-16 Thread Gabor Grothendieck
Try this: grep(b|c|d, letters, value = TRUE) [1] b c d On 10/16/06, Stéphane CRUVEILLER [EMAIL PROTECTED] wrote: Dear R-users, is there a way to pass a list of patterns to the grep function? I vaguely remember something with %in% operator... Thanks, Stéphane. -- La science a

Re: [R] NULL or NA for missing function arguments?

2006-10-16 Thread Duncan Murdoch
On 10/16/2006 8:47 AM, Hans-Peter wrote: Hi, I am troubled by the use of NULL or NA to indicate missing/non-specified function arguments. In the R code that I have looked at, it seems that both forms are used (NULL seems to be used more often though). Sometimes both variants are in the

Re: [R] grep function with patterns list...

2006-10-16 Thread Stéphane CRUVEILLER
Thx for the hint, but what would I have used if b,c and d were values of a dataframe for instance? Stéphane. Gabor Grothendieck a écrit : Try this: grep(b|c|d, letters, value = TRUE) [1] b c d On 10/16/06, Stéphane CRUVEILLER [EMAIL PROTECTED] wrote: Dear R-users, is there a way to pass

[R] help with plot()

2006-10-16 Thread tom soyer
Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d - read.table(c:/test/sp.txt,header=0) spval - d[,2] plot(spval,type=l) Warning messages: 1: graphical parameter type is obsolete in: plot.window(xlim, ylim, log, asp, ...) 2:

Re: [R] Sweave, R and complex latex projects

2006-10-16 Thread Dirk Eddelbuettel
On 16 October 2006 at 11:28, Friedrich Leisch wrote: | On Sat, 14 Oct 2006 16:04:50 -0700, | Deepayan Sarkar (DS) wrote: | | | |%.tex: %.Rnw |echo library(tools); Sweave('$') | ${R_PROG} --vanilla --silent | | Note that we now have R CMD Sweave (new in R 2.4.0) for this

Re: [R] grep function with patterns list...

2006-10-16 Thread Stéphane CRUVEILLER
Ooops sorry for html tags... Just forgot to edit the message before sending it... So back to my question: Thx for the hint, but what would I have used if b,c and d were values of a dataframe for instance? X is for instance a dataframe: X Mypatterns 1 pattern1 2 pattern2 3 pattern3 Y

Re: [R] grep function with patterns list...

2006-10-16 Thread Gabor Grothendieck
DF - data.frame(pat = letters[1:3]) grep(paste(DF$pat, collapse = |), letters, value = TRUE) [1] a b c On 10/16/06, Stéphane CRUVEILLER [EMAIL PROTECTED] wrote: Ooops sorry for html tags... Just forgot to edit the message before sending it... So back to my question: Thx for the hint, but

[R] Re : Generate a random bistochastic matrix

2006-10-16 Thread Florent Bresson
Thanks, I tried someting like this, but computation takes times for large matrices btransf-function(y,X=length(y)^4){ N-length(y) bm-matrix(rep(1/N,N^2),N,N) for(j in 1:X){ coord-sample(1:N,4,replace=T)

Re: [R] help with plot()

2006-10-16 Thread David Barron
It's possible the problem is with your data; could you provide some sample data with which we can reproduce the error? On 16/10/06, tom soyer [EMAIL PROTECTED] wrote: Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d -

Re: [R] help with plot()

2006-10-16 Thread Duncan Murdoch
On 10/16/2006 9:44 AM, tom soyer wrote: Hi, I am new to R and I have been trying it out. I ran into a problem with the plot() function. Below is my code: d - read.table(c:/test/sp.txt,header=0) spval - d[,2] plot(spval,type=l) Warning messages: 1: graphical parameter type is obsolete

Re: [R] The old question: R vs MATLAB vs Mathematica vs ...

2006-10-16 Thread Ben Bolker
Ali - saveez at hotmail.com writes: R introduces itself as a 'statistical' language and environment. There are many discussions about comparing R to MATLAB or mathematica (or other similar software). It seems to me that these other software have a broader range of applications. For

Re: [R] Re : Generate a random bistochastic matrix

2006-10-16 Thread Richard M. Heiberger
I am sorry, I can't figure out what your function is doing. Why do you have N^4 in the argument? A matrix should have N rows and N columns, that is, it should have length N^2. The function returns a vector, not a matrix. There is no example of its use. I am guessing that your function

Re: [R] overlapping intervals

2006-10-16 Thread jim holtman
Here is a more general way that looks for the transitions: series1-cbind(Start=c(10,21,40,300),End=c(20,26,70,350)) series2-cbind(Start=c(25,60,210,500),End=c(40,100,400,1000)) x - rbind(series1, series2) # create +1 for start and -1 for end x.s - rbind(cbind(x[,1], 1), cbind(x[,2], -1))

Re: [R] The old question: R vs MATLAB vs...: image analysis

2006-10-16 Thread Oleg Sklyar
For image analysis and general image processing in R, please check EBImage from bioconductor (www.bioconductor.org). Best, Oleg Ben Bolker wrote: Ali - saveez at hotmail.com writes: R introduces itself as a 'statistical' language and environment. There are many discussions about comparing

[R] Lmer, heteroscedasticity and permutation

2006-10-16 Thread Alan Juilland
Hi everybody, I'm trying to analyse a set of data with a non-normal response, 2 fixed effects and 1 nested random effect with strong heteroscedasticity in the model. I planned to use the function lmer : lmer(resp~var1*var2 + (1|rand)) and then use permutations based on the t-statistic given

Re: [R] Generate a random bistochastic matrix

2006-10-16 Thread Dimitris Rizopoulos
you can try something like the following: B - 10 N - 5 mats - r2dtable(B, rep(1, N), rep(1, N)) out - matrix(0, N, N) for(i in 1:length(mats)) out - out + mats[[i]] out - out / B out colSums(out) rowSums(out) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student

Re: [R] Re : Generate a random bistochastic matrix

2006-10-16 Thread Martin Maechler
A simpler approach --- as in similar problems --- is to use an iterative solution which works quite fast for any 'n'. Interestingly, the number of necessary iterations seems to *decrease* for increasing 'n' : bistochMat - function(n, tol = 1e-7, maxit = 1000) { ## Purpose: Random

Re: [R] generate random numbers that sum up to 1

2006-10-16 Thread Grant Izmirlian
So, Alberto, you didn't see my post? If Y has d independent components that are gamma distributed with common rate and shapes A_1, A_2, ..., A_d, then X, given by the components of Y divided by their sum has distribution Dirichlet(A_1, A_2, ..., A_d). If you want Uniform on the d-simplex,

[R] Re : Re : Generate a random bistochastic matrix

2006-10-16 Thread Florent Bresson
Yes, you're right. In fact, it's just an adaptation of a matlab command and the author advises using N^4 replications that's why it's the default in the function. The bistochastic matrix is not my subject of interest, but I need it to perform some random tranformation of a vector of incomes.

[R] Re : Generate a random bistochastic matrix

2006-10-16 Thread Florent Bresson
Thanks, I think it's a shrewd solution, but the problem is that it cannot generate every N*N bistochastic matrix and every cell tends to 1/N as B tends to infinity Florent Bresson - Message d'origine De : Dimitris Rizopoulos [EMAIL PROTECTED] À : Florent Bresson [EMAIL PROTECTED] Cc :

[R] Re : Re : Generate a random bistochastic matrix

2006-10-16 Thread Florent Bresson
Thanks, it's perfect for my needs. - Message d'origine De : Martin Maechler [EMAIL PROTECTED] À : Florent Bresson [EMAIL PROTECTED] Cc : Richard M. Heiberger [EMAIL PROTECTED]; r-help@stat.math.ethz.ch Envoyé le : Lundi, 16 Octobre 2006, 16h29mn 47s Objet : Re: [R] Re : Generate a

Re: [R] generate random numbers that sum up to 1

2006-10-16 Thread Alberto Monteiro
Grant Izmirlian wrote: So, Alberto, you didn't see my post? I think I didn't - but you are demanding too much from my memory; I can hardly remember what I saw yesterday! If Y has d independent components that are gamma distributed with common rate and shapes A_1, A_2, ..., A_d, then X,

[R] Install RMySQL with R 2.4.0

2006-10-16 Thread Frank McCown
I just installed RMySQL 0.5-9 with R 2.4.0 on Windows XP and got the following error message when trying to run a script with RMySQL: Error in library(RMySQL) : 'RMySQL' is not a valid package -- installed 2.0.0? Any ideas? Thanks, Frank __

Re: [R] help with plot()

2006-10-16 Thread tom soyer
Hi David and Duncan, Thanks for the reply. I am using R-2.4.0 for windows. All I am trying to do is follow an online tutorial ( http://www.onlamp.com/pub/a/onlamp/2005/11/17/r_for_statistics.html) step by step. spval is just an array of numbers. I also tried using type=1 instead of l, but got

Re: [R] Re : Generate a random bistochastic matrix

2006-10-16 Thread Rolf Turner
I don't think this idea has been suggested yet: (1) Form all n! n x n permutation matrices, say M_1, ..., M_K, K = n!. (2) Generate K independent uniform variates x_1, ..., x_k. (3) Renormalize these to sum to 1, x - x/sum(x) (4)

Re: [R] Interval pls

2006-10-16 Thread Spencer Graves
RSiteSearch(interval pls) produced 7 hits for me just now. I didn't study all of them carefully, but I doubt if any one of them have exactly what you want. One could also search for pls with ordered factors, but I didn't try that. However, I doubt if it would be excessively

[R] Re : Re : Generate a random bistochastic matrix

2006-10-16 Thread Florent Bresson
Yes, I would like every generated matrix to be drawn from a uniform distribution. Martin Maechler's solution was interesting but when I compute the product of the obtained matrix with any N-vector Y, the resulting vector is most of the time quite close to a vector like mean(Y)*rep(1,N).

Re: [R] help with plot()

2006-10-16 Thread Marc Schwartz
Tom, If your text file, 'sp.txt' contains the headers used on that web page, then your read.table() function call is incorrect. Your call below presently has 'header = 0'. Use TRUE/FALSE for easier reading of code. The tutorial seems to be inconsistent with that. If your text file contains the

Re: [R] Re : Generate a random bistochastic matrix

2006-10-16 Thread Duncan Murdoch
On 10/16/2006 11:50 AM, Rolf Turner wrote: I don't think this idea has been suggested yet: (1) Form all n! n x n permutation matrices, say M_1, ..., M_K, K = n!. (2) Generate K independent uniform variates x_1, ..., x_k. (3) Renormalize these to sum to 1,

Re: [R] Sweave, R and complex latex projects

2006-10-16 Thread Mark Wardle
Friedrich Leisch wrote: On Sat, 14 Oct 2006 23:00:27 +0100, Mark Wardle (MW) wrote: Hello all, ... Yes, simply set prefix.string to a path, not only a filename. E.g., ... Many thanks for everyone's help on this (both on and off list). Working perfectly now! Now I just need help

[R] lda

2006-10-16 Thread Pieter Vermeesch
I'm trying to do a linear discriminant analysis on a dataset of three classes (Affinities), using the MASS library: data.frame2 - na.omit(data.frame1) data.ld = lda(AFFINITY ~ ., data.frame2, prior = c(1,1,1)/3) Error in var(x - group.means[g, ]) : missing observations in cov/cor What does

[R] MLE Methods

2006-10-16 Thread nand kumar
Greetings Forum, I am new to R and and writing in hopes of getting some help. Our MLE results from a home grown software do not match with that of R. We are using a censored sample and will really appreciate if you could give us any pointers as to which MLE method is used in R... to my

Re: [R] overlapping intervals

2006-10-16 Thread Charles C. Berry
If speed is an issue as in large scale (e.g. genomic) problems, then findInterval is very helpful. See http://finzi.psych.upenn.edu/R/Rhelp02a/archive/60815.html for an example. On Sun, 15 Oct 2006, jim holtman wrote: Not the most efficient and requires integer values (maybe less

Re: [R] NULL or NA for missing function arguments?

2006-10-16 Thread Hans-Peter
2006/10/16, Duncan Murdoch [EMAIL PROTECTED]: As Gabor said, the third way is to give no default, but test missing() in the code. I forgot this one, thank you. In my case it is probably not suited as I just pass the arguments to a C (Pascal) function and do the checking there. [explanations

Re: [R] NULL or NA for missing function arguments?

2006-10-16 Thread Gabor Grothendieck
On 10/16/06, Hans-Peter [EMAIL PROTECTED] wrote: 2006/10/16, Duncan Murdoch [EMAIL PROTECTED]: As Gabor said, the third way is to give no default, but test missing() in the code. I forgot this one, thank you. In my case it is probably not suited as I just pass the arguments to a C (Pascal)

[R] plots: layout + subtitles

2006-10-16 Thread Marie-Pierre Sylvestre
Hello, I want to create a figure that consists of a collection of 16 graphs on 4 rows. I am using nf - layout(matrix(seq(1,16), 4,4, byrow=TRUE), respect=TRUE) boxplot(... to create the layout of my 16 graphs. It works really well. However, I'd like to add sub-titles that would apply to each

[R] Misunderstanding escape (backslash)

2006-10-16 Thread Frank McCown
Forgive my ignorance, but shouldn't '\\' be converted into '\' in my string? In my output (below), you can see that '\\' remains '\\'. term = mother\'s day term [1] mother's day term = mother\\\'s day term [1] mother\\'s day --- should be mother\'s day Thanks, Frank

[R] BarPlot

2006-10-16 Thread Mohsen Jafarikia
Hello everyone: I am using the following code to draw my barplot but it has two problems. BL-c(1.97,8.04,2.54,10.53,4.85,1.73) LR-c(0.85,0.86,8.33,04.18,6.26,2.40) Q-c(0.00,0.00,1.92,01.92,4.48,0.00) cols - ifelse(Q!=0, orange, green) Graph- barplot(LR, main='LR Value',col=cols, border='black',

Re: [R] grep function with patterns list...

2006-10-16 Thread Anupam Tyagi
Hi Stephane, Stéphane CRUVEILLER scruveil at genoscope.cns.fr writes: is there a way to pass a list of patterns to the grep function? I vaguely remember something with %in% operator... I think you are looking for the %in% and %nin% which are part of Design package, and also in Hmisc library.

Re: [R] Misunderstanding escape (backslash)

2006-10-16 Thread Gabor Grothendieck
On 10/16/06, Frank McCown [EMAIL PROTECTED] wrote: Forgive my ignorance, but shouldn't '\\' be converted into '\' in my string? In my output (below), you can see that '\\' remains '\\'. term = mother\'s day term [1] mother's day term = mother\\\'s day term [1] mother\\'s day

Re: [R] help with plot()

2006-10-16 Thread tom soyer
Thanks Marc. I followed your suggestion and I got R to plot the correct graph! You are absolutely correct about R switching automatically from plot() to plot.factor(). I had no idea that it would do that. It looks like having the header is very important in R. Appreciate your help very much. On

Re: [R] Misunderstanding escape (backslash)

2006-10-16 Thread Peter Dalgaard
Gabor Grothendieck [EMAIL PROTECTED] writes: On 10/16/06, Frank McCown [EMAIL PROTECTED] wrote: Forgive my ignorance, but shouldn't '\\' be converted into '\' in my string? In my output (below), you can see that '\\' remains '\\'. term = mother\'s day term [1] mother's day

[R] generate random numbers that sum up to 1

2006-10-16 Thread Alberto Monteiro
I found another method to generate this, in the Borg of all Wisdom: http://en.wikipedia.org/wiki/Simplex Alberto Monteiro --- Section Random Sampling: The second method [[the first method is based on the Dirichlet distribution -- avfm]] to generate a random point on the unit simplex is based

Re: [R] Misunderstanding escape (backslash)

2006-10-16 Thread Frank McCown
And check out the new FAQ 7.37 http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-does-backslash-behave-strangely-inside-strings_003f Thanks, guys, for the help. Frank __ R-help@stat.math.ethz.ch mailing list

Re: [R] glm cannot find valid starting values

2006-10-16 Thread Michael Dewey
At 16:12 15/10/2006, Ronaldo ReisJunior wrote: Em Sábado 14 Outubro 2006 11:15, Gabor Grothendieck escreveu: Try using OLS starting values: glm(Y~X,family=gaussian(link=log), start = coef(lm(Y~X))) Ok, using a starting value the model work. But, sometimes ago it work without any starting

[R] How to solve for parameter in likelihood?

2006-10-16 Thread Rubén Roa
Hi, I want to calculate, for any likelihood function, the value(s) of the parameter of interest that makes the likelihood equal to 1/8-th of the value of the likelihood at the maximum. Say, with the following toy example with a binomial distribution and with interest in p:

Re: [R] plots: layout + subtitles

2006-10-16 Thread Paul Murrell
Hi Marie-Pierre Sylvestre wrote: Hello, I want to create a figure that consists of a collection of 16 graphs on 4 rows. I am using nf - layout(matrix(seq(1,16), 4,4, byrow=TRUE), respect=TRUE) boxplot(... to create the layout of my 16 graphs. It works really well. However, I'd

Re: [R] MLE Methods

2006-10-16 Thread Ben Bolker
nand kumar nksathyar at yahoo.com writes: Greetings Forum, I am new to R and and writing in hopes of getting some help. Our MLE results from a home grown software do not match with that of R. We are using a censored sample and will really appreciate if you could give us any pointers

Re: [R] [R-pkgs] New package Ryacas

2006-10-16 Thread Cleber N. Borges
Hello, First, I would like to congratulations for very cool package! It's very nice idea!... Secondly, Is there a way to send R'objects (variables) to yacas and make symbolic operations?? for example: d - diag(3) a - A yacas( d * a ) Thanks, Cleber Borges Gabor Grothendieck wrote:

Re: [R] BarPlot

2006-10-16 Thread David Barron
Specify margins using par(mar=c(5,1,4,2)) before the call to barplot. You won't be able to see the vertical axis labels with those settings, though. On 16/10/06, Mohsen Jafarikia [EMAIL PROTECTED] wrote: Hello everyone: I am using the following code to draw my barplot but it has two problems.

Re: [R] NULL or NA for missing function arguments?

2006-10-16 Thread Duncan Murdoch
On 10/16/2006 5:06 PM, Brahm, David wrote: Hans-Peter [EMAIL PROTECTED] wrote: I am troubled by the use of NULL or NA to indicate missing/non-specified function arguments. I suggest using NULL for arguments which are vectors or lists of unspecified length, and NA for scalars (arguments

Re: [R] [R-pkgs] New package Ryacas

2006-10-16 Thread Gabor Grothendieck
Its pretty limited right now but you can do this: library(Ryacas) d - List(List(1, 0, 0), List(0, 1, 0), List(0, 0, 1)) a - Sym(a) a * d expression(list(list(a, 0, 0), list(0, a, 0), list(0, 0, a))) PrettyForm(%) /\ | ( a ) ( 0 ) ( 0 ) | || | ( 0 ) (

Re: [R] Re : Generate a random bistochastic matrix

2006-10-16 Thread Ravi Varadhan
Martin, I don't think that a doubly stochastic matrix can be obtained from an arbitrary positive rectangular matrix. There is a theorem by Sinkhorn (Am Math Month 1967) on the diagonal equivalence of matrices with prescribed row and column sums. It shows that given a positive matrix A(m x n),

Re: [R] extracting nested variances from lme4 model

2006-10-16 Thread Spencer Graves
Dear Doug Frank: Thanks for the reply, Doug. First a comment, then another question for you, Doug, if you have time: 1. COMMENT: Here's an ugly hack that would seem to answer Frank's question using 'lmer': (vt - with(dtf, tapply(x, trth, sd))) (vr - vt[2]/vt[1]) mod1b -

[R] BarPlot Color

2006-10-16 Thread Mohsen Jafarikia
Hello everyone, In the following program, I have specified if 'Q!=0', bar color is 'orange' and if is '0.0', color is green. Now I want to have different colors for 'Q'. For example: If 'Q=0.0' then color is green If 'Q=1.92' then color is blue If 'Q=4.48' then color is red I also want an

Re: [R] [R-pkgs] New package Ryacas

2006-10-16 Thread Gabor Grothendieck
Here is a slightly shorter way to do it although it involves passing a yacas string directly: yacas(a * Identity(3)) expression(list(list(a, 0, 0), list(0, a, 0), list(0, 0, a))) PrettyForm(%) /\ | ( a ) ( 0 ) ( 0 ) | || | ( 0 ) ( a ) ( 0 ) | |

Re: [R] New package Ryacas

2006-10-16 Thread Cleber N.Borges
Hello Gabor I try these example, but I obtain some errors. *First example* yacas(a * Identity(3)) expression(list(list(a, 0, 0), list(0, a, 0), list(0, 0, a))) it's ok , but the next command: PrettyForm(%) Error in PrettyForm(%) : no applicable method for PrettyForm If I make a little

[R] tcltk crashes with bad color with text widget

2006-10-16 Thread Alex Couture-Beil
Hello I have been playing with tcl/tk in R 2.4.0 on windows XP and have managed to crash R by supplying tcl/tk with an incorrect color. Is this a bug? is there a way for me to test the color to see if it is a valid tcl/tk color, to avoid this? tt=tktoplevel() tklabel(parent=tt, text=hello

Re: [R] New package Ryacas

2006-10-16 Thread Gabor Grothendieck
On 10/16/06, Cleber N.Borges [EMAIL PROTECTED] wrote: Hello Gabor I try these example, but I obtain some errors. *First example* yacas(a * Identity(3)) expression(list(list(a, 0, 0), list(0, a, 0), list(0, 0, a))) it's ok , but the next command: PrettyForm(%) Error in

[R] Variance of fitted value in lm

2006-10-16 Thread Li Zhang
Hi, I am wondering if a linear model lm(y~ x1+x2) calculates the variance of a fitted value. Thank you Li __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] About compositional data analysis

2006-10-16 Thread S.Q. WEN
The compositional data xi=(x_i1,x_i2,...,x_in), for each fixed i , xij0, and sum(xij)=1; I want to compare the mean( u_i) of several groups i.e. H0: u_1=u_2=...=u_N or H0: u_11=u_21=...=u_N1 Are there any ANOVA tpye tools to do this work in R? Thanks, WEN S Q [[alternative HTML

Re: [R] New package Ryacas

2006-10-16 Thread Simon Blomberg
Hi Gabor, I'm running Quantian (Debian) inside a VMware virtual machine, on a Windows XP host. I installed the latest version of yacas from the source tarball. I remembered to ./configure --enable-server to allow server connections. make and make install worked ok, after some fiddling. I