Re: [R] [Hmisc] latex() with ctable=T inserting unwanted empty line in .tex file when used on summary.formula(method="reverse") object

2009-08-19 Thread Dieter Menne
Vincent Chouraki wrote: > > > When I'm using Hmisc's latex() function with ctable=TRUE on a > summary.formula with method="reverse" object and saving in a .tex file, > the latter contains an unwanted empty line which makes compilation fail. > > > ... Example removed > Vincent, I checked

Re: [R] Embedding lists in matrices and matrices in lists

2009-08-19 Thread Petr PIKAL
Hi Michael Kogan napsal dne 19.08.2009 17:22:04: > Thanks, that was the solution! But in fact I didn't want to have this > "list of lists" layer at all. And now I'm having trouble writing > matrices into the database. It's really really strange... If I write a > matrix into the database man

[R] Unable to load RHtestV2

2009-08-19 Thread bpasakhala
Dear All, I am not being able to load RHtestV2 or rhtest_gui.r for homogeneity test of climatic data. I have 2 user manual RHTest (0.95) and RHtestV2. Though, I load source code for RHtestV2 no any other window pops up. However, I am unable to find source code rhtest_gui.r. Regards, Binaya Pa

Re: [R] scale or not to scale that is the question - prcomp

2009-08-19 Thread Petr PIKAL
OIS Thank you both for pointing me to it. I did not notice this as the unscaled position of points was quite clear and strightforward according to my knowledge of data. The scaled plot is slightly more distorted and the relationships are not so obvious. Thank you both Petr Pikal petr.pi...@pr

Re: [R] Re ad and merge a number of .xls files into one dataframe

2009-08-19 Thread rajclinasia
christiaan pauw-2 wrote: > > Hi everybody > I have a large number of Excel speadsheets that I want to merge into one R > dataframe to process. I can read them one by one with read.xls but I > really > need a function to read a whole directory at once and merge the columns > with > the same name

Re: [R] three dimensions barchart

2009-08-19 Thread Liviu Andronic
On 8/20/09, Yichih Hsieh wrote: > All help high appreciated. > Try library(fortunes) fortune("3-D") fortune("Excel") Issue the last two commands several times. Liviu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] three dimensions barchart

2009-08-19 Thread Yichih Hsieh
Dear David, webpage is no problem. Figures 6.4 and 6.15's code can graph 3D bar chart, I just not sure, will it work for histogram too? Thanks for your consideration. All help high appreciated. best, yichih 2009/8/19 David Winsemius > > On Aug 19, 2009, at 7:44 AM, Yichih Hsieh wrote: > >

[R] Read and merge a number of .xls files into one dataframe

2009-08-19 Thread christiaan pauw
Hi everybody I have a large number of Excel speadsheets that I want to merge into one R dataframe to process. I can read them one by one with read.xls but I really need a function to read a whole directory at once and merge the columns with the same name into a single dataframe. here is what I hav

[R] lattice xyplot strip colors and location

2009-08-19 Thread Ajay, Shankar Ajay (NIH/NHGRI) [F]
Hi all, I've been trying (unsuccessfully) to modify an xyplot I created using the lattice package. I would like to change default strip colors and locations. I started with numeric data in 4 columns, which look like this: 0.252 1 32 0.252 2 30 0.252 3

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Rnewbie
I read the boxplot() help file and googled before making the post, and with my little knowledge on R I was not able to plot in the way I wanted. That’s why I made the post. Whether I can eventually solve the problem or not, I appreciate very much any help. I’m a very beginner of R, and found the

Re: [R] Mix font families in a single label?

2009-08-19 Thread Paul Murrell
Hi I can't necessarily do elegant, but see https://stat.ethz.ch/pipermail/r-help/2009-August/208092.html (Solution 4) for an example of setting up two different fonts within a single font "family" on PDF (PostScript is very similar) and using plotmath to produce text that uses the two different

Re: [R] ANCOVA with defined error terms

2009-08-19 Thread Richard M. Heiberger
track.aov <- aov(mice ~ coon + block*veget*fruit*time - block:veget:fruit:time + Error(block/plot), data = track) anova(track.aov) I think this is what you are looking for. This model in words says, What is the effect of the four-way crossing after adjusting fo

Re: [R] Basic question: Reading in multiple choice question responses to a single column in data frame

