Re: [R] If then test

2010-01-27 Thread GlenB
Do you actually need the intermediate result (the vector of 1's and 0's), or just the result - the total number of columns? Is the number you're comparing to different for each column? Assuming the answers are "just the result" and "comparing to the same number" x <- matrix(c(4,5,7,2),nc=2) n

[R] Odp: If then test

2010-01-27 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 28.01.2010 06:21:40: > > i have a simple question. If i have a 2x2 matrix with [,1] and [,2] i want to > test each of these to see if they are below some number. If each component > in column is below the number then it returns a 1. Now from this resu

Re: [R] Data.frame manipulation

2010-01-27 Thread Petr PIKAL
HI r-help-boun...@r-project.org napsal dne 28.01.2010 04:35:29: > > Hi All, > > > > I'm conducting a meta-analysis and have taken a data.frame with multiple > > rows per > > study (for each effect size) and performed a weighted average of effect > > size for > > each study. This results in a re

[R] If then test

2010-01-27 Thread claytonmccandless
i have a simple question. If i have a 2x2 matrix with [,1] and [,2] i want to test each of these to see if they are below some number. If each component in column is below the number then it returns a 1. Now from this result I would like to add the number of 1's that came up. How can i do this? --

[R] Data.frame manipulation

2010-01-27 Thread AC Del Re
Hi All, I'm conducting a meta-analysis and have taken a data.frame with multiple rows per study (for each effect size) and performed a weighted average of effect size for each study. This results in a reduced # of rows. I am particularly interested in simply reducing the additional variables in th

Re: [R] SAS Type 1 / Type 3 Analysis Equivalent.

2010-01-27 Thread John Fox
Dear Kim, The standard R function anova() produces sequential ("type I") tests; the Anova() function in the car package can produce "type-III" tests (it performs "type-II" tests by default), but you must be careful with contrast coding if there are terms in the model related by marginality. I hop

Re: [R] plotting additive ns components

2010-01-27 Thread John Fox
Dear GlenB, The allEffects() function in the effects package can make these plots. I hope this helps, John > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of GlenB > Sent: January-27-10 9:09 PM > To: r-help@r-project.org > Su

[R] how to compute directions number in Fourier Tranform periodograms

2010-01-27 Thread Robert U
Dear R-users,   I have seen many times posts about Fourier transform, and I am trying to do one right now. Before to apply any scripts, I wonder whether it could properly apply to my problem, and even though it’s not a statistics-helpers mailing list maybe one of you would be able to answer my

Re: [R] SAS Type 1 / Type 3 Analysis Equivalent.

2010-01-27 Thread Bill.Venables
Why do you think we speak SAS here? anova(fm, test = "Chisq") will get you a sequential analysis of variance table. library(MASS) dropterm(fm, test = "Chisq") will show you the effect of removing the *non-marginal* terms one at a time. What more does anyone need? Bill Venables CSIRO/CMIS Clev

Re: [R] plotting additive ns components

2010-01-27 Thread Bill.Venables
Here is a rough example require(MASS) fm <- lm(medv ~ ns(dis, 3) + ns(nox, 4), Boston) termplot(fm, se = TRUE)## produces the plots pv <- predict(fm, type = "terms") ## gets the two terms Bill Venables CSIRO/CMIS Cleveland Laboratories -Original Message- From: r-help-boun

[R] SAS Type 1 / Type 3 Analysis Equivalent.

2010-01-27 Thread Kim Jung Hwa
Hi All, I'm using glm() in R to perform Poisson regression, I'm wondering if its possible to get equivalent Type 1 / Type 3 Analysis (similar to one in PROC GENMOD). Thanks, Kim [[alternative HTML version deleted]] __ R-help@r-project.org mail

Re: [R] Data.frame manipulation

2010-01-27 Thread AC Del Re
> Hi All, > > I'm conducting a meta-analysis and have taken a data.frame with multiple > rows per > study (for each effect size) and performed a weighted average of effect > size for > each study. This results in a reduced # of rows. I am particularly > interested in > simply reducing the additiona

Re: [R] Rcmdr has stopped working

2010-01-27 Thread James Rome
Yes, reinstalling it worked. I wonder what changed to cause this, especially if it happened to someone else? And I was a bit worried because I think tcl/tk is installed elsewhere too. In /usr/local/lib, there is a tcl 8 and tcl 8.5. How do I clean up this install? Thanks, Jim On 1/27/10 5:07 PM,

[R] Constrained vector permutation

