### Re: [R] Matrix Multiplication, Floating-Point, etc.

-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Talbot Katz Sent: Monday, July 30, 2007 10:55 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; r-help@stat.math.ethz.ch Subject: Re: [R] Matrix Multiplication, Floating-Point, etc. Thank you for

### Re: [R] zoo, ts and data.frames

zoo already can handle multivariate data so you can just use that directly rather than using data frames. See the examples in ?plot.zoo and ?xyplot.zoo On 7/30/07, Edna Bell [EMAIL PROTECTED] wrote: Hi R gurus: I have some zoo objects that I have put into a data.frame. However, when I try

### Re: [R] Call R program from C++ code

Hi Feng, You cannot compile R scripts as a shared library. You can compile the R engine itself (interpreter and some basic functions) as .dll (or .so), dynamically load it during run time of your application and call its low level functions. All details are in the Writing R extensions manual,

### Re: [R] Prompt comes too late

Using print() for a 'prompt' is rather unusual: people normally use message() or cat(). You haven't told us your OS, but if this is Windows, see rw-FAQ Q7.1. On Sun, 29 Jul 2007, Ralf Finne wrote: Hi R fans I am trying to make a program to ask the user to choose data file: print(Choose

### Re: [R] help with ROC curve

Hi Ritesh, may be i can help, but yeah i will try ? you can reach help to ROCR package by help.search(ROCR) What is the structure of your data ? can you give some sample i.e. few lines of your dataset ? To build ROC curve using only PSA(variable) alone of the original cohort against the

### [R] deseasonalizing package?

Hi all- I am looking for a way to calculate and subtract out a seasonal trend (i.e. carbon dioxide). Does anyone know if there is a package that does something similar? thanks! sherri __ R-help@stat.math.ethz.ch mailing list

### [R] Reading T and F as strings

Hi, I am trying to read a series of stock tickers into R, and I'm running into trouble with Ford (F) and the old ATT (T). Read.table seems to interpret these as boolean values instead of strings, even when I set colColumns to a vector of character(0)'s. Is there a way to convince it to read

### Re: [R] how to combine data of several csv-files

Hi Jim, that's exactly what I'm looking for. Thank you so much. I think, I should look for some further documentation on list handling. Many thanks also to [EMAIL PROTECTED] ;) for spending time in finding a solution... Have a nice day! Antje jim holtman schrieb: This should do it: v1 -

### Re: [R] Reading T and F as strings

Try this: Lines - Stock + T + F + DF - read.table(textConnection(Lines), header = TRUE, +colClasses = character) class(DF$Stock) [1] character On 7/30/07, David Rowntree [EMAIL PROTECTED] wrote: Hi, I am trying to read a series of stock tickers into R, and I'm running into trouble

### Re: [R] Prompt comes too late

You can use choose.files(caption=Choose data file please!,multi=FALSE,filters=Filters[All]) This will show the prompt in the file selection dialog and also allows you to restrict the list of possible choises with a filter. Ralf Finne wrote: I am trying to make a program to ask the user to

### [R] Kombination Regression mit AR/MA Prozess?

Sehr geehrte Damen und Herren Im Rahmen meiner Lizentiatsarbeit am Lehrstuhl Wirtschaftsgeschichte von Prof. Woitek arbeite ich mit der R Software um Einkommenselastizitäten zu schätzen (log-log regressionen). ich habe zuerst eine Elastizitätenschätzung gemacht lm(lM~lPfPx+lY). Dank

### Re: [R] deseasonalizing package?

On Mon, 30 Jul 2007, Sherri Heck wrote: Hi all- I am looking for a way to calculate and subtract out a seasonal trend (i.e. carbon dioxide). Does anyone know if there is a package that does something similar? Yes, package 'stats'. Try help.search(seasonal). -- Brian D. Ripley,

### Re: [R] Reading T and F as strings

On Mon, 30 Jul 2007, David Rowntree wrote: Hi, I am trying to read a series of stock tickers into R, and I'm running into trouble with Ford (F) and the old ATT (T). Read.table seems to interpret these as boolean values instead of strings, even when I set colColumns to a vector of

