[R] Why do I get a linebreak in the legend?

2006-11-09 Thread CG Pettersson
Dear all, W2k, R2.4.0 I want to place a legend in a regression plot, stating the adjusted R-square value. After some struggle with the coding I am nearly there, but only nearly. The best try so far is: legend(topleft, expression(paste(R[adj]^2), = 0.66)) This places the proper information in

Re: [R] Why do I get a linebreak in the legend?

2006-11-09 Thread Dimitris Rizopoulos
try the following: x - runif(100, -4, 4) y - 1 + 2 * x + rnorm(100, sd = 2) fit - lm(y ~ x) plot(x, y) abline(fit) legend(topleft, expression(paste(R[adj]^2, = 0.66))) ## or plot(x, y) abline(fit) legend(topleft, legend = substitute(R[adj]^2 == x, list(x = summary(fit)$adj.r.squared)))

Re: [R] Why do I get a linebreak in the legend?

2006-11-09 Thread Andrew Robinson
Hi CG, move one of the parens: legend(topleft, expression(paste(R[adj]^2, = 0.66))) Cheers Andrew On Thu, Nov 09, 2006 at 09:10:49AM +0100, CG Pettersson wrote: Dear all, W2k, R2.4.0 I want to place a legend in a regression plot, stating the adjusted R-square value. After some

[R] Plotting symbols with two positions?

2006-11-09 Thread CG Pettersson
Thanks a lot to Demitris for a prompt answer some minutes ago on another tread (see below). To avoid excess mails on the list, I move onto next question: I have another small plotting problem that confuses me. I want to plot results from a field trial series, using the numbers of the trials as

Re: [R] Plotting symbols with two positions?

2006-11-09 Thread Dimitris Rizopoulos
try this: y - rnorm(16) plot(y, type = n) text(1:16, y, 1:16) Best, Dimitris - Original Message - From: CG Pettersson [EMAIL PROTECTED] To: Dimitris Rizopoulos [EMAIL PROTECTED] Cc: CG Pettersson [EMAIL PROTECTED]; r-help@stat.math.ethz.ch Sent: Thursday, November 09, 2006 10:09

Re: [R] Plotting symbols with two positions?

2006-11-09 Thread Ted Harding
On 09-Nov-06 CG Pettersson wrote: Thanks a lot to Demitris for a prompt answer some minutes ago on another tread (see below). To avoid excess mails on the list, I move onto next question: I have another small plotting problem that confuses me. I want to plot results from a field trial

Re: [R] axis command and excel time format

2006-11-09 Thread Gabor Grothendieck
You are using two different x's and one has nothing to do with the other. All of your examples are simply internally inconsistent so there is no reason to think they would work. On 11/9/06, Carmen Meier [EMAIL PROTECTED] wrote: Gabor Grothendieck schrieb: Please provide a complete self

Re: [R] Meta-regression with lmer() ? If so, how ?