2009-08-19 Thread Damion Dooley
Slight addendum. Working from your code, I found 1 line of code does the conversion: myColumn = unlist(strsplit(as.character(myData[[myQuestion]]),",")); But the dataframe you set up may prove more useful. Regards, Damion -Original Message- From: Magnus Torfason [mailto:zuluti

Re: [R] Basic question: Reading in multiple choice question responses to a single column in data frame

2009-08-19 Thread Damion Dooley
Hi, Magnus, I discovered that multis = strsplit(as.character(d$b),",") Works in the example you gave. Thanks very much, looks like that's the way I'll go for now. P.s. for those others who may want, my selected column was plugged in as myData=read.delim(myDataFile etc.

[R] ANCOVA with defined error terms

2009-08-19 Thread hpdutra
I am trying to run an ANCOVA with defined error terms. Thus I have to use AOV and not lm. my response variable is proportion of mice paw prints on track plates. These plates were placed on plots that had vegetation and fruit manipulated to two levels each (present or absent), and were sampled mo

[R] ggsave to .png bug in ggplot2 (?)

2009-08-19 Thread Chris Friedl
Text is really small and legend boxes are huge in this plot when saved to .png with ggsave. Plot is correct (i.e. looks the same as the screen) when saved with dev.print. Saving to .pdf with ggsave give the correct output. I'm a noob at ggplot2 so this may be user error rather than a bug. However

[R] Calculating loess value

2009-08-19 Thread Noah Silverman
Hello, I'm attempting to evaluate the accuracy of the probability predictions for my model. As previously discussed here, the AUC is not a good measure as I'm not concerned with classification accuracy but probability accurcy. It was suggested to me that the loess function would be a good m

Re: [R] ggplot2 legend problem

2009-08-19 Thread Chris Friedl
Thanks Hadley, Thierry for clearing up my misuse of the command syntax. Thierry, the more I try the density plot, the more I see that it is right for my application. Good call. Be Well and Happy Always Chris ONKELINX, Thierry wrote: > > Dear Chris, > > First of all I would go for the density

Re: [R] Command line option to an R script running through Rscript

2009-08-19 Thread David Winsemius
On Aug 19, 2009, at 9:21 PM, Peng Yu wrote: Hi, I know that I can use the following script to get the command line options for an R script. But the output shows two many irrelevant That would be "too many". arguments. For example, I only want to pass "a", "b" and "c" to the script. The fir

[R] Command line option to an R script running through Rscript

2009-08-19 Thread Peng Yu
Hi, I know that I can use the following script to get the command line options for an R script. But the output shows two many irrelevant arguments. For example, I only want to pass "a", "b" and "c" to the script. The first 5 elements in the variable 'args' are not what I want. I am wondering what

Re: [R] Sweave truncation

2009-08-19 Thread Duncan Mackay
Peter Thank you for the information. I accidentally deleted Ken's post without having read it. Ken' s thought is great but as you said awful to implement I thought that capture.output would come in handy some time when I first saw it on an unrelated reply. Just thought :- the latex listings p

Re: [R] joining two points in rgl

2009-08-19 Thread Duncan Murdoch
On 19/08/2009 3:51 PM, Nair, Murlidharan T wrote: I tried the following library(rgl) pts<-structure(list(x = c(-0.975688, -0.975688), y = c(9.258795, -9.258795), z = c(-1.8, 1.8)), .Names = c("x", "y", "z"), class = "data.frame", row.names = c(NA, -2L)) plot3d(pts$x,pts$y,pts$z, col="grey", si

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Rolf Turner
On 20/08/2009, at 12:41 PM, S Ellison wrote: The OP asked how to plot mild and extreme outliers with distinct plotting symbols. ... In fact it can't be done! I hate to contradict (yeah, right! ;-) ) but actually the basic info needed for distinguishing different extents of outlier is availab

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Gabor Grothendieck
I agree its not completely obvious from that answer but that does not mean the responder deserves to be attacked. The circle part is actually the default and albeit with difficulty the help files do give the info we need to produce this: bp <- boxplot(c(1:50, 80, 100, 200), outpch = NA) with(bp,

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread S Ellison
>The OP asked how to plot mild and extreme outliers >with distinct plotting symbols. ... >In fact it can't be done! I hate to contradict (yeah, right! ;-) ) but actually the basic info needed for distinguishing different extents of outlier is available in the help files if you read through suffic

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Rolf Turner
On 20/08/2009, at 11:29 AM, Gabor Grothendieck wrote: I agree that the ?boxplot answer was reasonable and appropriate This must be some use of the words ``reasonable'' and ``appropriate'' with which I am not familiar since the answer was seriously misleading and would

[R] how to compute this summation...

2009-08-19 Thread kathie
Dear R users, I try to compute this summation, http://www.nabble.com/file/p25054272/dd.jpg where f(y|x) = Negative Binomial(y, mu=exp(x' beta), size=1/alp) http://www.nabble.com/file/p25054272/aa.jpg http://www.nabble.com/file/p25054272/cc.jpg In fact, I tried to use "do.call" function

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Rolf Turner
I despair. Why do you keep insisting that black is white? The OP wanted to be able to specify an argument to boxplot() that would cause it to plot mild and extreme outliers with different symbols. THIS CAN'T BE DONE!!! There is no such argument specification. The response to which I

Re: [R] PowerCut Killed R - is my code retrievable?

2009-08-19 Thread S Ellison
>>> "Polwart Calum (County Durham and Darlington NHS Foundation Trust)" 08/19/09 10:57 PM >>> >is there a better way for the future? Use a text editor or something specific to R like Tinn-R and _save early and often_. Even if your editor has an autosave. And use savePlot on your graphs too, from

Re: [R] how do i vectorize relational queries in R

2009-08-19 Thread Don MacQueen
Does merge(data,meta) give what you want? FWIW: "append" to a dataframe would normally mean to add more rows (or at least that's how I use it), but you appear to be adding a column. "data" is the name of an R function, best avoided for other uses. You're assigning the column names the har

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Gabor Grothendieck
I agree that the ?boxplot answer was reasonable and appropriate and there is nothing to prevent someone else from spending more time on an even more detailed answer or different answer if they wish. Many questions to r-help are answered by multiple people and the different approaches can be interes

Re: [R] Several simple but hard tasks to do with R

2009-08-19 Thread Bert Gunter
Rakknar: I believe your subject line characterization reflects your ignorance of R, rather than its inherent limitations. 1. logs. help.search("history") and ?savehistory shows you that R does exactly what you want very easily (depending on the platform, which contrary to the posting guide's requ

Re: [R] PowerCut Killed R - is my code retrievable?

2009-08-19 Thread Ted Harding
On 19-Aug-09 22:35:01, Barry Rowlingson wrote: > On Wed, Aug 19, 2009 at 10:57 PM, Polwart Calum (County Durham and > Darlington NHS Foundation Trust) wrote: >> I've been tweaking code for several days on and off in R, cut and >> pasting in from a text editor (I just leave them open all the time).

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Noah Silverman
Ding! We have a winner :) Thanks Max, that's exactly the problem. I don't know how I missed that. I'm looking for different modeling functions to try for best predictive results. An SVM isn't bad, but I'm looking for more. The RVM sounded interesting, but I guess it won't work for my applic

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Gavin Simpson
On Thu, 2009-08-20 at 09:58 +1200, Rolf Turner wrote: > On 20/08/2009, at 9:39 AM, Gavin Simpson wrote: > > > > > Criticising correct, if cryptic or highlevel, responses to a list > > where > > people give their time for free, *and* not provide a more complete > > solution is unfair, Rol

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Max Kuhn
I think that the issue is that this version of rvm is only for regression (and, if I understood correctly, you are passing class labels). Max On Aug 19, 2009, at 6:36 PM, David Winsemius wrote: On Aug 19, 2009, at 6:30 PM, Noah Silverman wrote: Thanks David, Then, do you have any

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread David Winsemius
On Aug 19, 2009, at 6:30 PM, Noah Silverman wrote: Thanks David, Then, do you have any clue why RVM or LSSVM would be generating an error? No. My original post was: "When running RVM or LSSVM on the exact same data as the SVM{e1071}, I get an error that I don't understand: Error in

Re: [R] how do i vectorize relational queries in R

2009-08-19 Thread jim holtman
Is this what you want: > data$Stratum <- meta$Stratum[data$Sample] > data Sample Score Stratum 1 1 2Tree 2 1 2Tree 3 1 2Tree 4 2 2Tree 5 2 2Tree 6 2 2Tree 7 3 2 Shrub 8 3 2 Shrub 9 3 2

Re: [R] Hello

2009-08-19 Thread David Winsemius
On Aug 19, 2009, at 6:24 PM, dimple thyagarajan wrote: Hello! I am trying to merge two xy-plot with different ylimits. Can someone please give me possible way of achieving it.. You cannot possibly be using a function named xy-plo. The particular function you have chosen will be critical t

Re: [R] PowerCut Killed R - is my code retrievable?

2009-08-19 Thread Barry Rowlingson
On Wed, Aug 19, 2009 at 10:57 PM, Polwart Calum (County Durham and Darlington NHS Foundation Trust) wrote: > I've been tweaking code for several days on and off in R, cut and pasting in > from a text editor (I just leave them open all the time).  I think I got > something that was usable but then

Re: [R] Hello

2009-08-19 Thread jim holtman
generate the plot with the limit of both ranges and then add the second with 'lines' plot(x1,y1,ylim=range(y1, y2)) lines(x2,y2) On Wed, Aug 19, 2009 at 6:24 PM, dimple thyagarajan wrote: > Hello! > > I am trying to merge two xy-plot with different ylimits. > > Can someone please give me possible

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Noah Silverman
Thanks David, Then, do you have any clue why RVM or LSSVM would be generating an error? My original post was: "When running RVM or LSSVM on the exact same data as the SVM{e1071}, I get an error that I don't understand: Error in .local(x, ...) : kernel must inherit from class 'kernel' " Any su

[R] Hello

2009-08-19 Thread dimple thyagarajan
Hello!   I am trying to merge two xy-plot with different ylimits.   Can someone please give me possible way of achieving it..   Thank you Regards Dimple [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://st

[R] how do i vectorize relational queries in R

2009-08-19 Thread chipmaney
I am basically trying to append a value(vector) to one dataframe using a relational value from another dataframe. Obviously, I can use a loop to accomplish this. However, is there a way to vectorize it? Example: > data <- data.frame(c(1,1,1,2,2,2,3,3,3),rep(2,9)); names(data) <- > c("Sample","

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread David Winsemius
On Aug 19, 2009, at 6:11 PM, Noah Silverman wrote: Steve, Not sure what to do with this. I have a data.frame. Don't know how to convert it to a list. A data.frame is a list. Does anybody else have any input on this? On 8/19/09 12:17 PM, Steve Lianoglou wrote: Steve, That makes sens

[R] Several simple but hard tasks to do with R

2009-08-19 Thread Rakknar
Hello everybody. I've been learning R for about a month to do a econometric study and now i'm stuck with some problems to make R do the things I want. Here I give the list of things I wanna do from the most simple to the more complex (for me of course): 1. Make a log. I've been using Stata an

Re: [R] need help for t.test using "by"

2009-08-19 Thread 1Rnwb
Thanks for the reply, and sorry for not being clear, I have ELISA data for 50 plates, equal number of disease and control samples are located on each plates. I need to do the ttest between each proteins listed as prt1, prt2... prt50 on all the plates 1-50, however for some proteins i have data for

Re: [R] glm.nb versus glm estimation of theta.

2009-08-19 Thread hesicaia
Bill.Venables wrote: > > Whoa! Just hang on a minute. > > theta is NOT the dispersion parameter. Under the NB model, the variance > of an observation is mu+mu^2/theta, so that's how theta enters the > picture. The smaller theta is the larger the variance. > > glm(..., family = negative.bi

Re: [R] PowerCut Killed R - is my code retrievable?

2009-08-19 Thread Rolf Turner
On 20/08/2009, at 9:57 AM, Polwart Calum (County Durham and Darlington NHS Foundation Trust) wrote: I've been tweaking code for several days on and off in R, cut and pasting in from a text editor (I just leave them open all the time). I think I got something that was usable but then a

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Noah Silverman
Steve, Not sure what to do with this. I have a data.frame. Don't know how to convert it to a list. Does anybody else have any input on this? On 8/19/09 12:17 PM, Steve Lianoglou wrote: >> Steve, >> >> That makes sense, except that x is a data.frame with about 70 >> columns. So I don't see

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Rolf Turner
On 20/08/2009, at 9:39 AM, Gavin Simpson wrote: Criticising correct, if cryptic or highlevel, responses to a list where people give their time for free, *and* not provide a more complete solution is unfair, Rolf. The OP is free to respond and ask for additional help once they've giv

[R] PowerCut Killed R - is my code retrievable?

2009-08-19 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
I've been tweaking code for several days on and off in R, cut and pasting in from a text editor (I just leave them open all the time). I think I got something that was usable but then a powersurge tripped the fuses and unfortunately the machine I was working on doesn't have a UPS. Does R hold

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread David Winsemius
On Aug 19, 2009, at 3:17 PM, Steve Lianoglou wrote: Steve, That makes sense, except that x is a data.frame with about 70 columns. So I don't see how it would convert to a list. Yeah ... not sure if that's what happening (R class relationships/ testing is still a bit of a mystery to me),

Re: [R] visualizzazione colonne

2009-08-19 Thread Liviu Andronic
On 8/19/09, Greg Snow wrote: > Add ?View (note the capitol V) to the list. > There is also showData() in library(relimp), and object.browser() from within JGR. The "Data Viewer" in Deducer is also an option, but may currently be slow for large data frames. Liviu __

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Gavin Simpson
On Wed, 2009-08-19 at 13:49 -0700, Bert Gunter wrote: > Rolf: > > Not sure what "reasonably thorough" means but: > > ? boxplot says: Exactly Bert, the info is there is you want to look and do so hard enough. However, it is perhaps expecting quite a lot of a new useR to put this together from ?b

[R] Contrasts within ANOVA frame (Repost)

2009-08-19 Thread Jun Shen
Would like to try my luck to see if I can catch your eyes. I was trying to do some contrasts within ANOVA. I searched the archive and found a clue posted by Steffen Katzner ( http://tolstoy.newcastle.edu.au/R/help/06/01/19385.html) I have three levels for a factor names "StdLot" and want to make

Re: [R] help simplifying complex graphic arguments to a function

2009-08-19 Thread Paul Murrell
Hi The "standard" approach of having graphics parameter arguments separate from the data arguments is a little bit creaky. The relationship between the nth data value and the nth graphics parameter only really exists in your head. It would feel much safer if you could specify the graphics p

Re: [R] a naive question

2009-08-19 Thread Bogdan Tanasa
Thank you gentlemen, I really appreciate all the comments On Wed, Aug 19, 2009 at 2:19 PM, Bert Gunter wrote: > Bogdan: > > I believe your query demonstrates the hazards of jumping into R without > first making an effort to read at least some of the supporting docs -- in > this case, I think, "A

Re: [R] a naive question

2009-08-19 Thread Bert Gunter
Bogdan: I believe your query demonstrates the hazards of jumping into R without first making an effort to read at least some of the supporting docs -- in this case, I think, "An Intro to R" would have sufficed. R is not a video game nor even Excel. It is very powerful and quite sophisticated soft

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Rolf Turner
On 20/08/2009, at 8:49 AM, Bert Gunter wrote: Rolf: Not sure what "reasonably thorough" means but: ? boxplot says: ... parsa list of (potentially many) more graphical parameters, e.g., boxwex or outpch; these are passed to bxp (if plot is true); for details, see there. Well, that s

Re: [R] trimming observations

2009-08-19 Thread David Winsemius
On Aug 19, 2009, at 2:22 PM, Juliane Struve wrote: Dear list, the trim argument in mean(x,trim=0.1) can be used to exclude a fraction of the observations when calculating the mean. There does not seem to be a trim argument for sd(), is there some other way of excluding observations when

Re: [R] a naive question

2009-08-19 Thread Jun Shen
read.table produces a data.frame (a special list) even when you have only one column. Try y<-as.numeric(x[[1]]) On Wed, Aug 19, 2009 at 3:59 PM, Bogdan Tanasa wrote: > Hi, and my apologies for the following very naive question : I would like > to > read a column of numbers in R and plot a histog

Re: [R] a naive question

2009-08-19 Thread Steve Lianoglou
Hi, On Aug 19, 2009, at 4:59 PM, Bogdan Tanasa wrote: Hi, and my apologies for the following very naive question : I would like to read a column of numbers in R and plot a histogram. eg : x<-read.table("txSTART"); y<-as.numeric(x); and I do obtain the error : Error: (list) object cannot be

[R] a naive question

2009-08-19 Thread Bogdan Tanasa
Hi, and my apologies for the following very naive question : I would like to read a column of numbers in R and plot a histogram. eg : x<-read.table("txSTART"); y<-as.numeric(x); and I do obtain the error : Error: (list) object cannot be coerced to type 'double'. Please could you let me know the

[R] ASA Stat. Computing & Stat. Graphics Student Paper Competition 2010

2009-08-19 Thread Fei Chen
Statistical Computing and Statistical Graphics Sections American Statistical Association Student Paper Competition 2010 The Statistical Computing and Statistical Graphics Sections of the ASA are co-sponsoring a student paper competition on the topics of Statistical Computing and Statistical

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Bert Gunter
Rolf: Not sure what "reasonably thorough" means but: ? boxplot says: ... parsa list of (potentially many) more graphical parameters, e.g., boxwex or outpch; these are passed to bxp (if plot is true); for details, see there. Well, that seems pretty clear to me, so I went to ?bxp to find in

[R] ASA John M. Chambers Statistical Software Award - 2010

2009-08-19 Thread Fei Chen
John M. Chambers Statistical Software Award - 2010 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 the Association

[R] [Hmisc] latex() with ctable=T inserting unwanted empty line in .tex file when used on summary.formula(method="reverse") object

2009-08-19 Thread vincent chouraki
Dear useRs, When I'm using Hmisc's latex() function with ctable=TRUE on a summary.formula with method="reverse" object and saving in a .tex file, the latter contains an unwanted empty line which makes compilation fail. Here is a brief example : library(Hmisc) test <- data.frame(a=sample(1:3

Re: [R] mild and extreme outliers in boxplot

2009-08-19 Thread Rolf Turner
On 20/08/2009, at 3:13 AM, Ottorino-Luca Pantani wrote: Rnewbie ha scritto: dear all, could somebody tell me how I can plot mild outliers as a circle(°) and extreme outliers as an asterisk(*) in a box-whisker plot? Thanks very much in advance ?boxplot or help(bxp) This is the sort o

Re: [R] Basic question: Reading in multiple choice question responses to a single column in data frame

2009-08-19 Thread Damion Dooley
Magnus, Looks like that solution should work, and I like the flexibility of your data output, but I get a "error in strsplit(d$b,","): non-character argument" at: multis = strsplit(d$b,",") Seems like the c() function converts integer looking items like "1" into integers and then strspli

Re: [R] Confidence interval on parameters from optim function

2009-08-19 Thread Greg Snow
If you f function is a likelihood (or better a log likelihood), then you can do profiling. Take the parameter of interest and change it a small amount from the optimal value, rerun optim with this value fixed and let it optimize over everything else. Repeat this for several values and see how

Re: [R] joining two points in rgl

2009-08-19 Thread Nair, Murlidharan T
I tried the following library(rgl) pts<-structure(list(x = c(-0.975688, -0.975688), y = c(9.258795, -9.258795), z = c(-1.8, 1.8)), .Names = c("x", "y", "z"), class = "data.frame", row.names = c(NA, -2L)) plot3d(pts$x,pts$y,pts$z, col="grey", size=2, box=FALSE, axes=TRUE, type="s") lines3d(pts$x

Re: [R] Best performance measure?

2009-08-19 Thread Frank E Harrell Jr
Noah Silverman wrote: Frank, Visually, the loess curve really helps me see how the model is doing. That leads me to two more questions: 1) Can I somehow summarize the loess curve into a single value? (If I'm comparing a few hundred models/parameters it would be nice to have a single "perfor

[R] why need a new database to store results generated from another database in filehash?

2009-08-19 Thread Sean Zhang
Dear R-Helpers: I am trying filehash and would like to know whether I have to create a new database to store results generated from another database. Example code is presented below to show the question. #R code below library(filehash) dbCreate("myDB1") db1 <- dbInit("myDB1") dbDelete

Re: [R] Basic question: Reading in multiple choice question responses to a single column in data frame

2009-08-19 Thread Magnus Torfason
Are you looking for something like this? > d = data.frame(a=1:5,b=c("1","2,3","2","3,4","1")) > d a b 1 1 1 2 2 2,3 3 3 2 4 4 3,4 5 5 1 > multis = strsplit(d$b,",") > counts = sapply(strsplit(d$b,","),length ) > d2 = data.frame( a=rep(d$a,counts), b=unlist(multis) ) > d2 a b 1 1

Re: [R] Best performance measure?

2009-08-19 Thread Noah Silverman
Frank, Visually, the loess curve really helps me see how the model is doing. That leads me to two more questions: 1) Can I somehow summarize the loess curve into a single value? (If I'm comparing a few hundred models/parameters it would be nice to have a single "performance" value to use.) 2

Re: [R] double precision

2009-08-19 Thread miller_2555
Duncan Murdoch-2 wrote: > > I believe the C99 standard doesn't require that a 64 bit signed integer > type exist (only one that is 64 bits or more), so that would likely > cause some headaches. And we may still use some compilers that are not > C99 compliant, which may not have any type that

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Steve Lianoglou
Steve, That makes sense, except that x is a data.frame with about 70 columns. So I don't see how it would convert to a list. Yeah ... not sure if that's what happening (R class relationships/ testing is still a bit of a mystery to me), but see: R> df <- data.frame(a=1:10,b=1:10) R> is(df)

Re: [R] Basic question: Reading in multiple choice question responses to a single column in data frame

2009-08-19 Thread Frank E Harrell Jr
You might look at the mChoice function in the Hmisc package for some indirect help. Frank Damion Dooley wrote: I'm using read.delim to successfully read in tab delimited data, but some columns' values are comma seperated, reflecting the fact that user chose a few answers on a multi-select ques

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Noah Silverman
Steve, That makes sense, except that x is a data.frame with about 70 columns. So I don't see how it would convert to a list. -N On 8/19/09 12:09 PM, Steve Lianoglou wrote: > Howdy, > > On Aug 19, 2009, at 2:54 PM, Noah Silverman wrote: > >> Hi Steve, >> >> No custom kernel. (This is the exact

[R] Basic question: Reading in multiple choice question responses to a single column in data frame

2009-08-19 Thread Damion Dooley
I'm using read.delim to successfully read in tab delimited data, but some columns' values are comma seperated, reflecting the fact that user chose a few answers on a multi-select question. I understand that each answer is its own category and so could be represented as a seperate column in the dat

Re: [R] Best performance measure?

2009-08-19 Thread Frank E Harrell Jr
Noah Silverman wrote: Frank, That makes sense. I just had a look at the actual algorithm calculating the Briar score. One thing that confuses me is how the score is calculated. If I understand the code correctly, it is just: sum((p - y)^2)/n If I have an example with a label of 1 and a

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Steve Lianoglou
Howdy, On Aug 19, 2009, at 2:54 PM, Noah Silverman wrote: Hi Steve, No custom kernel. (This is the exact same data that I call svm with. svm works without a complaint.) traindata is just a dataframe of numerical attributes trainlabels is just a vector of labels. ("good", "bad") Then I ca

Re: [R] Best performance measure?

2009-08-19 Thread Noah Silverman
Frank, That makes sense. I just had a look at the actual algorithm calculating the Briar score. One thing that confuses me is how the score is calculated. If I understand the code correctly, it is just: sum((p - y)^2)/n If I have an example with a label of 1 and a probability prediction of

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Noah Silverman
Hi Steve, No custom kernel. (This is the exact same data that I call svm with. svm works without a complaint.) traindata is just a dataframe of numerical attributes trainlabels is just a vector of labels. ("good", "bad") Then I call model <- rvm(x,y) On 8/19/09 11:50 AM, Steve Lianoglou w

Re: [R] Ridge regression [Repost]

2009-08-19 Thread Frank E Harrell Jr
Sabyasachi Patra wrote: Dear all, For an ordinary ridge regression problem, I followed three different approaches: 1. estimate beta without any standardization 2. estimate standardized beta (standardizing X and y) and then again convert back 3. estimate beta using lm.ridge() function X<-mat

Re: [R] Best performance measure?

2009-08-19 Thread Frank E Harrell Jr
Noah Silverman wrote: Thanks for the suggestion. You explained that Briar combines both accuracy and discrimination ability. If I understand you right, that is in relation to binary classification. I'm not concerned with binary classification, but the accuracy of the probability prediction

Re: [R] Erros with RVM and LSSVM from kernlab library

2009-08-19 Thread Steve Lianoglou
Hi, On Aug 19, 2009, at 1:27 PM, Noah Silverman wrote: Hello, In my ongoing quest to develop a "best" model, I'm testing various forms of SVM to see which is best for my application. I have been using the SVM from the e1071 library without problem for several weeks. Now, I'm interested

Re: [R] double precision

2009-08-19 Thread Duncan Murdoch
On 8/19/2009 1:49 PM, miller_2555 wrote: Roger Bivand wrote: On Tue, 5 Dec 2006, Yoni Schamroth wrote: Hi, I am attempting to query a data frame from a mysql database. One of the variables is a unique identification number ("numeric") 18 digits long. I am struggling to retrieve this variabl

Re: [R] Best performance measure?

2009-08-19 Thread Noah Silverman
Thanks for the suggestion. You explained that Briar combines both accuracy and discrimination ability. If I understand you right, that is in relation to binary classification. I'm not concerned with binary classification, but the accuracy of the probability predictions. Is there some kind of

[R] trimming observations

2009-08-19 Thread Juliane Struve
Dear list,   the trim argument in mean(x,trim=0.1) can be used to exclude a fraction of the observations when calculating the mean. There does not seem to be a trim argument for sd(), is there some other way of excluding observations when calculating the standard deviation ?   Many thanks for h

Re: [R] line plot

2009-08-19 Thread John Kane
Do you mean a dotchart? Example #== aa <- c(3,6,3,5,8) lbs <- LETTERS[1:5] dotchart(aa, pch=(16), col = 1:5, main="A Dotchart") axis(side = 2, seq_along(aa), lbs, las=1) #==

Re: [R] line plot

2009-08-19 Thread Jorge Ivan Velez
Dear Rafael, Here is a suggestion using plot(): set.seed(123) x <- rpois(100,10) plot(table(x)) HTH, Jorge On Wed, Aug 19, 2009 at 2:11 PM, Rafael Moral <> wrote: > Dear useRs, > > How can I draw a barplot, but instead of bars, I'd get lines? > > Thanks, > Kind regards, > Rafael. > > > > >

Re: [R] Error with acf/pacf functions

2009-08-19 Thread David Winsemius
On Aug 19, 2009, at 12:33 PM, tmakino wrote: Ok strangely both acf and pacf work with the xts object as long as the xts package hasn't been loaded. As soon as I load the package, I get the error again. tmakino wrote: I'm trying to apply a acf/pacf function to a xts object and get the

Re: [R] Urgent Help

2009-08-19 Thread John Kane
There are several ways to get data from Excl to R. One of the simplist ways is to save the data as a csv (comma seperated file) and read the data into R from that file using read.csv() Example read.csv(file="D:/Book1.csv", header=TRUE) --- On Wed, 8/19/09, Bin1aya wrote: > From: Bin1aya >

Re: [R] visualizzazione colonne

2009-08-19 Thread Greg Snow
Add ?View (note the capitol V) to the list. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Ottorino-Luca Pan

[R] line plot

2009-08-19 Thread Rafael Moral
Dear useRs, How can I draw a barplot, but instead of bars, I'd get lines? Thanks, Kind regards, Rafael. [[elided Yahoo spam]] [[alternative HTML version deleted]] __

Re: [R] Urgent Help

2009-08-19 Thread Stefan Grosse
On Wed, 19 Aug 2009 10:01:19 -0700 (PDT) Bin1aya wrote: B> I have done copy paste of climate data from excel file to notepad B> and tried to upload. I do not have any knowledge about programming B> languages. Please help me. There are better ways of importing data from Excel. Have a look at the

Re: [R] double precision

2009-08-19 Thread miller_2555
Roger Bivand wrote: > > On Tue, 5 Dec 2006, Yoni Schamroth wrote: > >> Hi, >> >> I am attempting to query a data frame from a mysql database. >> One of the variables is a unique identification number ("numeric") 18 >> digits >> long. >> I am struggling to retrieve this variable exactly without

Re: [R] lmer with random slopes for 2 or more first-level factors?

2009-08-19 Thread Jonathan Baron
Since nobody has answered yet, let me try. I'm not 100% sure. (So why bother? To check my own understanding.) On 08/18/09 20:47, Jason R. Finley wrote: > I have data from a design in which items are completely nested within > subjects. Subject is the only second-level factor, but I have >

  1   2   >