### Re: [R] R2WinBUGS more updates after model did not converge

[EMAIL PROTECTED] wrote: After running a model for a while and seeing that it did not converge yet, how can I continue to run, ie not starting anew, the model? I know if I manually/interactively use winbugs, this is possible anytime, but how can I do this in r2winbugs, so that my

### [R] Odp: array loop

Hi as you say that the computing is part of a function than the best way to see what is hapenning is to use debug(your.function) see ?debug for options. Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 31.07.2007 00:11:00: Dear all, here are two arrays: region(26,31,8),

### Re: [R] how to combine data of several csv-files

Hi Jim, that's exactly what I'm looking for. Thank you so much. I think, I should look for some further documentation on list handling. I think I will do the same... Thanks to Jim I learned textConnection and rowMeans. Jim, could you please go a step further and tell me how to

### [R] Extracting random parameters from summary lme and lmer

LS, I'm estimating multilevel regression models, using the lme-function from the nlme-package. Let's say that I estimated a model and stored it inside the object named 'model'. The summary of that model is shown below: Using summary(model)$tTable , I receive the following output:

### [R] Getting variable name used in function...

Dear Users, I am using functions for calculations in my study. I have two functions and one is calling the other two times one after another. But the called function deals with two different data object (matrix, data frame, etc.), so I could not make the second function output data

### Re: [R] A simple question about summary.glm

michal33 wrote: Hello, I am new to R and have tried to search similar questions but could not find exactly what I am looking for, but I apologize if the question was already asked. I have 10 different treatments and want to know whether they affect the sex ratios of insect emergence.

### Re: [R] 'non-standard' folder names in R package

Tao Shi wrote: Hi list, I use a .xml file for a function's demo in the R package I'm creating. Since it doesn't belong to any of the 'standard' folders, i.e. those mentioned in the 'Writing R Extension', I put it in a folder call myXML, much like the 'iris.xl' file in 'xls' folder

### Re: [R] Getting variable name used in function...

Levent TERLEMEZ wrote: Dear Users, I am using functions for calculations in my study. I have two functions and one is calling the other two times one after another. But the called function deals with two different data object (matrix, data frame, etc.), so I could not make the second

### Re: [R] the large dataset problem

(Ted Harding) wrote: On 30-Jul-07 11:40:47, Eric Doviak wrote: [...] Sympathies for the constraints you are operating in! The Introduction to R manual suggests modifying input files with Perl. Any tips on how to get started? Would Perl Data Language (PDL) be a good choice?

### Re: [R] Problem with code

Shawndelle Noble wrote: Hi I am having the following Warning message with this code: Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file- reason 'No such file or directory' in: file(file, r) The files are present on a CD and USB key- I tried

### Re: [R] deriv; loop

francogrex wrote: Hi, 2 questions: Question 1: example of what I currently do: for(i in 1:6){sink(temp.txt,append=TRUE) dput(i+0) sink()} x=scan(file=temp.txt) print(prod(x)) file.remove(C:/R-2.5.0/temp.txt) But how to convert the output of the loop to a vector that I can manipulate

### Re: [R] Fwd: Package manual examples - 'unexpected$undefined' errors

David Pain wrote: Bounced first time! -- Forwarded message -- From: David Pain [EMAIL PROTECTED] Date: 28-Jul-2007 11:03 Subject: Package manual examples - 'unexpected$undefined' errors To: r-help@stat.math.ethz.ch Trying out an unfamiliar package, the natural thing is

### Re: [R] Matrix Multiplication, Floating-Point, etc.

On Mon, 30 Jul 2007, Moshe Olshansky wrote: After multiplication by 10 you get 6*8 = 48 - the result is an exact machine number so there is no roundoff, while 0.6*0.8 = 0.48, where neither of the 3 numbers (0.6, 0.8, 0.48) is an exact machine mumber. However, (-0.6)*0.8 should be equal

### Re: [R] line widths of plotting symbols in the lattice