2006-11-09 Thread Bernd Weiss
Am 9 Nov 2006 um 8:45 hat Emmanuel Charpentier geschrieben: Date sent: Thu, 09 Nov 2006 08:45:36 +0100 From: Emmanuel Charpentier [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject:[R] Meta-regression with lmer() ? If so, how

Re: [R] Plotting symbols with two positions?

2006-11-09 Thread Gabor Grothendieck
Aside from the answers to use text you could use letters instead of numbers which would allow you to continue to use a single character and might have advantages in terms of saving space on the chart: pch = letters[trial_no] pch = c(letters, LETTERS)[trial_no] pch = c(1:9, letters,

Re: [R] Why do I get a linebreak in the legend?

2006-11-09 Thread Gabor Grothendieck
Try: legend(topleft, expression(R[adj]^2 == 0.66)) On 11/9/06, CG Pettersson [EMAIL PROTECTED] wrote: Dear all, W2k, R2.4.0 I want to place a legend in a regression plot, stating the adjusted R-square value. After some struggle with the coding I am nearly there, but only nearly. The best

Re: [R] Repeated Measures MANOVA in R

2006-11-09 Thread Chuck Cleland
A. Bolu Ajiboye wrote: Can R do a repeated measures MANOVA and tell what dimensionality the statistical variance occupies? I have been using MATLAB and SPSS to do my statistics. MATLAB can do ANOVAs and MANOVAs. When it performs a MANOVA, it returns a parameter d that estimates the

Re: [R] Plotting symbols with two positions?

2006-11-09 Thread CG Pettersson
Dear Dimitris, Thanks a lot, but I didn't really manage to apply it in my context, I first got an error message and then an ugly plot. I have also got the advice from Gabor Grothendieck to use letters instead of numbers, but I do prefer numbers as this is the normal way of referring to the

Re: [R] Plotting symbols with two positions?

2006-11-09 Thread Dimitris Rizopoulos
I think you need the following: attach(DAT.nr) plot(jd.s, jd.h, type = n) text(jd.s, jd.h, t_no) I hope it works. Best, Dimitris - Original Message - From: CG Pettersson [EMAIL PROTECTED] To: Dimitris Rizopoulos [EMAIL PROTECTED] Cc: CG Pettersson [EMAIL PROTECTED];

[R] problems with loading packages in R 2.4.0

2006-11-09 Thread jacinthe
Hi, I have just installed R 2.4.0 and when I try to load fMultivar I get the following error message: Loading required package: methods Error in identical(pkg, [EMAIL PROTECTED]) : formal classes cannot be used without the methods package Error: .onAttach failed in 'attachNamespace' Error:

Re: [R] [Rd] How to link to vignette from .Rd file

2006-11-09 Thread Agner Fog
Thanks for the tip. Actually I found that I can just write vignette(vignettename) in a demo. I think that's the easiest way to link to a .pdf file. It works only if the .pdf file is built from a Sweave file. I thought that I could just put a .pdf file and an index.html in inst/doc/ but I get

[R] plot pch

2006-11-09 Thread Marc Bernard
Dear All, I have a data as follows: ID - 1:100 Y - rnorm(100) X - rnorm(100) type - as.factor(rep(1:3,100,time=1)) df - as.data.frame(cbind(ID, Y,X,type)) I want to plot Y versus X by specifying the pch to be as follows: Subjects having type = 1 must be plotted

Re: [R] Can I set the proxy server and authentification from within R?

2006-11-09 Thread Werner Wernersen
Thanks a lot for your help! One more remark if somebody runs into the same problem: The .Renviron file has to be in the correct directory. It can be checked with Sys.getenv('http_proxy') that the settings have been actually read in. The .Renviron file looks like this now:

[R] Discriminant Analysis- Apparent error rate

2006-11-09 Thread Luis Ridao Cruz
R-help, I'm trying to evaluate the misclasification rate of an estimated discrimated function (hyDA) hyDA - with(hyB, lda(Maturity ~ Length + Weight)) , so here is what I do (code from S-plus 6.1 Guide to Statistics Vol. 2 p 101) test - predict(hyDA) tbl - table(hyB$Maturity, test$class)

Re: [R] [Rd] How to link to vignette from .Rd file

2006-11-09 Thread Duncan Murdoch
On 11/9/2006 6:37 AM, Agner Fog wrote: Thanks for the tip. Actually I found that I can just write vignette(vignettename) in a demo. I think that's the easiest way to link to a .pdf file. It works only if the .pdf file is built from a Sweave file. I thought that I could just put a .pdf

Re: [R] plot pch

2006-11-09 Thread Joris De Wolf
Somebody will come up with a more elagant solution, but a quick fix would be: plot(df$Y[df$pch_type != 21],df$X[df$pch_type != 21], pch=df$pch_type[df$pch_type != 21]) points(df$Y[df$pch_type == 21],df$X[df$pch_type == 21],pch= 21) Marc Bernard wrote: Dear All, I have a data as

[R] Closing R fails

2006-11-09 Thread john seers \(IFR\)
Hello All I cannot close R easily: q() Error in .Last() : could not find function finalizeSession This seems to have started after I used the R.utils package. If I load the R.utils package I can close R successfully. But I do not want to have to do this every time I run R. Is there

Re: [R] query in R

2006-11-09 Thread Mark Wardle
Xiaodong Jin wrote: I just need to query ordinary 3-column excel data e.g. V1 V2 V3 I1 C1 1 I1 C1 1 ... DATA snipped Hi. It is better to keep discussion on list, rather than emailing individuals. You need to read

Re: [R] Closing R fails

2006-11-09 Thread Gavin Simpson
On Thu, 2006-11-09 at 12:18 +, john seers (IFR) wrote: Hello All I cannot close R easily: q() Error in .Last() : could not find function finalizeSession This seems to have started after I used the R.utils package. If I load the R.utils package I can close R successfully.

[R] Env: Re: query in R

2006-11-09 Thread Ricardo Rodríguez
---BeginMessage--- Hi, Jin, --- Ricardo Rodríguez Your XEN ICT Team Xiaodong Jin[EMAIL PROTECTED] 09/11/06 3:10 I just need to query ordinary 3-column excel data e.g. V1 V2 V3 I1 C1 1 I1 C1 1 I1 C1 1 I need to get select distinct V1, V3, count(distinct V2) as CNT from TABLENAM

[R] Merge: how can I keep discarded values?

2006-11-09 Thread Biscarini, Filippo
Good morning, I am merging two datasets and I would like to save the non-matching rows in a separate file. The problem is how to retrieve the non-matching rows in R. Example: DATASET A code nomi A1 Franco A2 Mario A3 Andrea A4 Sandro A5 Luca DATASET B code

[R] Question about position in row and column

2006-11-09 Thread Jenny persson
Hi R-users, I have 48 blocks like below 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 in each block there are 18 cloumns and 18 rows which give 18*18*48 observations. The

Re: [R] Closing R fails

2006-11-09 Thread Duncan Murdoch
On 11/9/2006 7:18 AM, john seers (IFR) wrote: Hello All I cannot close R easily: q() Error in .Last() : could not find function finalizeSession This seems to have started after I used the R.utils package. If I load the R.utils package I can close R successfully. But I do not

Re: [R] Discriminant Analysis- Apparent error rate

2006-11-09 Thread hadley wickham
The error rates I get is 0.57 which is very large I was wondering if I'm doing something wrong. It is quite possible, if your groups are overlapping or not separated by a linear boundary. Given that you have only two varaibles, have you plotted them? Hadley

Re: [R] Closing R fails

2006-11-09 Thread john seers \(IFR\)
Hi Gavin Thanks for helping. Does R close properly if you invoke R with the --vanilla flag? It sure does. So, deleting .RData from my workspace seems to fix it more neatly. But, of course, the problem come backs whenever I use R.utils. (Unless I remember not to save my workspace). A good

Re: [R] Env: Re: query in R

2006-11-09 Thread Hans-Peter
2006/11/9, Ricardo Rodríguez [EMAIL PROTECTED]: Thus, sticking with Excel, there are two options as far as I know: RODBC or the read.xls function included with a number of packages. read.xls temporarely transform your xls files into csv ones. I've never successfully imported data by using

Re: [R] Repeated Measures MANOVA in R

2006-11-09 Thread Michael Friendly
I have an in press paper on HE plots, http://www.math.yorku.ca/SCS/Papers/heplots.pdf that describes methods to visualize the dimensionality of effects in MLMs. The implementation is in SAS, but there's a link to a rudimentary R function in the paper. -Michael A. Bolu Ajiboye wrote: Can R do a

Re: [R] Repeated Measures MANOVA in R

2006-11-09 Thread Peter Dalgaard
Chuck Cleland [EMAIL PROTECTED] writes: A. Bolu Ajiboye wrote: Can R do a repeated measures MANOVA and tell what dimensionality the statistical variance occupies? I have been using MATLAB and SPSS to do my statistics. MATLAB can do ANOVAs and MANOVAs. When it performs a MANOVA, it

[R] Help with plot(augPred()) plot(comparePred()) in nlme

2006-11-09 Thread Michael Kubovy
Dear r-helpers, When I issue the commands plot(augPred(mcc.lme, primary = ~ mcc$age, length.out = 2, level = c (0, 1))) or plot(comparePred(mcc1.lis, mcc.lme, primary = ~ mcc$age, length.out = 2), layout = c(4, 3))) no lines are drawn. But fm1 - lme(Orthodont) plot(augPred(fm1, level = 0:1,

Re: [R] Numerical Integration

2006-11-09 Thread Ravi Varadhan
Here is a simple example using the bkde (binned kernel density estimator) from the KernSmooth package that shows how to use the trapezoidal integration: library(KernSmooth) data(geyser, package=MASS) x - geyser$duration est - bkde(x, grid = 101, bandwidth=0.25) trap.rule(est$x,est$y) [1]

Re: [R] Closing R fails

2006-11-09 Thread Gavin Simpson
On Thu, 2006-11-09 at 13:46 +, john seers (IFR) wrote: Hi Gavin Thanks for helping. You're welcome Does R close properly if you invoke R with the --vanilla flag? It sure does. So, deleting .RData from my workspace seems to fix it more neatly. But, of course, the problem come

[R] Parameter to show ticks ?

2006-11-09 Thread Marc Feuerstein
Hi there, is there a parameter in stripchart to control if the ticks (in the axis) are shown or not ? Thanks, Marc. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] summary linear regression

2006-11-09 Thread Gorka Merino
Good morning, I am a PhD student in Barcelona working with R. My question is about the summary of linear regressions. The output of that summary gives some statistical parameters of the regression. One of them is the R-squared. In the help menu i have read that the manner to calculate the

[R] rpart - I'm confused by the loss matrix

2006-11-09 Thread Barbora Arendacká
Hello, As I couldn't find anywhere in the help to rpart which element in the loss matrix means which loss, I played with this parameter and became a bit confused. What I did was this: I used kyphosis data(classification absent/present, number of 'absent' cases is 64, of 'present' cases 17) and I

Re: [R] solve computationally singular

2006-11-09 Thread Simon Wood
On Tuesday 07 November 2006 19:46, xchen wrote: Hi uRsers, when inverting a 2 by 2 matrix using solve, I encountered a error message: solve.default(sigma, tol = 1e-07) : system is computationally singular: reciprocal condition number = 1.7671e-017 and then I test the determinant of

Re: [R] Making a case for using R in Academia

2006-11-09 Thread Charilaos Skiadas
As a addendum to all this, this is one of the responses I got from one of my colleagues: The problem with R is that our students in many social science fields, are expected to know SPSS when they go to graduate school. Not having a background in SPSS would put these students at a

[R] R Help

2006-11-09 Thread amna khan
Respected Sir I am very new user of R language. Sir i am facing problems in learning R language reading manuals. Sir is there any possibility of learning it by some tutor online? Sir my research work is going to be late because of not having understanding of R. After a long struggle, I am just

Re: [R] Making a case for using R in Academia

2006-11-09 Thread Doran, Harold
I would turn this on its head. The problem with social science grad schools is that students are not expected to know R. In my org doing psychometrics, we won't even consider an applicant if they only know SPSS. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

[R] R crashing on linux

2006-11-09 Thread Francois Pepin
Hi everyone, I've had R crashing on rather repeatedly and I'd like to know if there's anything to be done with it. This is with R 2.3.0. That computer does not have R 2.4 installed on it. This is a Linux FC4 on 64bit processor. How to reproduce it: 1- ssh to server with X forwarding. 2- start

[R] data storage/cubes and pointers in R

2006-11-09 Thread Piet van Remortel
Hi all, I am faced with the situation where I want to store/analyze relatively large, organized sets of numerical data, which depend on a number of conditions (biological properties, exposure times, concentrations etc etc). Imagine about a hundred dataframes of a few thousand numerical

Re: [R] R crashing on linux

2006-11-09 Thread Peter Dalgaard
Francois Pepin [EMAIL PROTECTED] writes: Hi everyone, I've had R crashing on rather repeatedly and I'd like to know if there's anything to be done with it. This is with R 2.3.0. That computer does not have R 2.4 installed on it. This is a Linux FC4 on 64bit processor. How to reproduce

Re: [R] Making a case for using R in Academia

2006-11-09 Thread Spencer Graves
I haven't followed this thread, but I suggest you not judge solely from current and past usage, because I think R's market share is increasing everywhere, and it's increasing the fastest in two groups: (1) People who are price sensitive, e.g., the professors in New Zealand who

Re: [R] Making a case for using R in Academia

2006-11-09 Thread Douglas Bates
On 11/9/06, Charilaos Skiadas [EMAIL PROTECTED] wrote: As a addendum to all this, this is one of the responses I got from one of my colleagues: The problem with R is that our students in many social science fields, are expected to know SPSS when they go to graduate school. Not having a

Re: [R] Parameter to show ticks ?

2006-11-09 Thread Gavin Simpson
On Thu, 2006-11-09 at 07:56 -0800, Marc Feuerstein wrote: Hi there, is there a parameter in stripchart to control if the ticks (in the axis) are shown or not ? The only way I can see to do this easily is to set tcl to 0 in a par call, before you do the plotting: ## from example in

[R] dissimilarity matrices

2006-11-09 Thread Kris Lockyear
Dear All, I have a dissimilarity matrix which I happily convert to a distance object by running: X - as.dist(Y) and I can happily now run either hclust(X) or agnes(X). So that the various bits of output are labelled correctly I would dearly like to be able to give names to the columns and

Re: [R] data storage/cubes and pointers in R

2006-11-09 Thread hadley wickham
Intuitively, I would like to be able to slice the data in a 'data- cube' kind of way to query, analyze, cluster, fit etc., which resembles the database data-cube way of thinking common in de db world these days. ( http://en.wikipedia.org/wiki/Data_cube ) I have no knowledge of a package that

Re: [R] function

2006-11-09 Thread Douglas Bates
On 11/9/06, Bill Hunsicker [EMAIL PROTECTED] wrote: I am trying to create a function that i pass a data set to and have the function return some calculations based on data. Allow me to illustrate: myfunc - function(lst,mn,sd){ lst - sort(lst) mn - mean(lst) sd - sqrt(var(lst))

Re: [R] function

2006-11-09 Thread Marc Schwartz
On Thu, 2006-11-09 at 12:58 -0500, Bill Hunsicker wrote: R-help, I am trying to create a function that i pass a data set to and have the function return some calculations based on data. Allow me to illustrate: myfunc - function(lst,mn,sd){ lst - sort(lst) mn - mean(lst)

Re: [R] function

2006-11-09 Thread Marc Schwartz
On Thu, 2006-11-09 at 12:15 -0600, Marc Schwartz wrote: On Thu, 2006-11-09 at 12:58 -0500, Bill Hunsicker wrote: R-help, I am trying to create a function that i pass a data set to and have the function return some calculations based on data. Allow me to illustrate: myfunc -

Re: [R] [Rd] How to link to vignette from .Rd file

2006-11-09 Thread Agner Fog
Duncan Murdoch wrote: Actually how you built the .pdf is irrelevant, but it does look for file with the same name and one of these extensions: Rnw rnw Snw snw Rtex rtex Stex stex So you could just create a zero length file with the same basename and one of those extensions, and it

Re: [R] [Rd] How to link to vignette from .Rd file

2006-11-09 Thread Duncan Murdoch
On 11/9/2006 1:15 PM, Agner Fog wrote: Duncan Murdoch wrote: Actually how you built the .pdf is irrelevant, but it does look for file with the same name and one of these extensions: Rnw rnw Snw snw Rtex rtex Stex stex So you could just create a zero length file with the same

[R] random forest importance calculation

2006-11-09 Thread Naiara Pinto
Hi all, I am using random forest (regression) and I am having trouble calculating the variable importance for my object (RF). Here is what I tried: RF$importance and importance(RF) The thing is that the reported %incMSE is different between those two. I understand that the function

[R] predict.lm variables found question

2006-11-09 Thread Larry White
hello, I'm trying to predict some values based on a linear regression model. I've created the model using one dataframe, and have the prediction values in a second data frame (call it newdata). There are 56 rows in the dataframe used to create the model and 15 in newdata. I ran predict(model1,

Re: [R] predict.lm variables found question

2006-11-09 Thread Peter Dalgaard
Larry White [EMAIL PROTECTED] writes: hello, I'm trying to predict some values based on a linear regression model. I've created the model using one dataframe, and have the prediction values in a second data frame (call it newdata). There are 56 rows in the dataframe used to create the

[R] POSIXlt converted to POSIXct in as.data.frame()

2006-11-09 Thread Roger Bivand
In trying to use as.Date(), I've come across the conversion of POSIXlt to POSIXct when a POSIXlt variable is included in a data frame: my_POSIX - strptime(c(11-09-2006, 11-10-2006, 11-11-2006, 11-12-2006, 11-13-2006), %m-%d-%Y) str(my_POSIX) my_Date - as.Date(my_POSIX) str(my_Date) data -

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

2006-11-09 Thread Mark Wardle
All, This is an update to my previous query on dealing with complex (complex in my eyes anyway) LaTeX/Sweave projects. Based on the work of others, please see my current thesis Makefile below. I didn't get Sweave and LaTeX to cope with a master document in one directory, and chapters in

[R] Variance Functions in lme

2006-11-09 Thread Rick Bilonick
Using the weight argument with a variance function in lme (nlme), you can allow for heteroscedasticity of the within-group error. Is there a way to do this for the other variance components? For example, suppose you had subjects, days nested within subjects, and visits nested within days within

Re: [R] Variance Functions in lme

2006-11-09 Thread Andrew Robinson
Rick, most likely, either by using the varIdent class, or conditioning the varPower class on sex. See p. 177, and 208-225 of Pinheiro and Bates. As usual, it's best to frame your question so that the list can send you some relevant code. If you'd like a more focused answer, I suggest that you

Re: [R] data storage/cubes and pointers in R

2006-11-09 Thread Tony Plate
What kind of operations do you need to be able to do? I frequently use 3 and higher dimensional arrays for storing data, and then I use indexing operations to extract slices of data, or sometimes apply() and friends to process the data. The abind() function (in the 'abind' package) will bind

[R] Algorithm needed

2006-11-09 Thread hbeltra
I have a matrix of size n and I want to create a new one in which the columns are sums of the original matrix, with some order in the sums. For example, if matrix A has 4 columns, then the new matrix should have 6 columns with the following info from the columns of A: 1+2, 1+3, 1+4, 2+3, 2+4,

[R] Single precision data behaviour with readBin()

2006-11-09 Thread Eric Thompson
Hi all, I am running R version 2.4.0 (2006-10-03) on an i686 pc with Mandrake 10.2 Linux. I was given a binary data file containing single precision numbers that I would like to read into R. In a previous posting, someone suggested reading in such data as double(), which is what I've tried: zz

[R] 2007 John M. Chambers Statistical Software Award

2006-11-09 Thread J.R. Lockwood
(sorry for cross-posting) John M. Chambers Statistical Software Award Statistical Computing Section American Statistical Association The Statistical Computing Section of the American Statistical Association announces the competition for the John M. Chambers Statistical Software Award. In 1998

Re: [R] Making a case for using R in Academia

2006-11-09 Thread John Fox
Dear Charilaos, It's very difficult to give definitive answers to the questions that you pose because we don't have any good data (at least as far as I know) about how widely R is used. I recall a claim, I think on the r-help list, that R is now second to SAS in use world-wide, but I'm not sure

[R] command for stopping and then hit return and continue (fwd)

2006-11-09 Thread Mark . Leeds
-- Forwarded message -- Date: Thu, 9 Nov 2006 16:38:46 -0500 From: Leeds, Mark (IED) [EMAIL PROTECTED] To: Leeds, Mark (IED) [EMAIL PROTECTED] Subject: command for stopping and then hit return and continue when i do sequential plotting, i use the park(ask=TRUE) command so that

Re: [R] data storage/cubes and pointers in R

2006-11-09 Thread Roy Mendelssohn
Look at using netcdf files (http://www.unidata.ucar.edu/software/netcdf/), and one of several R packages for manipulating netcdf files, such as ncdf. -Roy At 2:12 PM -0700 11/9/06, Tony Plate wrote: What kind of operations do you need to be able to do? I frequently use 3 and higher

Re: [R] Single precision data behaviour with readBin()

2006-11-09 Thread Henrik Bengtsson
Hi, what you are observing is the fact that there is always a limit in the precision a floating-point values can be stored. The value you are trying to read is stored in 4 bytes (floats). For higher precision, the value could be stored in 8 bytes (doubles). BTW, R works with 8 byte

Re: [R] Single precision data behaviour with readBin()

2006-11-09 Thread Duncan Murdoch
On 11/9/2006 4:20 PM, Eric Thompson wrote: Hi all, I am running R version 2.4.0 (2006-10-03) on an i686 pc with Mandrake 10.2 Linux. I was given a binary data file containing single precision numbers that I would like to read into R. In a previous posting, someone suggested reading in such

[R] optimize function with integral form ?

2006-11-09 Thread Jenny Stadt
Hi all, Does anybody have the experience of using optim to estimate variables with integral forms? here the code: trun.mean- function(x) # t is the threshold { mu=x[1]; sigma=x[2]; t=x[3]; f - function(x) (1/(sigma*sqrt(2*pi)))*exp(-(x-mu)^2/(2*sigma^2)); pdf.fun - function(x)

Re: [R] Algorithm needed

2006-11-09 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: I have a matrix of size n and I want to create a new one in which the columns are sums of the original matrix, with some order in the sums. For example, if matrix A has 4 columns, then the new matrix should have 6 columns with the following info from the columns

Re: [R] Making a case for using R in Academia

2006-11-09 Thread Charilaos Skiadas
John (and everyone else), On Nov 9, 2006, at 4:20 PM, John Fox wrote: Dear Charilaos, It's very difficult to give definitive answers to the questions that you pose because we don't have any good data (at least as far as I know) about how widely R is used. Yes it certainly isn't an

Re: [R] Algorithm needed

2006-11-09 Thread Marc Schwartz
On Thu, 2006-11-09 at 22:32 +0100, Peter Dalgaard wrote: [EMAIL PROTECTED] writes: I have a matrix of size n and I want to create a new one in which the columns are sums of the original matrix, with some order in the sums. For example, if matrix A has 4 columns, then the new matrix

Re: [R] optimize function with integral form ?

2006-11-09 Thread Andrew Robinson
Hi Jenny, whenever a function that calls a function complains about the function it is calling, it helps to try to run that function yourself. So, I declared your function trun.mean as below and tried to call it: trun.mean(c(200,100,113)) Error in integrate(f, thre, upper = Inf) :

Re: [R] data storage/cubes and pointers in R

2006-11-09 Thread Martin Morgan
In case the other replies aren't to your liking, and you want to write something yourself... Piet van Remortel [EMAIL PROTECTED] writes: [snip] Also considering implementing a similar setup myself, I started wondering about the possibility of use references (or pointers aargh) to

Re: [R] Algorithm needed

2006-11-09 Thread Ted Harding
On 09-Nov-06 [EMAIL PROTECTED] wrote: I have a matrix of size n and I want to create a new one in which the columns are sums of the original matrix, with some order in the sums. For example, if matrix A has 4 columns, then the new matrix should have 6 columns with the following info from the

Re: [R] Making a case for using R in Academia

2006-11-09 Thread rolf
I would just like to add a comment to this thread that a good reason to use R is that it's so ***EASY*** to use! You can get R to do what ***you*** want. E.g. I want to set my students an exercise in which they simulate a data set from a certain distribution (using the inverse probability

Re: [R] Algorithm needed

2006-11-09 Thread Marc Schwartz
On Thu, 2006-11-09 at 16:24 -0600, Marc Schwartz wrote: On Thu, 2006-11-09 at 22:32 +0100, Peter Dalgaard wrote: [EMAIL PROTECTED] writes: I have a matrix of size n and I want to create a new one in which the columns are sums of the original matrix, with some order in the sums.

Re: [R] optimize function with integral form ?

2006-11-09 Thread Jenny Stadt
Thank you Andrew for the nice suggestion. I found out the mistake I made in the code. Here is the complete function with the problem of optimization. trun.mean- function(x) { mu=x[1]; sigma=x[2]; thre=x[3]; f - function(x) (1/(sigma*sqrt(2*pi)))*exp(-(x-mu)^2/(2*sigma^2)); pdf.fun -

Re: [R] Making a case for using R in Academia

2006-11-09 Thread Ted Harding
On 09-Nov-06 Charilaos Skiadas wrote: John (and everyone else), On Nov 9, 2006, at 4:20 PM, John Fox wrote: Dear Charilaos, It's very difficult to give definitive answers to the questions that you pose because we don't have any good data (at least as far as I know) about how

[R] Extracting the full coefficient matrix from a gls summary?

2006-11-09 Thread Tiphaine Jeanniard Du Dot
Hi, I am trying to extract the coefficients matrix from a gls summary. Contrary to the lm function, the command fit$coefficients returns only the estimates of the model, not the whole matrix including the std errors, the t and the p values. example: ctl -

Re: [R] interaction term between two categorical variables in ARIMA

2006-11-09 Thread Spencer Jones
hello, I am using arima to evaluate a time series regression model. I am using categorical variables such as day of week(Su-Sa), month(Jan-Dec), and holiday status (1/0) as my independent variables. There is evidence of multiplicative interaction between holiday status and weekday and I would

[R] advanced plotting

2006-11-09 Thread downunder
!urgent! Hi all. I am facing a problem plotting a indicatormatrix to visualize the pattern. Matrix consist from 1 and 0. for example x - matrix(c(0,0,1,0, 1,1,1,1, 0,0,0,1, 1,0,1,1), nrow = 4, ncol=4) an i want to have a plot like | . | . . . . | . | . . .

Re: [R] advanced plotting

2006-11-09 Thread Romain Francois
downunder wrote: !urgent! Hi all. I am facing a problem plotting a indicatormatrix to visualize the pattern. Matrix consist from 1's and 0's. for example x - matrix(c(0,0,1,0, 1,1,1,1, 0,0,0,1, 1,0,1,1), nrow = 4, ncol=4) an i want to have a plot like | . | . . . . |

[R] R and Fortran 9x -- advice

2006-11-09 Thread Tamas K Papp
Hi, I found some bottlenecks in my R code with Rprof. First I wanted to rewrite them in C, but a colleague keeps suggesting that I learn Fortran, so maybe this is the time to do it... I like to learn new languages and do it fairly quickly. I would appreciate the advice of others about these

Re: [R] summary linear regression

2006-11-09 Thread Peter Alspach
Gorka See the message from Brian Ripley, which is the first item from RSiteSearch('R-squared') Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gorka Merino Sent: Friday, 10 November 2006 4:54 a.m. To: r-help@stat.math.ethz.ch

Re: [R] advanced plotting

2006-11-09 Thread downunder
Hi Romain, this looks already very nice. thanks for your help. lars Romain Francois wrote: downunder wrote: !urgent! Hi all. I am facing a problem plotting a indicatormatrix to visualize the pattern. Matrix consist from 1's and 0's. for example x - matrix(c(0,0,1,0, 1,1,1,1, 0,0,0,1,

Re: [R] command for stopping and then hit return and continue (fwd)

2006-11-09 Thread Jeffrey J. Hallman
[EMAIL PROTECTED] writes: -- Forwarded message -- is it possible to implement the same sort of thing when you aren't plotting. in other words, i am in a loop and each time through the loop i want to print a set of values, have it stop, then only have it continue when i hit

[R] Problem with as.data.frame when an extra attribute is present

2006-11-09 Thread Frank E Harrell Jr
I have a problem when one of the vectors in a list needs to be replicated to have the appropriate length, and an attribute is present. w - list(a=1, b=2:3) as.data.frame(w) a b 1 1 2 2 1 3 attr(w$a,'label') - 'foo' as.data.frame(w) Error in data.frame(a = 1, b = c(2, 3), check.names

Re: [R] Extracting the full coefficient matrix from a gls summary?

2006-11-09 Thread Renaud Lancelot
library(nlme) ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group - gl(2,10,20, labels = c(Ctl, Trt)) weight - c(ctl, trt) fitgls - gls(weight ~ group) summary(fitgls)$tTable Value Std.Error t-value

Re: [R] PCA reconstruction funtion

2006-11-09 Thread Renaud Lancelot
See ?rconst in package ade4. You will need to fit the PCA with dudi.pca (same package). Best, Renaud 2006/11/9, Poizot Emmanuel [EMAIL PROTECTED]: Dear all, I did performed a PCA analysis (using prcomp function) on a data matrix. Then I would like to reconstruction part of the original data

Re: [R] Making a case for using R in Academia

2006-11-09 Thread William Revelle
Charles, As a psychologist in one of departments that you are trying to send your Hanover undergrads to for grad school let me say that 1) my various colleagues use SPSS, JMP, SAS and R. 2) I teach R as a supplement to my section of the undergraduate research methods course and in the

[R] Command Line Prompt Symbol

2006-11-09 Thread Jacob van Wyk
Hi I run R in Windows. Is there a simple way of changing the prompt symbol to, say, R ? (Not just for a temporary session, but every time R command window is opened.) The documentation of doing this is rather sparse. Much appreciated for your assistance. Jacob Jacob L van Wyk Department of

[R] Re : Command Line Prompt Symbol

2006-11-09 Thread justin bem
?prompt Justin BEM Elève Ingénieur Statisticien Economiste BP 294 Yaoundé. Tél (00237)9597295. - Message d'origine De : Jacob van Wyk [EMAIL PROTECTED] À : r-help@stat.math.ethz.ch Envoyé le : Vendredi, 10 Novembre 2006, 6h32mn 57s Objet : [R] Command Line Prompt Symbol Hi I run R

Re: [R] Command Line Prompt Symbol

2006-11-09 Thread Bill.Venables
The simplest way to do this is to put options(prompt = R ) in your .Rprofile file. If you don't have an .Rprifile file, then persuading Windows to let you call a file by that name can be frustrating. I suggest you delegate the job to R itself and use something like this --- wd - getwd()

Re: [R] Comparison between GARCH and ARMA

2006-11-09 Thread gyadav
Hi i was just going by this thread, i thought of igniting my mind and got something wierd so i thought of making it wired. i think whether you take ARMA or GARCH. In computer science these are feedback systems or put it simply new values are function of past values. In ARMA case it is the

[R] Problems with metaMDS from vegan

2006-11-09 Thread Peter Roosen
Hello all, I recently used the Vegan library quite extensively (in the context of text similarity assessment) on an Ubuntu 6.06 LTS system with R version 2.2.1 (2005-12-20 r36812). The Vegan lib is version 1.6-10. I hit on a problem yesterday, though, when trying to install R and Vegan on two

Re: [R] Meta-regression with lmer() ? If so, how ?

2006-11-09 Thread Emmanuel Charpentier
Dear Bernd, dear list, Bernd Weiss a écrit : [ ... ] Have a look at MiMa at Wolfgang Viechtbauer's page. Is that what you are looking for? http://www.wvbauer.com/downloads.html As far as I can tell, mima does what I mean to do, but there are some limits : - mima works on effects, and

  1   2   >