[R] Kerning of italic text in plotmath

2012-05-15 Thread Dennis Fisher
R 2.14.0 OS X and Windows Colleagues I am trying to add some italicized text to a graphic using the code that appears below. For the italic text, kerning is not ideal -- spacing between letters is larger than I expected. Is there a simple solution to this? Dennis plot(1, type="n", axes=F,

Re: [R] Kerning of italic text in plotmath

2012-05-15 Thread David Winsemius
On May 15, 2012, at 2:39 PM, Dennis Fisher wrote: R 2.14.0 OS X and Windows Colleagues I am trying to add some italicized text to a graphic using the code that appears below. For the italic text, kerning is not ideal -- spacing between letters is larger than I expected. Is there a simple

[R] Need your help setting $R_check_force_suggests = "FALSE" on Windows system

2012-05-15 Thread Zhiqiu Hu
r-help@r-project.org Dear friends, I want to make the following change of R setting on a windows 7 desktop. $R_check_force_suggests = "FALSE" Since I have no experience using Unix, I don't how to make the suggestions in "writing R extension" works for windows. I will appreciate if you would hel

[R] question about creating data frame

2012-05-15 Thread T Bal
Hello, My data is "study.txt": "Not A" "A" "Mathematics" 80 15 "Physics" 32 24 "Biology" 18 29 I want to transform this data into with column names 'course' and 'A': course A 1 Mathematics 1 2 Mathematics

[R] question about creating data frame

2012-05-15 Thread T Bal
Hello, My data is "study.txt": "A" "Not A" "Mathematics" 80 15 "Physics" 32 24 "Biology" 18 29 I want to transform this data into with column names 'course' and 'A': course A 1 Mathematics 1 2 Mathem

Re: [R] Kerning of italic text in plotmath

2012-05-15 Thread Fisher Dennis
David You missed the point -- the issue was not the spacing between WORDS. It was the spacing between LETTERS (as noted in the original email) Other suggestions would be helpful. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone: 1-866-PLessThan (1-866-753-7784) Fax: 1-866-PLessTha

Re: [R] Kerning of italic text in plotmath

2012-05-15 Thread baptiste auguie
For better typography, try tikzDevice, it uses LaTeX to render the text. b. On 16 May 2012 07:23, Fisher Dennis wrote: > David > > You missed the point -- the issue was not the spacing between WORDS.  It was > the spacing between LETTERS (as noted in the original email) > Other suggestions woul

Re: [R] Master data frame or so

2012-05-15 Thread jim holtman
It sounds like just a simple list object will do what you want. What you will have to specify is exactly what you thing the structure might contain and then how you want to access it, and then possibly how you want to update it on an ongoing basis. On Tue, May 15, 2012 at 11:33 AM, I.R. Holtman

Re: [R] Kerning of italic text in plotmath

2012-05-15 Thread Bert Gunter
I believe that this depends on the font in use and the graphics engine doing the rendering, which I believe may depend on the OS. You supplied none of this information -- it _is_ asked for in the posting guide -- but you might try changing your fonts,font size, and/or graphics device to see whethe

Re: [R] help

2012-05-15 Thread Baoqiang
Package "mutoss" seems have Bonferroni correction. Sent from my iPhone On May 15, 2012, at 9:34 AM, 杨秀芬 wrote: > To whom this may concern, > > I have been learing R software. Recently when I did the analysis of the > associaiton of SNPs and disease, I have met one problem with Bonferroni > cor

Re: [R] question about creating data frame

2012-05-15 Thread jim holtman
try this: > x <- read.table(text = '"Not A" "A" + "Mathematics" 80 15 + "Physics" 32 24 + "Biology" 18 29', skip = 1, as.is = TRUE) > > # create the result > result <- do.call(rbind, lapply(1:nrow(x), function(.row){ + data.frame(course = x$V1[.row] + , A = c(rep(1, x$V2[.row]), rep(0

Re: [R] How to interpret an ANOVA result?

2012-05-15 Thread Robert Latest
On Tue, May 15, 2012 at 1:59 PM, Bryan Hanson wrote: > I see that no one has replied on this, so I'll take a stab. Hi, Ryan! > This is probably a matter of personal taste, but I would suggest a somewhat > different and simpler approach.  What you have done is not strictly an ANOVA, > it's a li

[R] How to include known errors in a regression?

2012-05-15 Thread Robert Latest
Hello all, I have a bunch of aggregated measurement data. The data describe two different physical properties that correlate, and I want to estimate the coefficients (slope and intercept) from the dataset. This is of course easy, I've done it, and I got the expected result. But here's the thing:

[R] Problem to resolve a step for reading a large TXT and split in several file

2012-05-15 Thread gianni lavaredo
Dear Researchs, It's the first time I am trying to resolve this problem. I have a TXT file with 1408452 rows. I wish to split file-by-file where each file has 1,000,000 rows with the following procedure: # split in two file one with 1,000,000 of rows and one with 408,452 of rows file <- "09G001_

Re: [R] Kerning of italic text in plotmath

2012-05-15 Thread David Winsemius
On May 15, 2012, at 3:23 PM, Fisher Dennis wrote: David You missed the point -- the issue was not the spacing between WORDS. Or perhaps the point was obscured by your extraneous code. It was the spacing between LETTERS (as noted in the original email) Other suggestions would be helpful.

[R] Regression Analysis or Anova?

2012-05-15 Thread Andrea Sica
Dear all, I hope to be the clearest I can. Let's say I have a dataset with 10 variables, where 4 of them represent for me a certain phenomenon that I call Y. The other 6 represent for me another phenomenon that I call X. Each one of those variables (10) contains 37 units. Those units are just the

Re: [R] Odd behaviour of identical()

2012-05-15 Thread math_daddy
Thanks. I was not aware of these subtleties of R, but then again I'm no expert. I had to use isTRUE(all.equal(vec,c(0,0))), but it seems to be working now. Thanks again. -- View this message in context: http://r.789695.n4.nabble.com/Odd-behaviour-of-identical-tp4630118p4630170.html Sent from t

[R] Reading Excel Formulas as values

2012-05-15 Thread Mike Smith
When I read excel files using the read.xlsx() command any cells that have formulas in them come up as NA. Is there a way to read just the numeric value of the cell without using the "paste value" command in Excel? I need to read in hundreds of Excel spreadsheets and compile them into one large su

Re: [R] Reading Excel Formulas as values

2012-05-15 Thread R. Michael Weylandt
It sounds like this might actually make more sense to do in VBA and not R (gasp!) if your only goal is to have excel in --> excel out. [UNTESTED] As far as a workaround if you really want to do this in R, perhaps you can specify that you want character vectors everywhere and your connection client

Re: [R] Reading Excel Formulas as values

2012-05-15 Thread Gabor Grothendieck
On Tue, May 15, 2012 at 4:11 PM, Mike Smith wrote: > When I read excel files using the read.xlsx() command any cells that have > formulas in them come up as NA. > > Is there a way to read just the numeric value of the cell without using the > "paste value" command in Excel?  I need to read in hund

[R] double buffering in windows() not working

2012-05-15 Thread Daniel Carr
I have doubled buffered animations that I show in class. They used to work but now flash. The default windows() option is buffered = TRUE. Just in case, I tried using windows( buffered = TRUE) but this made no difference. I am not sure when the change occurred. An older R2.11 version in one cla

Re: [R] Reading Excel Formulas as values

2012-05-15 Thread Peter Alspach
Tena koe Mike Another alternative to those already given is to use the RODBC package. HTH Peter Alspach. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mike Smith Sent: Wednesday, 16 May 2012 8:11 a.m. To: r-help@r-project.

Re: [R] Lattice: Add abline to Single Value qqmath() Plot

2012-05-15 Thread Rich Shepard
On Tue, 15 May 2012, David L Carlson wrote: qqmath(~ rnorm(100), panel = function(x, ...) { panel.qqmathline(x, ...) panel.qqmath(x, ...) }) David, I have 130 plots to produce (30 chemicals un-transformed and three transformations). The R console insists that I retype each of the 6

Re: [R] Lattice: Add abline to Single Value qqmath() Plot

2012-05-15 Thread ilai
On Tue, May 15, 2012 at 4:19 PM, Rich Shepard wrote: > On Tue, 15 May 2012, David L Carlson wrote: > > David, > >  I have 130 plots to produce (30 chemicals un-transformed and three > transformations). The R console insists that I retype each of the 6 lines > (adding a prepanel.qqmathline line) ea

[R] confidence intervals for nls or nls2 model

2012-05-15 Thread Francisco Mora Ardila
Hi all I have fitted a model usinf nls function to these data: > x [1] 1 0 0 4 3 5 12 10 12 100 100 100 > y [1] 1.281055090 1.563609934 0.001570796 2.291579783 0.841891853 [6] 6.553951324 14.243274230 14.519899320 15.066473610 21.728809880 [11] 18.553054450 23.722637370

[R] How to use the value of "rect" to determine the location of legend

2012-05-15 Thread Gundala Viswanath
Given the attached plot, how can I locate the center text with "Mean and SD" so that it can be placed exactly under "---emp".? The current code I have is this: L = list(bquote(Em.Mean ==.(new_avg)),bquote(Em.SD==.(new_std)), bquote(Th.Mean ==.(theor_avg)), bquote(Th.SD==.(theor_sd))) leg

Re: [R] confidence intervals for nls or nls2 model

2012-05-15 Thread David Winsemius
On May 15, 2012, at 8:08 PM, Francisco Mora Ardila wrote: Hi all I have fitted a model usinf nls function to these data: x [1] 1 0 0 4 3 5 12 10 12 100 100 100 y [1] 1.281055090 1.563609934 0.001570796 2.291579783 0.841891853 [6] 6.553951324 14.243274230 14.519899320

Re: [R] Lattice: Add abline to Single Value qqmath() Plot

2012-05-15 Thread Rich Shepard
On Tue, 15 May 2012, ilai wrote: Apologies in advance if I misinterpret " R console insists that I retype ..." but actually makes more sense (than sourcing a script) to use the group argument (see the last example in ?qqmath) as in 4 groups in each of 30 panels, or allow.multiple=T, outer=T if y

Re: [R] confidence intervals for nls or nls2 model

2012-05-15 Thread Francisco Mora Ardila
On Tue, 15 May 2012 20:33:02 -0400, David Winsemius wrote > On May 15, 2012, at 8:08 PM, Francisco Mora Ardila wrote: > > > Hi all > > > > I have fitted a model usinf nls function to these data: > > > >> x > > [1] 1 0 0 4 3 5 12 10 12 100 100 100 > > > >> y > > [1] 1.281055090 1.5

[R] Last element of a vector by group

2012-05-15 Thread Axel Urbiz
Dear List, How can I get a logical vector as shown by a.ord.last below (i.e., it is FALSE whenever there are subsequent equal values of an ordered vector and FALSE otherwise)? a <- c(1,1,2,1,3,4,3,5,6) a.ord <- a[order(a)] a.ord a.ord.last <- c(F, F, T, T, F, T, T, T, T) Thanks for any help

Re: [R] Last element of a vector by group

2012-05-15 Thread R. Michael Weylandt
? duplicated !duplicated(a.ord, fromLast = TRUE) HTH, Michael On Tue, May 15, 2012 at 9:37 PM, Axel Urbiz wrote: > Dear List, > > How can I get a logical vector as shown by a.ord.last below (i.e., it is > FALSE whenever there are subsequent equal values of an ordered vector and > FALSE otherwi

Re: [R] write data using xlsReadWrite

2012-05-15 Thread diyanah
Thank you, I came up with these. Problem solve. varValue <- data.frame(varLH2x, varLH2y, varHH2x, varHH2y, varLL2x, varLL2y, varHL2x, varHL2y) res<-write.xlsx(varValue, "D:\\FYP\\image\\Cropped Images\\user61\\genuineUser61temp.xlsx", sheetName="Sheet1",col.names=TRUE, row.names=TRUE, append=FALS

[R] vector w/o arithmetic addition for boxplot

2012-05-15 Thread rl269
Hello, I am having trouble asking R to read individual numeric vectors for a box plot of the residuals of a linear regression. It is performing arithmetic addition on the 16 individual variables that I want individual box plots for. I have 16 race*treatment variables that were created from clea

[R] vars plot predicted values on original scale

2012-05-15 Thread maria31
Hi all! I´m using vars package to model several pairs of time series; in future I have to do multivar with sets of dimension 10 to 30 series; As I have to transform data (usually log and 1diff ) in order to apply VAR(p) I wonder if there´s any function to plot or print predicted values on original

Re: [R] Discrete choice model maximum likelihood estimation

2012-05-15 Thread infinitehorizon
Hello John, Thanks for your response. Can you explain why it is better to use NM or nmk instead of optim? By the way, my original model consists 24 parameters. In this case is it still better to use NM or nmk? Best, Marc John C Nash wrote > > Your function will not evaluate as coded. i.e., l

[R] simple question about max(x,y)

2012-05-15 Thread lapertem4
x <- 3 y <- 4 max(x,y) 4 how can i get the greater variable name y thanks -- View this message in context: http://r.789695.n4.nabble.com/simple-question-about-max-x-y-tp4630201.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Getting reliable financial ratios

2012-05-15 Thread michaelyb
Hello all, I am having some trouble finding a good csv file or even any kind of table with the financial ratios (i.e. P/E ratio, ROI, ROA etc.) from the Internet. I was able to find a good source with poor information. That wouold be Finviz.com. Another option would be creating a XML function loop

Re: [R] write data using xlsReadWrite

2012-05-15 Thread diyanah
Hai, I use these codes to read my data from the above data that I create, but how can I get rid of the first V1, because it is row number, not one of my data value. Second, how can I read row 1 and only column 1 (V2 value for example). setwd("D:\\FYP\\image\\Cropped Images\\user61") info <-read.x

Re: [R] simple question about max(x,y)

2012-05-15 Thread David Winsemius
On May 15, 2012, at 8:42 PM, lapertem4 wrote: x <- 3 y <- 4 max(x,y) 4 how can i get the greater variable name y Option one: > test <- function(x,y) { c("x","y")[which.max(c(x,y))]} > test(3,4) [1] "y" > test(4,3) [1] "x" Option two: > test <- function(x,y) { xn <- depar

[R] Splus equivalent of reshape in R

2012-05-15 Thread Santosh
Hello R/Splus users.. I am posting in R discussion group in hope of wider response compared to what I received from Splus user groups Was wondering if there is any function available in Splus 8.2 that is equivalent to "reshape" of R? Below is a sample dataset. Size [both rows and columns) of

Re: [R] write data using xlsReadWrite

2012-05-15 Thread David Winsemius
On May 15, 2012, at 10:08 PM, diyanah wrote: Hai, I use these codes to read my data from the above data that I create, but how can I get rid of the first V1, because it is row number, not one of my data value. Why do you want to get rid of it? What harm is it doing? (Dataframes need to

Re: [R] confidence intervals for nls or nls2 model

2012-05-15 Thread Gabor Grothendieck
On Tue, May 15, 2012 at 8:08 PM, Francisco Mora Ardila wrote: > Hi all > > I have fitted a model usinf nls function to these data: > >> x >  [1]   1   0   0   4   3   5  12  10  12 100 100 100 > >> y >  [1]  1.281055090  1.563609934  0.001570796  2.291579783  0.841891853 >  [6]  6.553951324 14.243

Re: [R] confidence intervals for nls or nls2 model

2012-05-15 Thread Gabor Grothendieck
On Tue, May 15, 2012 at 11:20 PM, Gabor Grothendieck wrote: > On Tue, May 15, 2012 at 8:08 PM, Francisco Mora Ardila > wrote: >> Hi all >> >> I have fitted a model usinf nls function to these data: >> >>> x >>  [1]   1   0   0   4   3   5  12  10  12 100 100 100 >> >>> y >>  [1]  1.281055090  1.5

Re: [R] Splus equivalent of reshape in R

2012-05-15 Thread David Winsemius
On May 15, 2012, at 11:18 PM, Santosh wrote: Hello R/Splus users.. I am posting in R discussion group in hope of wider response compared to what I received from Splus user groups Was wondering if there is any function available in Splus 8.2 that is equivalent to "reshape" of R? Below i

Re: [R] Scraping a web page.

2012-05-15 Thread Duncan Temple Lang
Hi Keith Of course, it doesn't necessarily matter how you get the job done if it actually works correctly. But for a general approach, it is useful to use general tools and can lead to more correct, more robust, and more maintainable code. Since htmlParse() in the XML package can both retrieve

Re: [R] Discrete choice model maximum likelihood estimation

2012-05-15 Thread Bert Gunter
Hmmm... So you want to fit a nonlinear model with 24 parameters??!! I would bet that you'll need to sacrifice some chickens to the nonlinear optimization gods to get something meaningful from that exercise. :( -- Bert On Tue, May 15, 2012 at 5:26 PM, infinitehorizon wrote: > Hello John, > > Tha

Re: [R] Discrete choice model maximum likelihood estimation

2012-05-15 Thread Joshua Wiley
On Tue, May 15, 2012 at 9:57 PM, Bert Gunter wrote: > Hmmm... So you want to fit a nonlinear model with 24 parameters??!! > > I would bet that you'll need to sacrifice some chickens to the > nonlinear optimization gods to get something meaningful from that > exercise. Nominated for a fortune. >

Re: [R] Error on easy way for JoSAE Package

2012-05-15 Thread ana24maria
Thank you very much. After using dput and the easy way (> result <- eblup.mse.f.wrap(domain.data = amigo, lme.obj = fit.lme)), i have got the following error: Error in `[.data.frame`(sample.data, , variabs) : undefined columns selected What should I do? -- View this message in context:

[R] code to iterate function apply to matrix

2012-05-15 Thread umai88
I got this code below and i want to repeat the loop for 100 times.. x<-rnorm(60) mat1<-matrix(x,nrow=15,ncol=4) trim<-numeric(ncol(mat1)) win<-numeric(ncol(mat1)) ssd<-numeric(ncol(mat1)) for(j in 1:ncol(mat1)) { n=length(mat1[,j]) alpha=0.1 k=floor(alpha*n)+1 r=k-(alpha*n) i=k+1 m=n-k y1<-sort(

Re: [R] Regression Analysis or Anova?

2012-05-15 Thread Robert Latest
Hello Andrea, I don't know if I can help you (probably not, I'm a beginner myself), but you that you should make it a lot easier for those that can if you post a self-contained script in this forum that shows what you're trying to do. Use dput() to dump your dataset in text form. Good luck, rober

<    1   2