2010-01-27 Thread Andrew Rominger
Hello, I'm trying to permute a vector of positive integers > 0 with the constraint that each element must be <= twice the element before it (i.e. for some vector x, x[i] <= 2*x[i-1]), assuming the "0th" element is 1. Hence the first element of the vector must always be 1 or 2 (by assuming the "0t

[R] Problem associated with importing xlsx data file (Excel 2007)

2010-01-27 Thread Steven Kang
Hi all, I have imported xlsx file (Excel 2007) into R using the following scripts. *library(RODBC) * *setwd("...") * *query <- odbcConnectExcel2007(xls.file = "GI 2010.xlsx", readOnly = TRUE) dat <- sqlQuery(query, "select * from [sheet1$]", as.is = TRUE, na.strings = "exp")* *dat* cont

Re: [R] median of grouped data

2010-01-27 Thread Girish A.R.
Check the package doBy as well (pretty handy for analysis of grouped data). library(doBy) summaryBy(PM~ID,data=d,FUN=median) HTH, -Girish -- View this message in context: http://n4.nabble.com/median-of-grouped-data-tp1311971p1312386.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] plotting additive ns components

2010-01-27 Thread David Winsemius
On Jan 27, 2010, at 9:09 PM, GlenB wrote: I have an additive model of the following form : zmdlfit <- lm(z~ns(x,df=6)+ns(y,df=6)) I can get the fitted values and plot them against z easily enough, but I also want to both obtain and plot the two additive components (the estimates of the

[R] plotting additive ns components

2010-01-27 Thread GlenB
I have an additive model of the following form : zmdlfit <- lm(z~ns(x,df=6)+ns(y,df=6)) I can get the fitted values and plot them against z easily enough, but I also want to both obtain and plot the two additive components (the estimates of the two additive terms on the RHS) I've been looking

Re: [R] More than on loop??

2010-01-27 Thread che
yes, but the outcome graphs are almost the same, that mean it does not calculated in a cumulative way , if you apply the following code, then run hi(x), and then recta(x), you will see how the shape are similar to the frequency of Amino Acid in the matrix. i am looking for a code that can do thi

Re: [R] Fwd: Re: Graph color

2010-01-27 Thread Jim Lemon
On 01/28/2010 09:52 AM, Jose Narillos de Santos wrote: Finally I´m very near on the graph I want... The code is this (based on your guide): First I read this data on the M.txt file: Player TYr Dec Jose20 14 Pepe12 16 Andres 15 12 Guille 16 14 Pedro 18 19

[R] exporting multidimensional matrix from R

2010-01-27 Thread Gopikrishna Deshpande
Hi, I have a matrix of size 19x512x20 in R. I want to export this file into another format which can be imported into MATLAB. write.xls or write.table exports only one dimension. please send a code if possible. I am very new to R and have been struggling with this. Thanks ! Gopi [[altern

[R] quartz() and dpi

2010-01-27 Thread JiHO
Hello all, I am using quartz (on OS X obviously) to produce PDFs and PNGs from my plots, for later inclusion in LaTeX. I am typically using something like: plot(0) dev.print(quartz, file="foo.pdf", width=5, height=3) dev.print(quartz, file="foo.png", width=5, height=3, dpi=72) I want the sizes

Re: [R] RMySQL - Bulk loading data and creating FK links

2010-01-27 Thread Gabor Grothendieck
How it represents data internally should not be important as long as you can do what you want. SQL is declarative so you just specify what you want rather than how to get it and invisibly to the user it automatically draws up a query plan and then uses that plan to get the result. On Wed, Jan 27,

Re: [R] SSOAP XML-RPC

2010-01-27 Thread Duncan Temple Lang
Hi Jan Is .XMLRPC("http://localhost:9000";, "Cytoscape.test", .opts = list(verbose = TRUE)) the command you used? If not, what did you use? Can you debug the .XMLRPC function (e.g. with options(error = recover)) and see what the XML that was sent to the server, i.e. the cmd variabl

Re: [R] Randomly rearranging elements of sets

2010-01-27 Thread Barry Rowlingson
On Wed, Jan 27, 2010 at 11:11 PM, Rolf Turner wrote: > > ?sample > And/Or read Knuth. Does this sound like a homework problem? -- blog: http://geospaced.blogspot.com/ web: http://www.maths.lancs.ac.uk/~rowlings web: http://www.rowlingson.com/ twitter: http://twitter.com/geospacedman pics: ht

Re: [R] Randomly rearranging elements of sets

2010-01-27 Thread Rolf Turner
?sample On 28/01/2010, at 12:06 PM, jshort wrote: Hi I've recently been trying to solve some probability questions in R, but am having trouble. This is one question thats been causing some hair loss: Given the set of integers S = {1,2,3,4,5,6,7,8,9,10}, create a function F(S) that u

Re: [R] median of grouped data

2010-01-27 Thread Felipe Carrillo
Like this? d = read.table(textConnection("ID PM adt_01 25.255 adt_01 225.36 adt_01 14.2325 adt_02 15 adt_02 12.3 adt_03 15.2 adt_03 148.3 adt_03 25.5 adt_03 14.25"),head=T) d d$PM <- as.numeric(d$PM) ddply(d,.(ID),numcolwise(median)) Felipe D. Carrillo Supervisory Fishery Biologist

[R] Randomly rearranging elements of sets

2010-01-27 Thread jshort
Hi I've recently been trying to solve some probability questions in R, but am having trouble. This is one question thats been causing some hair loss: Given the set of integers S = {1,2,3,4,5,6,7,8,9,10}, create a function F(S) that uniformly and randomly rearranges these integers. For exampl

Re: [R] Installing R and modules on Unix OS

2010-01-27 Thread Don MacQueen
The manual R Installation and Administration available from CRAN should help with this. I believe that one needs sys admin privileges for the default location, but that it is not difficult to change. (and it's "packages", not "modules") -Don At 4:34 PM -0600 1/27/10, Vadlamani, Satish {

Re: [R] Fwd: Re: Graph color

2010-01-27 Thread Jose Narillos de Santos
Finally I´m very near on the graph I want... The code is this (based on your guide): First I read this data on the M.txt file: Player TYr Dec Jose 20 14 Pepe 12 16 Andres 15 12 Guille 16 14 Pedro 18 19 Luis 14 19 Raul 18 15 Pepe 7 5 MC<-read.table("MC.txt",header=T,sep="",dec=",") #I read

[R] Installing R and modules on Unix OS

2010-01-27 Thread Vadlamani, Satish {FLNA}
Hi: I have a question about installing R (and modules) on a Unix system (AIX). Can I just gunzip (or the equivalent) the installation files into my home directory or will I need someone with root access to install R? I am hoping that the answer is the former (I can unzip all files to a directory

Re: [R] problem with "nls" function

2010-01-27 Thread Carl Witthoft
From: hammadi jbeli Date: Tue, 26 Jan 2010 23:40:47 +0100 I have used R formulation style and I found this in some R documentations. Sorry, that makes no sense. I would recommend you go back to your original dataset and pick a very small subset of it--with only 2 variables, for example.

Re: [R] Merge: sort=F not preserving order?

2010-01-27 Thread Sarah Goslee
Why yes. If you keep reading the helpfile for merge, you come to this bit: Value: A data frame. The rows are by default lexicographically sorted on the common columns, but for ‘sort = FALSE’ are in an unspecified order. sort=FALSE doesn't preserve your order; instead it gives you

[R] Merge: sort=F not preserving order?

2010-01-27 Thread lol zino
Hello, I have the following data1 (index are chars):     index 1  008823 2  012689 3  004503 4  002991 5  012689 6  002845 7  012689 8  012395 9  012689 10 009302 11 002845 12 006669 13 008823 14 009302 15 025340 16 012689 and data2 in this format (index2 are chars):        index2      tic 1  

Re: [R] Rcmdr has stopped working

2010-01-27 Thread Peter Dalgaard
John Fox wrote: Dear James, The tcltk package is part of the standard R distribution. I'm not sure why it isn't working. You might try reinstalling R or posting a question to the R-SIG-Mac list about tcltk not working. If you do the latter, you'll probably get a more informative response if you

Re: [R] sort a data frame according to all the Columns

2010-01-27 Thread Erik Iverson
Erik Iverson wrote: I think you want ?order On second read, I think you want to do this without having to specify all 18 variables in an order call... something like this (with only 3 variables) v1 <- sample(rep(1:10, each = 2)) v2 <- sample(1:20) v3 <- sample(1:20) tmp <- data.frame(v1, v

Re: [R] color matrix

2010-01-27 Thread baptiste auguie
Hi, It's easy with ggplot2, cols = matrix(c("#F7FBFF", "#DEEBF7", "#C6DBEF", "#9ECAE1", "#6BAED6", "#4292C6", "#2171B5", "#08519C" ,"#08306B"), ncol=3) library(ggplot2) m = melt(cols) qplot(factor(X1),factor(X2),data=m, fill=value, geom="tile") + scale_fill_identity() HTH, baptiste 2010/1/2

Re: [R] sort a data frame according to all the Columns

2010-01-27 Thread Erik Iverson
I think you want ?order Juanjuan Chai wrote: Hi, I have a data frame read from a .csv file, with columns V1,V2,V3...,V18, per say, and I want to sort this data frame according to V1, and then V2, then V3..., and so on. Is there any fast way to get around with this problem? Thanks. -JJ _

[R] sort a data frame according to all the Columns

2010-01-27 Thread Juanjuan Chai
Hi, I have a data frame read from a .csv file, with columns V1,V2,V3...,V18, per say, and I want to sort this data frame according to V1, and then V2, then V3..., and so on. Is there any fast way to get around with this problem? Thanks. -JJ __ R-

[R] color matrix

2010-01-27 Thread evgeny55
Hi, Is it possible to create a heatmap for say a 3x3 matrix of data where every color is pre-assigned? I can easily create a matrix of hex colors but when I try to use that matrix as the parameter for the 'col' option it doesn't work. If it's possible to just display a matrix of hex colors that w

Re: [R] Rcmdr has stopped working

2010-01-27 Thread John Fox
Dear James, The tcltk package is part of the standard R distribution. I'm not sure why it isn't working. You might try reinstalling R or posting a question to the R-SIG-Mac list about tcltk not working. If you do the latter, you'll probably get a more informative response if you provide the inform

Re: [R] median of grouped data

2010-01-27 Thread Peter Alspach
Tena koe Maria ?tapply Specifically: tapply(yourData$PM, yourData$ID, median) HTH Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of "María del > Pilar Márquez" > Sent: Thursday, 28 January 2010 7:06 a.m

Re: [R] Alt carachters in R

2010-01-27 Thread Peter Alspach
Tena koe Gepeto Not sure if the following helps since you have not been very specific in your question: plot(1:10) text(3,2,'*') text(5,2,'*5') text(4,2,'5*5') text(4,5,'17\n4') text(6,5,'17\\n4') Hei kona ra ... Peter Alspach > -Original Message- > From: r-help-boun...@r-project.org

Re: [R] returning a list of functions

2010-01-27 Thread Bert Gunter
Lazy evaluation. Consider: > funlist <- list() > for (i in 1:5)funlist[[i]]<- eval(bquote(function(x)x^.(i))) > str(funlist[[2]]) function (x) - attr(*, "source")= chr "function(x)x^.(i)" > funlist[[2]] function(x)x^.(i) > ## But... > body(funlist[[2]]) x^2L > body(funlist[[3]]) x^3L >

Re: [R] Rcmdr has stopped working

2010-01-27 Thread James Rome
Apparently tcltk is the issue. That hung my R. How do I reinstall tcltk? On 1/27/10 3:06 PM, John Fox wrote: > library(tcltk > tk_choose.dir(getwd(), "Choose folder") > __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] Rcmdr has stopped working

2010-01-27 Thread John Fox
Dear Jim, The Rcmdr (version 1.5.4) works for me under R64 (R 2.10.1) and Snow Leopard. Without more information, it's hard to know what went wrong. Have you checked whether tcltk works? For example, try library(tcltk tk_choose.dir(getwd(), "Choose folder") I hope this helps, John ---

Re: [R] plotting the coordinates versus dates

2010-01-27 Thread Paul Hiemstra
Julia Tchernova wrote: Hello! I have a dataset with the dates and positions - Lat and Long columns How do I make a scatter plot? Do I have to cbind to combine the Lat and Long columns? Any suggestions will be much appreciated! Thank you Julia [[alternative HTML version deleted]]

Re: [R] ggplot2 theme for custom point colors?

2010-01-27 Thread baptiste auguie
Hi, I remember asking a similar question some time ago, I don't know if the matter has evolved since then, http://groups.google.com/group/ggplot2/browse_frm/thread/a3df8a0d1ee335fb/e3bedd50fb9bd567?lnk=gst&q=theme#e3bedd50fb9bd567 There's also set_default_scale, somewhat related to your question

[R] Indexes for Simplexes

2010-01-27 Thread John Tillinghast
I'm going to be manipulating some 3-rd and 4-th rank tensors in relatively high dimensions, and it would help a great deal to use only the unique entries instead of repeating every operation 6 or 24 times. Operations are tensor-matrix, tensor-vector, and tensor-tensor multiplication. Does any

[R] using functions with multiple arguments in the "apply" family

2010-01-27 Thread chipmaney
typically, the apply family wants you to use vectors to run functions on. However, I have a function, kruskal.test, that requires 2 arguments. kruskal.test(Herb.df$Score,Herb.df$Year) This easily computes the KW ANOVA statistic for any difference across years However, my data has multiple

Re: [R] hdf files

2010-01-27 Thread Jarle Brinchmann
Are you sure these are hdf5 files? If they are HDF4 files you will not be able to load them with the hdf5 package. I am not aware of a HDF4 package for R but I might be wrong. If it is a HDF4 file you might find the conversion utility at http://www.hdfgroup.org/h4toh5/ useful. Cheers,

[R] ggplot2 theme for custom point colors?

2010-01-27 Thread Kevin Wright
1. Is it possible to set the point colors in a ggplot2 theme? For example, to default to these colors: scale_colour_manual(value = c("red", "orange", "yellow", "green", "blue") 2. Is it possible to set this theme in .Rprofile, similar to: my.lattice.colors = function () { ...etc.} option

Re: [R] Function for describing segements in sequential data

2010-01-27 Thread Charles C. Berry
On Wed, 27 Jan 2010, Gregory Gentlemen wrote: Dear R-users, Say that I have a sequence of zeroes and ones: x <- c(1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0) The sequences of ones represent segments and I want to report the starting and endpoints of these segments. For example, in 'x', the fi

Re: [R] Step and AIC

2010-01-27 Thread Steve Lianoglou
Hi, On Wed, Jan 27, 2010 at 12:21 PM, wrote: > Hello everybody, > I would need some help from you. > I am trying to fit a logistic model to some presence absence data of > animals living on river islands. I have got 12 predictor variables and I am > trying to use a stepwise forward method to fit

Re: [R] Executing a R-string

2010-01-27 Thread RICHARD M. HEIBERGER
m <- c(1,4,2,3,7,5) S <- "which(m==4)" P <- parse(text=S) R <- eval(P) R Before you do this, see fortune(106) > fortune(106) If the answer is parse() you should usually rethink the question. -- Thomas Lumley R-help (February 2005) On Wed, Jan 27, 2010 at 8:59 AM, Joe Trubisz wrote: > He

Re: [R] Executing a R-string

2010-01-27 Thread Rolf Turner
On 28/01/2010, at 2:59 AM, Joe Trubisz wrote: Hello... In other languages (e.g. php, perl), you have the ability to create a valid string and execute the string to get the result. For example (in pseudo-R): S<-"which(m==4)" R<-exec(S) I know this does not work, but was wondering if there was

Re: [R] ask for help with this R quesiton

2010-01-27 Thread song song
> > question like this: > > I have data tag and phi, when tag are the same, then phi are the same. like > below, tag have value 1 2 3 4 and phi have value .9 .3 1 0. > > my question is, how can I get the result like > tag=c(1,2,3,4) and corresponding phi=c(.9,.3,1,0) > > tag phi > 2.3 > 1

[R] ask for help with this R quesiton

2010-01-27 Thread song song
question like this: I have data tag and phi, when tag are the same, then phi are the same. like below, tag have value 1 2 3 4 and phi have value .9 .3 1 0. my question is, how can I get the result like tag=c(1,2,3,4) and corresponding phi=c(.9,.3,1,0) tag phi 2.3 1.9 2.3 31 2

[R] median of grouped data

2010-01-27 Thread María del Pilar Márquez
Good morning, I would like to know if is possible somebody can help me with this please: I would like to calculate the median of grouped data, this is an example: IDPM adt_01 25.255 adt_01 225.36 adt_01 14.2325 adt_02 15 adt_02 12.3 adt_03 15.2 adt_03 148.3 adt_03 25.5 adt_03 14.25 I

Re: [R] large integers in R

2010-01-27 Thread Blanford, Glenn
Duncan, thanks. To the point, R supports -(2**31-1) to 2**31-1 or -2147483647 to +2147483647 -2147483648 is a valid signed integer but returns NA. Signed integers are -2147483648 to 2147483647 Glenn D Blanford, PhD NAIL lab, PM NSI, Fort Monmouth, NJ glenn.blanf...@us.army.mil Scientific Research

[R] Step and AIC

2010-01-27 Thread francesca . iordan
Hello everybody, I would need some help from you. I am trying to fit a logistic model to some presence absence data of animals living on river islands. I have got 12 predictor variables and I am trying to use a stepwise forward method to fit the best logistic model to my data. I am using the

[R] Alt carachters in R

2010-01-27 Thread gepeto
Hi all, I am trying to use and place in a graph some alt characters such as "*".. Could you help me? Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posti

[R] returning a list of functions

2010-01-27 Thread Rajat Mukherjee
Hi interested readers, I have a function that creates several functions within a loop and I would like them to be returned for further use as follows: Main.Function(df,...){ # df is a multivariate data funcList<-list(NULL) for (i in 1:ncol(df)){ temp<-logspline(df[,i],...) # logspline density es

[R] Executing a R-string

2010-01-27 Thread Joe Trubisz
Hello... In other languages (e.g. php, perl), you have the ability to create a valid string and execute the string to get the result. For example (in pseudo-R): S<-"which(m==4)" R<-exec(S) I know this does not work, but was wondering if there was an equivalent mechanism that I cannot fin

[R] Rcmdr has stopped working

2010-01-27 Thread James Rome
On my Mac (Snow Leopard and R64), I had been using Rcmdr nicely. But now when I do > library(Rcmdr) the tk libraries load, but the Rcmdr window never appears. > library(Rcmdr) Loading required package: tcltk Loading Tcl/Tk interface ... > And if I try to do anything else, R goes to 100% cpu and ha

Re: [R] Writing Graphs to Files

2010-01-27 Thread Jerry Floren
Thank you so much Eik. This is what I used, and it genereated 530 files of triple graphs in less than a minute. dev.copy(win.metafile, file = paste(myV,"emf",sep="."), width = 7, height = 10, pointsize = 12) dev.off() Thanks again, Jerry Floren Minnesota Department of Agriculture -- View thi

Re: [R] ask for help with this R quesiton

2010-01-27 Thread Henrique Dallazuanna
Try this: unique(cbind(tag, phi))[order(unique(tag)),] On Wed, Jan 27, 2010 at 4:13 PM, song song wrote: >> question like this: >> >> I have data tag and phi, when tag are the same, then phi are the same. like >> below, tag have value 1 2 3 4 and phi have value .9 .3 1 0. >> >> my question is, h

[R] ask for help with this R quesiton

2010-01-27 Thread song song
> question like this: > > I have data tag and phi, when tag are the same, then phi are the same. like > below, tag have value 1 2 3 4 and phi have value .9 .3 1 0. > > my question is, how can I get the result like > tag=c(1,2,3,4) and corresponding phi=c(.9,.3,1,0) > > tag phi > 2.3 > 1.9

Re: [R] Writing Graphs to Files

2010-01-27 Thread Eik Vettorazzi
Hi Jerry, have a look at ?paste and perhaps ?win.metafile too. something like > file = paste(myV,"emf",sep=".") will do the trick. cheers. Jerry Floren schrieb: Greetings, I am trying to write multiple .emf graphs to individual files. Our data is from agricultural laboratories where individ

Re: [R] Function for describing segements in sequential data

2010-01-27 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Gregory Gentlemen > Sent: Wednesday, January 27, 2010 9:31 AM > To: r-help@r-project.org > Subject: [R] Function for describing segements in sequential data > > Dear R-users, >

Re: [R] RMySQL - Bulk loading data and creating FK links

2010-01-27 Thread Matthew Dowle
> sqldf("select * from BOD order by Time desc limit 3") Exactly. SQL requires use of order by. It knows the order, but it isn't ordered. Thats not good, but might be fine, depending on what the real goal is. "Gabor Grothendieck" wrote in message news:971536df1001270629w4795da89vb7d77af6e4e8b

Re: [R] Function for describing segements in sequential data

2010-01-27 Thread Steve Lianoglou
Hi, On Wed, Jan 27, 2010 at 12:31 PM, Gregory Gentlemen wrote: > Dear R-users, > > Say that I have a sequence of zeroes and ones: > > x <- c(1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0) > > The sequences of ones represent segments and I want to report the starting > and endpoints of these segments

Re: [R] large integers in R

2010-01-27 Thread Duncan Murdoch
On 27/01/2010 10:50 AM, Blanford, Glenn wrote: Duncan, thanks. To the point, R supports -(2**31-1) to 2**31-1 or -2147483647 to +2147483647 -2147483648 is a valid signed integer but returns NA. Signed integers are -2147483648 to 2147483647 Yes, R uses the -2147483648 encoding to store the in

[R] Function for describing segements in sequential data

2010-01-27 Thread Gregory Gentlemen
Dear R-users, Say that I have a sequence of zeroes and ones: x <- c(1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0) The sequences of ones represent segments and I want to report the starting and endpoints of these segments. For example, in 'x', the first segment starts at location 1 and ends at 3,

Re: [R] add points to 3D plot using p3d {onion}

2010-01-27 Thread Viechtbauer Wolfgang (STAT)
Just as an aside, the scatterplot3d package does things like this very cleverly. Essentially, when you create a plot with scatterplot3d, the function actually returns functions with values set so that points3d(), for example, "knows" the axis scaling. Best, -- Wolfgang Viechtbauer

Re: [R] biplot from stats: 0.8 ?

2010-01-27 Thread Kevin Wright
Probably so that the end of the arrow does not overplot the labels. Kevin On Wed, Jan 27, 2010 at 10:28 AM, Martin Ivanov wrote: > Dear forum, > I need to create biplot graphic. I took a look at the code of the > biplot.default function from the stats package and I found that the arrows > for

Re: [R] selecting significant predictors from ANOVA result

2010-01-27 Thread Bert Gunter
Ram: You do not say how many cases (rows in your dataset) you have, but I suspect it may be small (a few hundred, say). In any case, what you describe is probably just a complicated way to generate random numbers -- it is **highly** unlikely that any meaningful, replicable scientific results woul

[R] biplot from stats: 0.8 ?

2010-01-27 Thread Martin Ivanov
Dear forum, I need to create biplot graphic. I took a look at the code of the biplot.default function from the stats package and I found that the arrows for the variables are multiplied by a coefficient of 0.8 before plotting: ... if (var.axes) arrows(0, 0, y[, 1L] * 0.8, y[, 2L] * 0.8,

Re: [R] href and Rd

2010-01-27 Thread Luca Braglia
On 27/01/10 - 08:54, Gabor Grothendieck wrote: > One approach would be to use one of the URL shortening services to > define a shorter URL. The shorter URL would then appear rather than > the long original one (although there would still be a URL shown so > its not quite the functionality you ask

Re: [R] problem with odfWeave

2010-01-27 Thread Sarah Goslee
Joel, The list strips off binary attachments. But Ista is correct - to diagnose your problem (one that I've never encountered), we need to see a short odfWeave input file (including data - random numbers are fine) that we can actually run, and see table cells that work and do not work. There's pre

[R] Writing Graphs to Files

2010-01-27 Thread Jerry Floren
Greetings, I am trying to write multiple .emf graphs to individual files. Our data is from agricultural laboratories where individual soil samples are tested for various plant nutrients, for example, ammonium nitrogen, phosphorus, and zinc. Basically, there are three important columns: the labor

Re: [R] difference between ' and "

2010-01-27 Thread Karl Ove Hufthammer
On Wed, 27 Jan 2010 14:15:28 +0100 Ivan Calandra wrote: > From my experience (which is limited), it seems to me that ' > (apostrophe) and " (quotation marks) are the same in R: they are both > used for strings. The only difference would be taste. > But I've recently read about the difference be

Re: [R] control of scat1d tick color in plot.Predict?

2010-01-27 Thread Frank E Harrell Jr
Mike Babyak wrote: Hi All, I have a quick question about using plot.Predict now that the rms package uses lattice. I'd like to add tick marks along the regression line, which is given by data=llist(variablename) in the plot call. The ticks show up fine, but I'd like to alter the color. I know

Re: [R] Selective Plot Color

2010-01-27 Thread Chuck Cleland
On 1/27/2010 10:00 AM, Richardson, Patrick wrote: > Is there a way (with a simple plot) to select all observations greater than a > certain value and plot them with a different color than the rest of the > observations in the plot? (i.e. for all observations greater than 10, I want > to plot the

Re: [R] problem with odfWeave

2010-01-27 Thread Joel GOMBIN
Attached is the "input" file ("modele_rapport.odt") and one example of output file ("rapport_Abstention2.odt") (I run a loop with the same report generated for different datasets). I hope this is what you are looking for ? Joel On Wed, Jan 27, 2010 at 3:56 PM, Ista Zahn wrote: > Joel, I still d

[R] Selective Plot Color

2010-01-27 Thread Richardson, Patrick
Is there a way (with a simple plot) to select all observations greater than a certain value and plot them with a different color than the rest of the observations in the plot? (i.e. for all observations greater than 10, I want to plot them in red, but the rest of the observations remain black. W

Re: [R] problem with odfWeave

2010-01-27 Thread Ista Zahn
Joel, I still don't see an example. I think you're making things more difficult for yourself than you need to, but without an example I don't know what exactly you're doing. -Ista On Wed, Jan 27, 2010 at 8:34 AM, Joel GOMBIN wrote: > Hi, > > so to sum up, I'm making automated reports, in the for

Re: [R] PNG resolution

2010-01-27 Thread Joshua Wiley
Hello Matthew, I do not have a direct answer to your problem, but you could try saving it as an EPS and then rasterizing it using a graphics program (e.g., GIMP) to whatever resolution you wanted. Best luck finding a real solution. Joshua On Tue, Jan 26, 2010 at 9:05 AM, Matthew Walker wrote

Re: [R] RMySQL - Bulk loading data and creating FK links

2010-01-27 Thread Gabor Grothendieck
On Wed, Jan 27, 2010 at 8:56 AM, Matthew Dowle wrote: > How many columns, and of what type are the columns ? As Olga asked too, it > would be useful to know more about what you're really trying to do. > > 3.5m rows is not actually that many rows, even for 32bit R.  Its depends on > the columns and

Re: [R] Microsoft SQL Server and R

2010-01-27 Thread Olga Lyashevska
Yes, checking it now, I see you are absolutely right. Sorry for this confusion. Cheers, Olga On 27.01.2010, at 12:45, Orvalho Augusto wrote: RMySQL is for MySQL. MySQL is not MSSQL. There is not RMSSQL. So the best you have something to conneto MSSQL... RODBC or you may connect. Or as Ji

[R] control of scat1d tick color in plot.Predict?

2010-01-27 Thread Mike Babyak
Hi All, I have a quick question about using plot.Predict now that the rms package uses lattice. I'd like to add tick marks along the regression line, which is given by data=llist(variablename) in the plot call. The ticks show up fine, but I'd like to alter the color. I know the ticks are produc

Re: [R] RMySQL - Bulk loading data and creating FK links

2010-01-27 Thread Matthew Dowle
How many columns, and of what type are the columns ? As Olga asked too, it would be useful to know more about what you're really trying to do. 3.5m rows is not actually that many rows, even for 32bit R. Its depends on the columns and what you want to do with those columns. At the risk of sugge

Re: [R] href and Rd

2010-01-27 Thread Gabor Grothendieck
One approach would be to use one of the URL shortening services to define a shorter URL. The shorter URL would then appear rather than the long original one (although there would still be a URL shown so its not quite the functionality you asked for). For more info google for: url shortening On W

Re: [R] href and Rd

2010-01-27 Thread Duncan Murdoch
On 27/01/2010 8:36 AM, Luca Braglia wrote: Hello * is possible to have something like the LaTeX \href in Rd ? \url doesn't fit very well, and I didn't find much about. I have a long (external to the help system, a www one) url but i would like it to be "hidden" from a small word with the link.

[R] href and Rd

2010-01-27 Thread Luca Braglia
Hello * is possible to have something like the LaTeX \href in Rd ? \url doesn't fit very well, and I didn't find much about. I have a long (external to the help system, a www one) url but i would like it to be "hidden" from a small word with the link. Please CC me! ;) thanks in advance Luca

Re: [R] problem with odfWeave

2010-01-27 Thread Joel GOMBIN
Hi, so to sum up, I'm making automated reports, in the form of tables. In each cell of the table is an expression like (e.g.) : \Sexpr{odfCat(round(summary(get(modele1))$coefficients[1,1],2))} For most cells, after I run odfWeave, the results are correctly put and formatted. But in some cells (

[R] difference between ' and "

2010-01-27 Thread Ivan Calandra
Hi everybody, From my experience (which is limited), it seems to me that ' (apostrophe) and " (quotation marks) are the same in R: they are both used for strings. The only difference would be taste. But I've recently read about the difference between = and <- and I thought that there might be

Re: [R] date and time functions

2010-01-27 Thread Gabor Grothendieck
Read the article in R News 4/1. 2010/1/27 Robert Kalicki : > Dear R community > > I would like to perform some statistical analysis on a data set containing > the following items: date, time, index of observation and various > covariates. > > The date and time are originally extracted in the follo

[R] date and time functions

2010-01-27 Thread Robert Kalicki
Dear R community I would like to perform some statistical analysis on a data set containing the following items: date, time, index of observation and various covariates. The date and time are originally extracted in the following format: dd.mm. and hh:mm:ss respectively. R and more precisely

Re: [R] problem with odfWeave

2010-01-27 Thread Ista Zahn
Hi Joel, Can you paste a minimal example illustrating your problem? Thanks, Ista On Wed, Jan 27, 2010 at 6:19 AM, Joel GOMBIN wrote: > Hello, > > thanks to Sarah for her help. That works fine, except for one thing. When I > generate my reports, using odfWeave(), some cells in my tables are filled

  1   2   >