Stephen Tucker wrote: Dear List, Sorry, this is very simple but I can't seem to find any information regarding line widths of plotting symbols in the lattice package. For instance, in traditional graphics: plot(1:10,lwd=3) points(10:1,lwd=2,col=3) 'lwd' allows control of plotting

### [R] Cox model with interaction

Dear R users, I am trying to fit a Cox model such as: Surv(time,event) ~ X1+X1:X2 or Surv(time,event) ~ X1*X2 -X2, This code is working with coxph but not with cph (nor with psm), and the error message is: Error in if (!length(fname) || !any(fname == zname)) { : missing value where

### [R] Plotting a smooth curve from predict

Probably a very simple query: When I try to plot a curve from a fitted polynomial, it comes out rather jagged, not smooth like fitted curves in other stats software. Is there a way of getting a smooth curve in R? What I'm doing at the moment (for the sake of example) is: x -

### Re: [R] how to combine data of several csv-files

Here is the modified script for computing the 'sd': v1 - NA v2 - rnorm(6) v3 - rnorm(6) v4 - rnorm(6) v5 - rnorm(6) v6 - rnorm(6) v7 - rnorm(6) v8 - rnorm(6) v8 - NA list - list(v1,v2,v3,v4,v5,v6,v7,v8) categ - c(NA,cat1,cat1,cat1,cat2,cat2,cat2,NA) # create partitioned list list.cat -

### Re: [R] Overlaying a single contour from a new data array in levelplot

Dear Deepayan, Thank you once again. I needed to install the latest versions of R and lattice and now it all works fine and the border is in white, which is perfect. Thank you for all the support you offer users of lattice, Best Wishes, Jenny That should have been fixed by now. Is there

### Re: [R] how to combine data of several csv-files

Hey, I had the same question concerning the sd calculation and I got the following solution: list - split(list, class_vec) list - lapply(list, function(x) do.call('rbind', x)) my.mean - lapply(ret, FUN = function(x) { t - as.matrix(x) rm - as.matrix(apply( t, 1, FUN =

### Re: [R] Plotting a smooth curve from predict

Wilson, Andrew wrote: Probably a very simple query: When I try to plot a curve from a fitted polynomial, it comes out rather jagged, not smooth like fitted curves in other stats software. Is there a way of getting a smooth curve in R? What I'm doing at the moment (for the sake of

### Re: [R] Plotting a smooth curve from predict

On Tue, 2007-07-31 at 11:21 +0100, Wilson, Andrew wrote: Probably a very simple query: When I try to plot a curve from a fitted polynomial, it comes out rather jagged, not smooth like fitted curves in other stats software. Is there a way of getting a smooth curve in R? What I'm doing at

### Re: [R] Extracting random parameters from summary lme and lmer

Rense Nieuwenhuis wrote: LS, I'm estimating multilevel regression models, using the lme-function from the nlme-package. Let's say that I estimated a model and stored it inside the object named 'model'. The summary of that model is shown below: Using summary(model)$tTable , I

### Re: [R] Plotting a smooth curve from predict

You are using fitted() implicitly here, so you are not plotting a smooth curve but a set of fitted values. You need to really predict at a suitable range of data points, e.g. xx - seq(1, 10, len=500) plot(xx, predict(w, list(x=xx)), type=l) BTW, why are you not using poly()? On Tue, 31 Jul

### Re: [R] Plotting a smooth curve from predict

What you need is b - data.frame(x = 1:10, y = c(10,9,8,7,6,6.5,7,8,9,10)) w - gls(y ~ I(x)+I(x^2),correlation=corARMA(p=1),method=ML,data=b) Newdata - data.frame(x = seq(1, 10, length = 41)) plot(predict(w, newdata = Newdata), type=l)

### Re: [R] line widths of plotting symbols in the lattice

On Tue, 31 Jul 2007, Uwe Ligges wrote: Stephen Tucker wrote: Dear List, Sorry, this is very simple but I can't seem to find any information regarding line widths of plotting symbols in the lattice package. For instance, in traditional graphics: plot(1:10,lwd=3)

### Re: [R] Plotting a smooth curve from predict

Wilson, Andrew wrote: Probably a very simple query: When I try to plot a curve from a fitted polynomial, it comes out rather jagged, not smooth like fitted curves in other stats software. Is there a way of getting a smooth curve in R? What I'm doing at the moment (for the sake of

### [R] remove NA rows and columns

Hello, I guess, it's a rather simple thing but I cannot find a short way to reduce a matrix, removing all rows and columns having just NA elements. testmatrix - matrix(nrow=6, ncol=4) testmatrix[2:5,2:3] - seq(2) testmatrix [,1] [,2] [,3] [,4] [1,] NA NA NA NA [2,] NA1

### Re: [R] remove NA rows and columns

testmatrix [,1] [,2] [,3] [,4] [1,] NA NA NA NA [2,] NA11 NA [3,] NA22 NA [4,] NA11 NA [5,] NA22 NA [6,] NA NA NA NA tm1-testmatrix[,-which(apply(testmatrix,2,function(x)all(is.na(x] tm1 [,1] [,2] [1,] NA NA

### Re: [R] remove NA rows and columns

Or, these operations can be called in one command: testmatrix[-which(apply(testmatrix,1,function(x)all(is.na(x,-which(apply(testmatrix,2,function(x)all(is.na(x] [,1] [,2] [1,]11 [2,]22 [3,]11 [4,]22 Vladimir Eremeev wrote: testmatrix

### Re: [R] the large dataset problem

Just a note of thanks for all the help I have received. I haven't gotten a chance to implement any of your suggestions because I'm still trying to catalog all of them! Thank you so much! Just to recap (for my own benefit and to create a summary for others): Bruce Bernzweig suggested using the

### [R] durbin-watson of a arima estimation?

to whom it may concern I estimated arima(x = lM, order = c(1, 0, 0),xreg=cbind(lPfPx,lY)). how can i now run the durbin-watson test (dwtest())??? Thanx for your prompt response! Raphael Illi Graduate writing his thesis in economics on the growth performance in Subsaharan Africa

### Re: [R] Looping through all possible combinations of cases

Here is another (simpler?) solution: # your 1 column data is actually a vector myvalues - 1:10 names(myvalues) - LETTERS[1:10] # use the QCA package library(QCA) aa - createMatrix(rep(2, length(myvalues))) # set the number of combinations: 2, 3, 4 or whatever combinations - 2 sub.aa -

### Re: [R] remove NA rows and columns

Antje wrote: Hello, I guess, it's a rather simple thing but I cannot find a short way to reduce a matrix, removing all rows and columns having just NA elements. testmatrix - matrix(nrow=6, ncol=4) testmatrix[2:5,2:3] - seq(2) testmatrix [,1] [,2] [,3] [,4] [1,] NA NA

### [R] reading and storing files in the workspace

R-help, I have a vector containing (test) some file names. The files contents are matrixes. test [1] aaOki.txtaOki.txt bOki.txt c1Oki.txt c2Oki.txtc3Oki.txtcOki.txt dOki.txt dyp100.txt dyp200.txt [11] dyp300.txt dyp400.txt dyp500.txt dyp600.txt

### [R] [R-pkgs] randomSurvivalForest 3.0.0 now available

Dear useRs: Release 3.0.0 of the randomSurvivalForest, an ensemble tree method for the analysis of right censored survival data, package is now available. - CHANGES TO RELEASE 3.0.0 Release 3.0.0 represents a major

### Re: [R] array loop

Thanks, Petr. I changed the equation mark from = to -, then, it works fine. Dont know what difference it has made between the = and -.. Regards, Dong On 7/31/07, Petr PIKAL [EMAIL PROTECTED] wrote: Hi as you say that the computing is part of a function than the best way to see what is

### Re: [R] error in using R2WinBUGS on Ubuntu 6.10 Linux

J. Patrick Meyer meyerjp at jmu.edu writes: I'm using Wine 0.9.41, and the patched version of WinBUGS. Everything seems to run correctly. I get the right output from WinBUGS. I'm not sure to what the error message refers. I also get this messages, but that is comming from wine and can be

### [R] Data mining tools

Hello there, apologies for cross-posting my question is not an S/R question but there is so much knowledge concentrated in those lists that I thought someone could point me in the right direction. A few months ago I read an article in a referenced journal comparing some data mining programs,

### Re: [R] problems saving and loading (PLMset) objects

Hi Quin, First off, you should ask questions about Bioconductor packages on the BioC listserv rather than R-help. Anyway, I don't think your PLMset objects are coming out all wrong - it doesn't appear that you are loading the affyPLM package first, which is required for R to know anything

### Re: [R] remove NA rows and columns

Hello, thank you both very much! It is as easy as expected... (I think I still have to learn a lot!) Have a nice day! Antje Vladimir Eremeev schrieb: Or, these operations can be called in one command:

### Re: [R] problems saving and loading (PLMset) objects

Erm, Jim I am loading in the affyPLM package first (when needed) and this was a question based on loading/saving R objects. PLMset was an example. Many thanks, Quin -Original Message- From: James W. MacDonald [mailto:[EMAIL PROTECTED] Sent: 31 July 2007 14:54 To: Quin Wills Cc:

### Re: [R] Piecewise Regression with a known slope

Dear Jarrett, If I understand correctly your post, your constraints may be achieved straightforwardly in segmented. See the code below. The error is also most likely gamma distributed..[SNIP] The 'error' component can be specified in the 'initial' model by means of the family argument in the

### Re: [R] problems saving and loading (PLMset) objects

library(affyPLM) data(Dilution) pset - fitPLM(Dilution) save(pset, file=tmp.Rdata) q() ## restart R library(affyPLM) load(tmp.Rdata) ## use load() correctly class(pset) [1] PLMset attr(,package) [1] affyPLM erm - load(tmp.Rdata) ## use load() incorrectly class(erm) [1]

### [R] Error message when running lm() with na.action=NULL

Hi there, I am trying to run a liner regression using lm with na.action = NULL, but I am getting an error message. Any ideas as to why this may be happening? Please see code and error message below: reg_test-lm(yy~.,data=test,na.action=NULL) Error in lm.fit(x, y, offset = offset, singular.ok =

### Re: [R] stop criteria when L-BFGS-B needs finite values of 'fn' in optim

Dae-Jin Lee dae-jin.lee at uc3m.es writes: I would like to know how to include and if condition when this happen, could it be something like: myfun - optim() # run my function if(myfun == ERROR) . # when the error message is L-BFGS-B needs finite values of

### Re: [R] simple coding question

I know that some ICD9 codes contain letters, so I suspect that they are stored as character. Here is a function that just pads zeros on to the end to make the string five characters long. format - function(icd9) { len - length(strsplit(icd9, )[[1]]) pad - if (num - 5-len) pad -

### [R] Q: obtaining non-transparent background in png

I am not understanding something about generating PNG plots. I have tried several ways to obtain something other than a transparent background, but nothing I've done seems to change the background. For example: dev.print(png, width=800, height=600, bg='red', filename='example.png') which I

### Re: [R] Q: obtaining non-transparent background in png

Both of these work for me: par(bg=red) plot(1:10) dev.print(png, width=800, height=600, filename=tmp.png) and png(tmp.png, width=800, height=600, bg=red) plot(1:10) dev.off() Best, Jim D. R. Evans wrote: I am not understanding something about generating PNG plots. I have tried several

### Re: [R] Q: obtaining non-transparent background in png

On Tue, 2007-07-31 at 10:22 -0600, D. R. Evans wrote: I am not understanding something about generating PNG plots. I have tried several ways to obtain something other than a transparent background, but nothing I've done seems to change the background. For example: dev.print(png,

### [R] legend()

Hi Sir How can I use legend() outside th e plot. Please guid in this regard. Thanks -- AMINA SHAHZADI Department of Statistics GC University Lahore, Pakistan. Email: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch

### [R] italic greek symbols

Hi Folks, I am using R 2.5.1 on a Mac OS X 10.4.9, via ESS. I would like to try to get an italic mu onto a plot axis label. I note that in a previous email, (Thu, 4 May 2006 19:41:41 +0100 (BST)), Brian Ripley wrote, There is no italic symbol font available on most devices. So unless you try to

### Re: [R] Q: obtaining non-transparent background in png

On 31/07/07, Gavin Simpson [EMAIL PROTECTED] wrote: On Tue, 2007-07-31 at 10:22 -0600, D. R. Evans wrote: I am not understanding something about generating PNG plots. I have tried several ways to obtain something other than a transparent background, but nothing I've done seems to change

### [R] extract columns of a matrix/data frame

Hello all, I have a matrix whose column names look like a1 a2 b1 b2 b3 c1 c2 1 23713 2 4 67814 3 Now, I can have any number of a's. not just two as shown above and same goes for b's and c's. I need to extract all the a's columns

### [R] how to sort dataframe levels

Hi everyone, I've been bashing my head against this for days now, and can't figure out what to do. I have the following dataframe headerappetitive stimulusaversive stimuluschaining contingencydiscriminative stimulusextinctionintermittent reinforcementnegative

### Re: [R] extract columns of a matrix/data frame

You can use the grep function to obtain the column indices matching your specified criteria. For example, r1-c(1,2,3,7,1,3,2) r2-c(4,5,7,8,1,4,3) test-matrix(c(r1,r2),byrow=TRUE) colnames(test)-c(a1,a2,b1,b2,b3,c1,c2) test a1 a2 b1 b2 b3 c1 c2 [1,] 1 2 3 7 1 3 2 [2,] 4

### Re: [R] extract columns of a matrix/data frame

Sorry. There was a mistake in my previous code. Please disregard it and use the following: r1=c(1,2,3,7,1,3,2) r2=c(4,5,7,8,1,4,3) test=matrix(c(r1,r2),nrow=2,ncol=7,byrow=TRUE) colnames(test)-c(a1,a2,b1,b2,b3,c1,c2) test [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,]123

### Re: [R] extract columns of a matrix/data frame

yuvika wrote: Hello all, I have a matrix whose column names look like a1 a2 b1 b2 b3 c1 c2 1 23713 2 4 67814 3 Now, I can have any number of a's. not just two as shown above and same goes for b's and c's. I need to

### Re: [R] extract columns of a matrix/data frame

On Tue, 2007-07-31 at 10:35 -0700, yuvika wrote: Hello all, I have a matrix whose column names look like a1 a2 b1 b2 b3 c1 c2 1 23713 2 4 67814 3 Now, I can have any number of a's. not just two as shown above and same

### Re: [R] Q: obtaining non-transparent background in png

You are *copying* the plot, and that means copying the background too (it *is* part of the plot). Almost certainly the plot you are copying had a transparent background: that is the default for X11. All the confusion seems to be over misreadings of this. On Tue, 31 Jul 2007, Gavin Simpson

### [R] choosing between Poisson regression models: no interactions vs. interactions

R gurus, I'm working on data analysis for a small project. My response variable is total vines per tree (median = 0, mean = 1.65, min = 0, max = 24). My predictors are two categorical variables (four sites and four species) and one continuous (tree diameter at breast height (DBH)). The

### Re: [R] italic greek symbols

On Tue, 2007-07-31 at 13:22 -0400, Martin Henry H. Stevens wrote: Hi Folks, I am using R 2.5.1 on a Mac OS X 10.4.9, via ESS. I would like to try to get an italic mu onto a plot axis label. I note that in a previous email, (Thu, 4 May 2006 19:41:41 +0100 (BST)), Brian Ripley wrote, There

### Re: [R] italic greek symbols

On Tue, 31 Jul 2007, Martin Henry H. Stevens wrote: Hi Folks, I am using R 2.5.1 on a Mac OS X 10.4.9, via ESS. I would like to try to get an italic mu onto a plot axis label. I note that in a previous email, (Thu, 4 May 2006 19:41:41 +0100 (BST)), Brian Ripley wrote, There is no italic

### Re: [R] legend()

On Tue, 2007-07-31 at 10:21 -0700, amna khan wrote: Hi Sir How can I use legend() outside th e plot. Please guid in this regard. Thanks Create a plot, specifying outer margins to make space for the legend. Then move the legend to the open region. # Set 'xpd' to NA so that the legend is not

### Re: [R] choosing between Poisson regression models: no interactions vs. interactions

James Milks james.milks at wright.edu writes: My problem is deciding which model to use. I have created several, one without interaction terms (Total.vines~Site+Species+DBH), one with an interaction term between Site and Species (Total.vines~Site*Species+DBH), and one with

### Re: [R] choosing between Poisson regression models: no interactions vs. interactions

If you have access to it, chapter 7, section three of Venables and Ripley's Modern Applied Statistics with S is probably going to tell you everything you need to know. In general, let's say you're wanting to look at the following: model 1:Total.vines ~ Site + Species + DBH

### [R] contrasts error message in lm

Dear all, I would like to find a linear regression model for a rather large dataset (27 independent variables). However, when I run lm the following error is reported: out - lm(Result ~ AppealA + AppealsB + AppealC + AppealD + AppealE + Apply + ApplyAmount + Aprove + Closecase +

### Re: [R] generating symmetric matrices

At 16:29 30/07/2007, Gregory Gentlemen wrote: Douglas Bates [EMAIL PROTECTED] wrote: On 7/27/07, Gregory Gentlemen wrote: Greetings, I have a seemingly simple task which I have not been able to solve today. I want to construct a symmetric matrix of arbtriray size w/o using loops. The

### Re: [R] reading and storing files in the workspace

try: for (i in test){ assign(gsub(.txt$, , i), read.table(i, header=TRUE)) } On 7/31/07, Luis Ridao Cruz [EMAIL PROTECTED] wrote: R-help, I have a vector containing (test) some file names. The files contents are matrixes. test [1] aaOki.txtaOki.txt bOki.txt c1Oki.txt

### Re: [R] italic greek symbols

Thank you for this simple solution. It works well in R.app (R 2.5.1 GUI 1.20 (4535) (4535)), but I can't figure out how to make it work in my Aquamacs+ESS. When I attempt to set the locale, I get an error message. Any thoughts are appreciated. Sys.setlocale(LC_CTYPE, greek) [1] Warning

### Re: [R] extract columns of a matrix/data frame

On Tue, 2007-07-31 at 11:47 -0700, yuvika wrote: Hello, Thanks for the immediate help. However, I have a question for you. let's say the matrix looks like this name a1 a2 b1 b2 c1 c2 04 2 7 8 1 2 03 6 9 2 29

### [R] Linear model without an intercept

I would like to run a regression analysis without a constant (intercept) or a special one-way within-subject (repeated-measures) ANOVA. I'm not sure if the following command lines are correct or not: m1 - lme(Resp ~ Cond - 1, random = ~ Cond - 1 | Subj, TestData) or, m2 - lmer(Resp ~ Cond

### [R] Naming rows/columns in a 3 dimensional array/dataframe

Can I assign names to rows/columns in a i x k x j matrix / dataframe? This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, please telephone or email the sender and delete this message and any

### Re: [R] Error message when running lm() with na.action=NULL

Sorry, I forgot to reply to all. See Patrick suggestion below. I also got another idea from Julian Faraway's book on R res - rep(NA,153) res[as.numeric(row.names(na.omit(airquality)))] - gl$res where gl was a regression and airquality the data. Thanks, Fabian -Original Message-

### Re: [R] contrasts error message in lm

On Tue, 2007-07-31 at 21:28 +0200, A Serebrenik wrote: Dear all, I would like to find a linear regression model for a rather large dataset (27 independent variables). However, when I run lm the following error is reported: out - lm(Result ~ AppealA + AppealsB + AppealC + AppealD +

### [R] aggregate.data.frame - prevent conversion to factors? show statistics for NA values of by variable?

I have a two question regarding the aggregate.data.frame method of the aggregate function. My situation: a. My x variable is a data.frame (mydf) with two columns, both columns of type/format numeric. b. My by variable is a data.frame(mybys) with two columns, both columns of type/format

### Re: [R] contrasts error message in lm

On Tue, 31 Jul 2007, A Serebrenik wrote: Dear all, I would like to find a linear regression model for a rather large dataset (27 independent variables). However, when I run lm the following error is reported: out - lm(Result ~ AppealA + AppealsB + AppealC + AppealD + AppealE + Apply +

### Re: [R] italic greek symbols

On Tue, 31 Jul 2007, Martin Henry H. Stevens wrote: Thank you for this simple solution. It works well in R.app (R 2.5.1 GUI 1.20 (4535) (4535)), but I can't figure out how to make it work in my Aquamacs+ESS. When I attempt to set the locale, I get an error message. Any thoughts are

### Re: [R] Naming rows/columns in a 3 dimensional array/dataframe

On Tue, 2007-07-31 at 19:03 +0100, Garavito,Fabian wrote: Can I assign names to rows/columns in a i x k x j matrix / dataframe? You can use an array: ARR - array(1:18, c(3, 3, 3), dimnames = list(LETTERS[1:3], LETTERS[4:6], LETTERS[7:9])) ARR , , G D E F A 1 4 7 B 2 5 8 C 3 6

### Re: [R] Data mining tools

Hi Gérald, I can't help you directly, but you haven't yet had a reply, so... Googling, as you have found, will waste your time if you know more that you Google for. Clementine's quite unusual --- in the field of statistical methods --- so target that. Take the main Stats methods journals and

### [R] MTBF Reliability calculations

I'm working on a project involving reliability values (known failure rates) for a system with approximately 700 components with a set cconfiguration. I'm looking to compute a parts-count MTBF (mean time between failures) for the system. (See also MIL-HDBK-217) Is there anything in R that

### Re: [R] 'non-standard' folder names in R package

Oops, somehow I missed that part. Thank you very much! Tao From: Uwe Ligges [EMAIL PROTECTED] To: Tao Shi [EMAIL PROTECTED] CC: r-help@stat.math.ethz.ch Subject: Re: [R] 'non-standard' folder names in R package Date: Tue, 31 Jul 2007 11:52:10 +0200 Tao Shi wrote: Hi list, I use a .xml

### [R] Nonlinear optimization with constraints

Hello R community, I am using R for creating a model using optimization. I would like to ask if there is R-function/package for solving the problem below: Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) - 1)), for each i = 1, ..., n. subject to Ai1 x1 + Ai2 x2 + ... + Ajm xm - bi

### Re: [R] Nonlinear optimization with constraints

Hello R community, I am sorry for the previous accidental posting as I pressed a wrong key. I am using R for creating a model using optimization. I would like to ask if there is R-function/package for solving the problem below: Minimize sum(abs(exp^(Ai1 x1 + Ai2 x2 + ... + Aim xm - bi) -

### [R] Solve matrix with constraints using sum of squares

I'm trying to solve a system of equations for A and B: 37.07*A + 0.07*B - 36.73*C ~= 0 2.68*A + 24.75*B - 275.77*C ~= 0 The LHS is the product of 2*3 and 3*1 matrices. Constraints: A+B=1 0=A,B=1 C=1 I want to minimise the sum of squares of the equations together. The R function solve can

### Re: [R] line widths of plotting symbols in the lattice

On 7/31/07, Uwe Ligges [EMAIL PROTECTED] wrote: Stephen Tucker wrote: Dear List, Sorry, this is very simple but I can't seem to find any information regarding line widths of plotting symbols in the lattice package. For instance, in traditional graphics: plot(1:10,lwd=3)

### [R] R on QNX

Hi, Has anyone attempted to compile R on QNX 4.x or 6.x ? It would be particularly cool if there is a precompiled version somewhere on the QNX software archives. Thank you very much !! Suresh ps. Please cc replies to my address if possible...

### [R] [R-pkgs] New R package sqldf

sqldf is an R package for running SQL select statements on one or more R data frames. It is optimized for convenience making it useful for ad hoc queries against R data frames. Given an SQL select statement whose tables are the names of R data frames it: - sets up the database (by default it