Re: [R] Within Subject ANOVA question

2009-06-01 Thread Peter Dalgaard
tsunhin wong wrote: Dear R users, I have copied for following table from an article on "Using confidence intervals in within-subject designs": Subject 1sec 2sec 5sec 1 10 13 13 12.00 2 6 8 8 7.33 3 11 14 14 13.00 4 22 23 25 23.33 5 16 18 20 18.00 6 15 17 17 16.33 7 1 1 4 2.00 8 12 15 17 14.67 9

[R] Install problem Rgraphviz on Mac PPC

2009-06-01 Thread Alex Biedermann
Dear all I am trying to install Rgraphviz on a Mac PPC, Vers. 10.4.11, under R vers. 2.9. My graphviz is installed at "/usr/local/graphviz-2.14". I get the following error: ... configure: Using default directory /usr/local, consider specifiying -- with-graphviz configure: error: /usr/local/b

Re: [R] grid.edit() for ggplot2

2009-06-01 Thread Paul Murrell
Hi baptiste auguie wrote: Dear all, I'm trying to access and modify grobs in a ggplot2 plot. The basic idea for raw Grid objects I understand from Paul Murrell's R graphics book, or this page of examples, http://www.stat.auckland.ac.nz/~paul/grid/copygrob/copygrobs.R However I can't figu

[R] Fwd: how to add value on the bar ploted by barplot()

2009-06-01 Thread Xiaogang Yang
-- Forwarded message -- From: Xiaogang Yang Date: Mon, Jun 1, 2009 at 9:02 PM Subject: Re: [R] how to add value on the bar ploted by barplot() To: David Winsemius I mean I have bar in my plot graph, but I want add the bar real value at top of it. On Mon, Jun 1, 2009 at 8:46 PM,

Re: [R] Error:non-numeric argument in my function

2009-06-01 Thread Stavros Macrakis
On Mon, Jun 1, 2009 at 11:33 AM, Wacek Kusnierczyk < waclaw.marcin.kusnierc...@idi.ntnu.no> wrote: > ... there is an ugly lack of consistency here:... > I agree that it's inconsistent that 1:'2' --> 1:2 # this doesn't seem to be documented in ? seq 1+ '2' --> error 1+facto

Re: [R] how to add value on the bar ploted by barplot()

2009-06-01 Thread David Winsemius
On Jun 1, 2009, at 11:21 PM, Xiaogang Yang wrote: how to add value on the bar ploted by barplot()? Depending on what you really mean, possibly: ?barplot ?text # there _is_ a worked example on the barplot help page. # true, it does put the labels above the bars, but the modification

Re: [R] my little r is sick

2009-06-01 Thread Tena Sakai
Hi Dirk, Rebuilding (mere 4 lines below) fixed the problem: $ cd to-install-directory $ PATH=/path/to/my/R:$PATH ./configure $ make $ sudo make install The script (helloWorld.r), which failed awhile ago, now works fine. Thank you for your help. Regards, Tena Sakai tsa...@gallo.ucsf.ed

[R] how to add value on the bar ploted by barplot()

2009-06-01 Thread Xiaogang Yang
how to add value on the bar ploted by barplot()? and the axis label is too big, anyone know how to change their font , thanks -- Xiaogang Yang Sensorweb Research Laboratory http://sensorweb.vancouver.wsu.edu/ Washington State University Vancouver [[alternative HTML version deleted]] __

[R] quantmod plot trendline

2009-06-01 Thread Chang Lin
Hi, Is there a way to plot trendline with quantmod package? There is addLines function in the package but I can't seem to figure out how to use it (not well documented): > args(addLines) function (x, h, v, on = 1, overlay = TRUE, col = "blue") NULL so arguments "h" and "v" add horizontal and vert

Re: [R] Editor R

2009-06-01 Thread Kenneth Roy Cabrera Torres
Dr Krzysztof: Can you help me how can you configure kate so you can send selected parts to an R console, or the whole script? Does the graphics works fine in this editor? Thank you for your help. Kenneth El lun, 01-06-2009 a las 20:04 -0400, Krzysztof Sakrejda-Leavitt escribió: > Under linux,

Re: [R] Within Subject ANOVA question

2009-06-01 Thread Mike Lawrence
str() is again your friend. > str(asummary) List of 2 $ Error: subject :List of 1 ..$ :Classes ‘anova’ and 'data.frame':1 obs. of 5 variables: .. ..$ Df : num 9 .. ..$ Sum Sq : num 943 .. ..$ Mean Sq: num 105 .. ..$ F value: num NA .. ..$ Pr(>F) : num NA ..- at

Re: [R] warning message when running quantile regression

2009-06-01 Thread Ronggui Huang
You may not get response as this is in faq of rq package. 7. [Non-positive fis] "What does the message "Non-positive fis" mean? When method ="nid" is used in summary local density estimates are made at each x_i value, in some cases these estimates can be negative and if so they are set

Re: [R] my little r is sick

2009-06-01 Thread Dirk Eddelbuettel
On 1 June 2009 at 18:05, Tena Sakai wrote: | Hi Dirk, | | > I would venture that you upgraded R and replaced a build using | > shared libraries with one containing static libraries --- thereby | > breaking r. | | I did make R recently, 2.9.0, with shared library, | which is how I got little r to

Re: [R] my little r is sick

2009-06-01 Thread Tena Sakai
Hi Dirk, > I would venture that you upgraded R and replaced a build using > shared libraries with one containing static libraries --- thereby > breaking r. I did make R recently, 2.9.0, with shared library, which is how I got little r to work at all. There are more than one R on the machine, how

Re: [R] my little r is sick

2009-06-01 Thread Dirk Eddelbuettel
Tena, On 1 June 2009 at 17:02, Tena Sakai wrote: | Suddenly, I find my little r is sick. | | Given: | | #! /usr/bin/env r | | library (hwriter) | | unlink ('tmp.html') | | p = openPage ('tmp.html') | hwrite ("Hello World", p) | closePage (p) | | browseURL ('tmp.html') | | It

Re: [R] R Solves Shakespeare Authorship Question

2009-06-01 Thread spencerg
"loc.gov" lists two books on this topic: * Mosteller and Wallace (1964) Inference and disputed authorship, The Federalist (Addison-Wesley) * Mosteller and Wallace (1984) Applied Bayesian and classical inference : the case of the Federalist papers, 2nd ed. of Inf

Re: [R] Within Subject ANOVA question

2009-06-01 Thread tsunhin wong
As another follow-up related to aov, I want to extract values (Residual interaction mean square & interaction DF) from the results: asummary<-summary(aov.recall) The results are in a list() format with 3 lists, and contents within each list are without "names". I am not able to do something like i

Re: [R] Editor R

2009-06-01 Thread Krzysztof Sakrejda-Leavitt
Under linux, Kate with its built-in console is very good. You can easily set up a command to let you pipe highlighted parts of your script to that console. The default highlighting is very good, it points out unfinished brackets and such, and the session support lets you switch between projects v

[R] my little r is sick

2009-06-01 Thread Tena Sakai
Hi, Suddenly, I find my little r is sick. Given: #! /usr/bin/env r library (hwriter) unlink ('tmp.html') p = openPage ('tmp.html') hwrite ("Hello World", p) closePage (p) browseURL ('tmp.html') It worked fine a few days ago, but now it says: r: error while loading shared li

Re: [R] Editor R

2009-06-01 Thread Wensui Liu
emacs + ess is the best. On Mon, Jun 1, 2009 at 5:07 PM, Grześ wrote: > > Do you know any good editor  R? > -- > View this message in context: > http://www.nabble.com/Editor-R-tp23822342p23822342.html > Sent from the R help mailing list archive at Nabble.com. > >

Re: [R] Calling Fortran from C++

2009-06-01 Thread Giuseppe
> From: r-help-boun...@r-project.org *> [mailto:r-help-bounces_at_r-project.org] On Behalf Of Thomas Lumley * *> Sent: Monday, June 01, 2009 9:33 AM * *> To: cls59 * *> Cc: r-help_at_r-project.org * *> Subject: Re: [R] Calling

Re: [R] Axis label spanning multiple plots

2009-06-01 Thread Andre Nathan
On Mon, 2009-06-01 at 20:46 -0300, Andre Nathan wrote: > the x and y coordinates seem to always be relative the the axes of the > first call to plot(). Oops, no they aren't :) It was a mistake in the coordinates. They work exactly the way I wanted. Best, Andre ___

Re: [R] Axis label spanning multiple plots

2009-06-01 Thread Andre Nathan
Thank you, layout() worked perfectly! Another question: I'm adding some text to the plots (using text()) and the x and y coordinates seem to always be relative the the axes of the first call to plot(). Is there a way to reset the coordinates so that they are relative to the latest call to plot()?

Re: [R] survreg.distributions() error

2009-06-01 Thread Thomas Lumley
On Sun, 31 May 2009, Nick Reich wrote: 1. Can anyone verify that this is indeed a bug that's as simple as a typo in the package code? It certainly looks like it. 2. I tried cutting and pasting the code for survreg.fit() into a new file, making the edit myself and then re-sourcing the func

Re: [R] R Solves Shakespeare Authorship Question

2009-06-01 Thread Bert Gunter
As a matter of statistical history that some of you may be unaware of, Mosteller and Tukey(I think) published an important paper on a similar topic (authorship of the Federalist Papers) about 25-30 years ago. I wonder if that was referenced in this one... Bert Gunter Genentech Nonclinical Biostati

Re: [R] Within Subject ANOVA question

2009-06-01 Thread Mike Lawrence
On Mon, Jun 1, 2009 at 7:50 PM, tsunhin wong wrote: > But I have some follow-up questions: > 1. In aov, why IVs (subject & condition) cannot be in number format? Put simply, because that's the only way to obtain the values you observe in the paper you're reading. :Op Factorizing tells the ANOVA

Re: [R] using "cochran.test()" as a "mcnemar.test()" ?

2009-06-01 Thread Chuck Cleland
On 6/1/2009 6:01 PM, Tal Galili wrote: > Hi Chuck, > Thank you for the fast reply. > I looked through that thread (that's how I came across the commands I > wrote). > > 1) My question was if this command (cochran.test) could be used the same > way as (mcnemar.test). It obviously can't be, but mayb

Re: [R] Within Subject ANOVA question

2009-06-01 Thread Mike Lawrence
Although you factorized subject and condition when you created them as separate objects, this didn't survive cbind() then as.data.frame(), thus > example<-data.frame(cbind(subject,condition,recall)) > str(example) 'data.frame': 30 obs. of 3 variables: $ subject : int 1 2 3 4 5 6 7 8 9 10 ...

Re: [R] Within Subject ANOVA question

2009-06-01 Thread tsunhin wong
I have reformatted the data input in the following ways, and I get the normal results: >subject<-factor(c("s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s1","s2","s3","s4","s5","s6","s7","s8","s9","s10")) >condition<-factor(c("c1","c1","c1","c

Re: [R] Editor R

2009-06-01 Thread David Winsemius
http://search.r-project.org/cgi-bin/namazu.cgi?query=%22good+editor%22&max=100&result=normal&sort=score&idxname=functions&idxname=Rhelp08&idxname=Rhelp02 On Jun 1, 2009, at 5:07 PM, Grześ wrote: Do you know any good editor R? -- David Winsemius, MD Heritage Laboratories West Hartford, CT _

Re: [R] using "cochran.test()" as a "mcnemar.test()" ?

2009-06-01 Thread David Winsemius
On Jun 1, 2009, at 6:01 PM, Tal Galili wrote: Hi Chuck, Thank you for the fast reply. I looked through that thread (that's how I came across the commands I wrote). 1) My question was if this command (cochran.test) could be used the same way as (mcnemar.test). It obviously can't be, but maybe

Re: [R] Sweave:Figures from plot (LME output) not getting generated(pdf or eps)

2009-06-01 Thread ONKELINX, Thierry
Dear Girish, As they are lattice plots, you need to print() them explicitly. It is FAQ 7.22: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis- graphics-not-work_003f <>= print(plot(fm1, distance ~ fitted(.) | Subject, abline = c(0,1))) @

[R] Within Subject ANOVA question

2009-06-01 Thread tsunhin wong
Dear R users, I have copied for following table from an article on "Using confidence intervals in within-subject designs": Subject 1sec 2sec 5sec 1 10 13 13 12.00 2 6 8 8 7.33 3 11 14 14 13.00 4 22 23 25 23.33 5 16 18 20 18.00 6 15 17 17 16.33 7 1 1 4 2.00 8 12 15 17 14.67 9 9 12 12 11.00 10 8 9

Re: [R] Creating a plot with an image as background

2009-06-01 Thread Gabor Grothendieck
Check out: http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:translucency On Mon, Jun 1, 2009 at 6:17 PM, Søren Højsgaard wrote: > I want to create a plot of positions (x(t),y(t)) of animals in a barn for > t=1,2,... (I have in mind creating many of these, saving them as png's and

Re: [R] R Solves Shakespeare Authorship Question

2009-06-01 Thread Stavros Macrakis
I don't know why this paper is getting our attention here -- it is just an undergraduate student term paper for a computer science course on statistics and data mining. -s On Mon, Jun 1, 2009 at 5:48 PM, wrote: > On Sat, 30-May-2009 at 07:42PM -0700, Arthur Burke wrote: > > |> Thos

Re: [R] how to checking whether elements of a vector changed or not.

2009-06-01 Thread Gabor Grothendieck
Try this: c(FALSE, !!diff(c(factor(x On Mon, Jun 1, 2009 at 11:57 AM, liujb wrote: > > Hello, > > I have a vector: > x <- c("A", "A", "A", "B", "A", "A", "C") > > I'd like to compare each of elements of vector x from its previous element > (except for the 1st element which does not have pre

[R] compatibility between R 2.7.0 and 2.8.1

2009-06-01 Thread Rheannon
Hello, I have some R code that I wrote with version 2.8.1 and have since needed to revert back to version 2.7.0 in order to run my R code with RPy for Python. R version 2.7.1 is the latest version RPy supports. My issue is my code is no longer running properly and I was hoping someone might be ab

[R] Creating a plot with an image as background

2009-06-01 Thread Søren Højsgaard
I want to create a plot of positions (x(t),y(t)) of animals in a barn for t=1,2,... (I have in mind creating many of these, saving them as png's and combining them into a small movie). I have an image file showing the physical layout of the barn, and I would like to have that image as background

Re: [R] Plots automatically closing when using RScript

2009-06-01 Thread Gabor Grothendieck
Try this: Rscript -e "png('abc.png');plot(1:10);dev.off()" && abc.png On Mon, Jun 1, 2009 at 3:23 PM, Rhizomorph wrote: > > I would like to be able to run an R script from the command line using > RScript.exe. The problem is, my script generates some plots which are being > automatically closed

[R] how to checking whether elements of a vector changed or not.

2009-06-01 Thread liujb
Hello, I have a vector: x <- c("A", "A", "A", "B", "A", "A", "C") I'd like to compare each of elements of vector x from its previous element (except for the 1st element which does not have previous element). So I'd like to get a vector y (of same length) that looks something like (0, 0, 0, 1, 1,

[R] Converting data.frame to xts

2009-06-01 Thread Ken Spriggs
I have a data.frame object and I don't really understand how to made an xts class out of it. Consider: > x <- data.frame(datetime, ltp, ltv) > head(x, 2) datetime ltp ltv 1 2009-05-05 07:30:01.604 899 1 2 2009-05-05 07:30:01.963 899 15 > class(x$datetime) [1] "POSIXt" "POSI

[R] Plots automatically closing when using RScript

2009-06-01 Thread Rhizomorph
I would like to be able to run an R script from the command line using RScript.exe. The problem is, my script generates some plots which are being automatically closed as soon as the script reaches its end. Is there a way to force the plot windows to remain open until the user explicitly closes th

[R] Editor R

2009-06-01 Thread Grześ
Do you know any good editor R? -- View this message in context: http://www.nabble.com/Editor-R-tp23822342p23822342.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/list

Re: [R] using "cochran.test()" as a "mcnemar.test()" ?

2009-06-01 Thread Tal Galili
Hi Chuck, Thank you for the fast reply. I looked through that thread (that's how I came across the commands I wrote). 1) My question was if this command (cochran.test) could be used the same way as (mcnemar.test). It obviously can't be, but maybe there is another command I don't know about. 2) Why

Re: [R] R Solves Shakespeare Authorship Question

2009-06-01 Thread p_connolly
On Sat, 30-May-2009 at 07:42PM -0700, Arthur Burke wrote: |> Those of you who track applications of R may be interested in the following: |> |> "The purpose of this paper is then to apply modern |> text analysis techniques using the R statistical packege [sic] That's not the only such typo. I ha

Re: [R] using "cochran.test()" as a "mcnemar.test()" ?

2009-06-01 Thread Chuck Cleland
On 6/1/2009 5:29 PM, Tal Galili wrote: > Hello all > I wish to perform a mcnemar.test() for a 5X5 matrix. > Wikipedia tells me (http://en.wikipedia.org/wiki/Cochran_test) I should turn > to cochran.test. > The only place I found it was in the "outliers" package, but the command > cochran.test() act

Re: [R] Fwd: subset dataframe/list

2009-06-01 Thread baptiste auguie
of course, this only applies if you have, getOption("OutDec") == "." In any case, follow David's suggestions. baptiste On 1 Jun 2009, at 23:20, baptiste auguie wrote: your data *seems* to have an unusual decimal separator. That would explain why the two-step conversion to numeric fails, whi

Re: [R] subset dataframe/list

2009-06-01 Thread Jorge Ivan Velez
Dear Cecilia, I have followed the replies you got and I found that, perhaps, what you are experiencing has something to do with the decimal symbol in your data. Consider the following: # Reading the data as you sent it to the list x <- read.table(textConnection("caedois b1 b2

Re: [R] creating list with 200 identical objects

2009-06-01 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: > > consider: > > setClass('foo', >representation=representation(content='environment')) > setMethod('initialize', 'foo', function(.Object) { > .obj...@content = new.env() > .obj...@content$name = 'foo' > .Object }) > > foos = rep

[R] using "cochran.test()" as a "mcnemar.test()" ?

2009-06-01 Thread Tal Galili
Hello all I wish to perform a mcnemar.test() for a 5X5 matrix. Wikipedia tells me (http://en.wikipedia.org/wiki/Cochran_test) I should turn to cochran.test. The only place I found it was in the "outliers" package, but the command cochran.test() acts differently then mcnemar.test() , and doesn't ta

Re: [R] Fwd: subset dataframe/list

2009-06-01 Thread baptiste auguie
your data *seems* to have an unusual decimal separator. That would explain why the two-step conversion to numeric fails, while the brute conversion to numeric always gives the factor integer codes. I don't know where your data comes from (str() would be helpful in any case), but if you read

Re: [R] subset dataframe/list

2009-06-01 Thread David Winsemius
So now is the time to back up to the beginning and demonstrate how you created the coeficientes object. Ideally you would also provide the results of: dput(coeficientes) or str(coeficientes) Subset will only work with dataframes, so if coeficientes is not a dataframe, then you will need

Re: [R] creating list with 200 identical objects

2009-06-01 Thread Wacek Kusnierczyk
Romain Francois wrote: > > rep( list( new("track") ), 5 ) > lapply( 1:5, function(x) new("track") ) > list( new("track") ) [ rep(1, 5 ) ] but note: these are not all equivalent. the second creates a list of five distinct objects, the first and last ones create a list of five times the same object

Re: [R] Axis label spanning multiple plots

2009-06-01 Thread baptiste auguie
sorry i misread the question -- i thought you wanted the two plots were in one row. Here are a few options, 1- use ggplot2 or lattice, this is the default position for the labels in a plot with facets > library(ggplot2) > qplot(mpg, wt, data=mtcars, facets=vs ~ .) 2- use layout() or split.s

[R] Sample based on Factor Selection Criteria

2009-06-01 Thread Josip Dasovic
Dear R-users: Hello all: I'm having difficulty creating a new data frame, which would be a subset of an existing data frame, creaed by the random selection of subsets of observations based on different values of variables within the data frame. Here's an example of what my data frame looks li

[R] kohonen SOM

2009-06-01 Thread George Chen
Hi All, I am experimenting with using binary data (1, 0) in the kohonen package. I would like either 1 or 0 to be mapped in SOM, but the package gives me 1 or 0 (as expected), but something in between. I am not scaling the binary data, but still there are in-between values. Can anybody sugges

[R] Fwd: subset dataframe/list

2009-06-01 Thread Cecilia Carmo
--- the forwarded message follows --- --- Begin Message --- Doesn´t work neither! head(coeficientes) caedois b1 b2 b3 11 0,033120395 -20,29478338 -0,274638864 22 -0,040629634 74,54239889 -0,069958424 35-0,001116816

Re: [R] Axis label spanning multiple plots

2009-06-01 Thread Andre Nathan
On Mon, 2009-06-01 at 22:24 +0200, baptiste auguie wrote: > you can use title() with the sub argument, > > title(sub="x label", outer=T) # you might want to play around with > line argument Can title() span two plots? I'm trying to use a single title for two plots, something like +

Re: [R] Axis label spanning multiple plots

2009-06-01 Thread baptiste auguie
you can use title() with the sub argument, title(sub="x label", outer=T) # you might want to play around with line argument baptiste On 1 Jun 2009, at 22:03, Andre Nathan wrote: Hello On Wed, 2009-05-27 at 13:38 -0600, Greg Snow wrote: Create an outer margin (see ?par), then use mtext to

Re: [R] subset dataframe/list

2009-06-01 Thread Cecilia Carmo
It doesn't work. b1 was substituted by NA's with this message: Warning message: NAs introduced by coercion I will see in the webpage that you mentioned. Thanks, Cecília Em Mon, 1 Jun 2009 13:23:12 -0400 David Winsemius escreveu: On Jun 1, 2009, at 1:01 PM, Cecilia Carmo wrote: Hi R-help

Re: [R] Axis label spanning multiple plots

2009-06-01 Thread Andre Nathan
Hello On Wed, 2009-05-27 at 13:38 -0600, Greg Snow wrote: > Create an outer margin (see ?par), then use mtext to put the title in the > outer margin. Sorry for taking that long to reply... I created an outer margin with par(oma = c (0, 2, 0, 0)) and then did par(mfrow = c(2, 1)) plot(.

Re: [R] write values of points beside points in plot

2009-06-01 Thread katharina
thanks, now I know what to look for Sorry the missunderstanding -Katharina David Winsemius wrote: > > > On Jun 1, 2009, at 2:27 PM, katharina wrote: > >> >> I've calculated coefficient$intercept for each site I took the data >> from. >> I want to plot this: >> plot(coefficient$intercept

[R] Anyone using Bespin & R?

2009-06-01 Thread Mike Lawrence
Just curious whether anyone has any experiences to relate with regards to using Bespin (https://bespin.mozilla.com/) as a text editor for your R scripting. Mike -- Mike Lawrence Graduate Student Department of Psychology Dalhousie University Looking to arrange a meeting? Check my public calendar

[R] Minor tick marks for date/time ggplot2 (this is better, but not exactly what I want)

2009-06-01 Thread stephen sefick
library(ggplot2) melt.updn <- (structure(list(date = structure(c(11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149, 11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057, 13149), class = "Date"), site = structure(c(

Re: [R] ggplot2 and Date class

2009-06-01 Thread hadley wickham
You might have an out-of-date version of the plyr package - try install.packages("plyr") Hadley On Mon, Jun 1, 2009 at 10:20 AM, Matt Frost wrote: > I'm trying to plot a time series in ggplot, but a date column in my > data frame is causing errors. Rather than provide my own data, I'll > just re

Re: [R] ggplot2 and Date class

2009-06-01 Thread stephen sefick
The example that you have provided works fine on my end. As far as I know everything is up to date on my end. Stephen Sefick On Mon, Jun 1, 2009 at 1:20 PM, Matt Frost wrote: > I'm trying to plot a time series in ggplot, but a date column in my > data frame is causing errors. Rather than provi

Re: [R] write values of points beside points in plot

2009-06-01 Thread David Winsemius
On Jun 1, 2009, at 2:27 PM, katharina wrote: I've calculated coefficient$intercept for each site I took the data from. I want to plot this: plot(coefficient$intercept ~ coefficient$average_BM_leaves_needles, main="intercepts ::: BM_leaves_needles") with the site number being displayed for

[R] Help HINov algorithm

2009-06-01 Thread alexkakashi
Hi, I have used the algoritm HINov (Heuristic Identification of Noisy Variables) and I have a problem with a dataset. Indeed there is always the error: "Error in kmeans(y, y[initial.Centers(y, u), ]) : initial centers are not distinct" I send my data set (Spss file): the variables are quantitative.

Re: [R] write values of points beside points in plot

2009-06-01 Thread katharina
I've calculated coefficient$intercept for each site I took the data from. I want to plot this: plot(coefficient$intercept ~ coefficient$average_BM_leaves_needles, main="intercepts ::: BM_leaves_needles") with the site number being displayed for each point in the graph/plot The site numbers are

Re: [R] Generating a count variable

2009-06-01 Thread David Winsemius
On Jun 1, 2009, at 1:14 PM, Joseph Magagnoli wrote: Dear All, I am practicing data manipulation and I would like to generarte a count variable. My data looks like this: Country MID 1 NA 10 10 11 1

[R] Generating a count variable

2009-06-01 Thread Joseph Magagnoli
Dear All, I am practicing data manipulation and I would like to generarte a count variable. My data looks like this: Country MID 1 NA 10 10 11 10 20 21 2

Re: [R] IP-Address

2009-06-01 Thread Henrik Bengtsson
Feel free to use my code however you want. If you put in a package I prefer an LGPL license, but not required. See R documentation on how to create a package. -H On Mon, Jun 1, 2009 at 9:00 AM, edwin wrote: > > Maybe you can make a package for something like this. (IP sort,etc). Like in > Perl

Re: [R] turn off graphic plot in histogram()

2009-06-01 Thread Greg Snow
You could use hist rather than histogram and then specify plot=FALSE. -- 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 B

[R] turn off graphic plot in histogram()

2009-06-01 Thread Steven Matthew Anderson
Is there a way to just produce the data object in histogram() and not run the plot portion? All I want it the $mids and $counts. Thank you Steven Matthew Anderson Anderson Research, LLC Statistical Programming and Analysis SAS (R) Certified Professional adastr...@mac.com Ad Astra per Asper

[R] problem with package creation under Windows and R 2.9.0

2009-06-01 Thread Antonio.Gasparrini
Dear R users, I found a small problem with the package creation procedure in R 2.9.0 under Windows. Basically, I input in the command prompt; Rcmd BUILD --binary --use-zip namepackage The procedure works, but the titles in the help pages of the created package lose the usual colours and fon

Re: [R] contour lines on persp plot

2009-06-01 Thread Uwe Ligges
One quick idea is to use the functions - contourLines() to calculate the contour lines - trans3d() to transform the 3D coordinates into the 2D space you will be plotting into - polygon() to plot the contour lines Uwe Ligges Jack Siegrist wrote: Hello folks, I am a beginner R user. I have

Re: [R] subset dataframe/list

2009-06-01 Thread David Winsemius
On Jun 1, 2009, at 1:01 PM, Cecilia Carmo wrote: Hi R-helpers! I have the following object: head(coeficientes) caedois b1 b2 b3 1 10,033120395 -20,29478338 -0,274638864 2 2 -0,040629634 74,54239889 -0,069958424 3 5 -0,001116816 35

[R] ggplot2 and Date class

2009-06-01 Thread Matt Frost
I'm trying to plot a time series in ggplot, but a date column in my data frame is causing errors. Rather than provide my own data, I'll just refer to the scale_date example at: http://had.co.nz/ggplot2/scale_date.html , which reproduces the error. > df <- data.frame( date = seq(Sys.Date(), len=100

Re: [R] Fast function for centering and standardizing variables

2009-06-01 Thread Greg Snow
?scale ?ave -- 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 Krzysztof Sakrejda-Leavitt > Sent: Monday, June 0

[R] subset dataframe/list

2009-06-01 Thread Cecilia Carmo
Hi R-helpers! I have the following object: head(coeficientes) caedois b1 b2 b3 1 10,033120395 -20,29478338 -0,274638864 2 2 -0,040629634 74,54239889 -0,069958424 3 5 -0,001116816 35,2398622 0,214327185 4 10 0,171875 5

Re: [R] strange behavior when reading csv

2009-06-01 Thread Thomas Keller
Martin, "The number of data columns is determined by looking at the first five lines of input (or the whole file if it has less than five lines), or from the length of col.names if it is specified and is longer. This could conceivably be wrong if fill or blank.lines.skip are true, so speci

Re: [R] Calling Fortran from C++

2009-06-01 Thread William Dunlap
> From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Thomas Lumley > Sent: Monday, June 01, 2009 9:33 AM > To: cls59 > Cc: r-help@r-project.org > Subject: Re: [R] Calling Fortran from C++ > > On Mon, 1 Jun 2009, cls59 wrote: > > > > > > > Giura Gauss wrote:

Re: [R] installing sn package

2009-06-01 Thread Uwe Ligges
Roslina Zakaria wrote: Hi r-users, I want to use the sn package but I got the following message: install.packages(repos=NULL,pkgs="c:\\Tinn-R\\sn_0.4-12.zip") Warning: package 'sn' is in use and will not be installed updating HTML package descriptions I did tried to do it a few times but i

Re: [R] Calling Fortran from C++

2009-06-01 Thread Thomas Lumley
On Mon, 1 Jun 2009, cls59 wrote: Giura Gauss wrote: Hi, can anybody point me to a package with C++ code that call Fortran subroutines? I am trying to do the same thing but we scarce success. Error in dyn.load("utils.so") : unable to load shared library 'utils.so': dlopen(utils.so, 6):

Re: [R] IP-Address

2009-06-01 Thread edwin
Maybe you can make a package for something like this. (IP sort,etc). Like in Perl, there is a module called Sort::Key::IPv4 I think, not only me has the same problem for sorting e.g IP? Eddie > Not really, just the old saying that any piece of code can be made > twice as fast (which often holds

Re: [R] Calling Fortran from C++

2009-06-01 Thread cls59
Giura Gauss wrote: > > Hi, > > can anybody point me to a package with C++ code that call Fortran > subroutines? > > I am trying to do the same thing but we scarce success. > > Error in dyn.load("utils.so") : > unable to load shared library 'utils.so': > dlopen(utils.so, 6): Symbol not fou

Re: [R] IP-Address

2009-06-01 Thread edwin
wow =P Thank you guys. I will use the hb2 , because it is the fastest one. Eddie > wow! :) > > vQ > > Henrik Bengtsson wrote: > > library(gsubfn) > > library(gtools) > > library(rbenchmark) > > > > n <- 1 > > df <- data.frame( > > a = rnorm(n), > > b = rnorm(n), > > c = rnorm(n), > >

Re: [R] Quantile GAM?

2009-06-01 Thread Brian S Cade
There are possibilities with rqss() as someone else mentioned. But you can also conduct a lot of useful modeling just by using b-splines within the the rq function - something like my.result <- rq(y ~ bs(x,degree=3)), where bs() is the b-spline function from the splines package. You get to spe

[R] Bug in hist() when working with Dates ?

2009-06-01 Thread S. Nunes
Hi, It seems that hist() has a buggy behavior when breaking over "days". The bug can be reproduced in a few steps: > d=data.frame(date=c("2009-01-01", "2009-01-02", "2009-01-02")) > d$date=as.Date(d$date) > d$date [1] "2009-01-01" "2009-01-02" "2009-01-02" > h=hist(d$date, "days") > h$count [1]

Re: [R] Error:non-numeric argument in my function

2009-06-01 Thread Wacek Kusnierczyk
i think the error message might be even better, but this would require '* to be even better. i know some will take it for lamenting: there is an ugly lack of consistency here: 1:2 # 1 2 1:2.5 # 1 2 (coercion double -> integer) 1:'2' # 1 2 (corecion character -> integer)

Re: [R] write values of points beside points in plot

2009-06-01 Thread jim holtman
?text On Mon, Jun 1, 2009 at 11:07 AM, Katharina May wrote: > Hi everyone, > > is it possible to write a certain value beside a point in a plot? > > I'm plotting the following: > plot(coefficient$intercept ~ coefficient$average_BM_leaves_needles, > main="intercepts ::: BM_leaves_needles", >

[R] write values of points beside points in plot

2009-06-01 Thread Katharina May
Hi everyone, is it possible to write a certain value beside a point in a plot? I'm plotting the following: plot(coefficient$intercept ~ coefficient$average_BM_leaves_needles, main="intercepts ::: BM_leaves_needles", ylab="intercepts", xlab="average BM_leaves_needles per site [kg]") and I wa

Re: [R] Error:non-numeric argument in my function

2009-06-01 Thread Stavros Macrakis
Agreed, that's even better, e.g. Error in 1 * "a" : character argument not allowed for arithmetic operator * For some reason (does anyone know the rationale?), in the case of factors, you don't get an error, but a more explicit warning and an NA result: > 2*factor(3) [1] NA Warning message:

Re: [R] exporting data to csv file -problem with column names

2009-06-01 Thread Adrian Dusa
Steven Matthew Anderson mac.com> writes: > [...] > Is there a way to exclude the row numbers from the exported csv file? > Or add a column name for row number to keep this from happening? Steven, see the "row.names" argument in write.table(), set it to FALSE. Adrian __

Re: [R] renaming column names

2009-06-01 Thread Robert W. Baer, Ph.D.
First, data is an R function so it is better to avoid it as a name for another object. For example, use dat instead. Try this: data(iris) dat=iris colnames(iris) [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species" colnames(dat) [1] "Sepal.Length" "Sepal.Width" "Petal.Le

[R] Fast function for centering and standardizing variables

2009-06-01 Thread Krzysztof Sakrejda-Leavitt
Hi, I wrote a function to center variables I use in regression and standardize them by the standard deviation (below) within certain groupings (much like the aggregate function can apply a function to groups). This runs fast enough when I have about 50 groups and 50k records, but sometimes I end

Re: [R] add values inside vector

2009-06-01 Thread Grześ
Yes it's sum. Thanks. I forgot about this function. Henrique Dallazuanna wrote: > > Use sum: > > sum(vec) > > On Mon, Jun 1, 2009 at 7:15 AM, Grze¶ wrote: > >> >> I think it's easy problem but I can't find solution. >> >> I have a vector: >> >> vec <- c (23.4, 3.0, 14.7, 7.7) >> >> and I w

Re: [R] add values inside vector

2009-06-01 Thread Henrique Dallazuanna
Use sum: sum(vec) On Mon, Jun 1, 2009 at 7:15 AM, Grze¶ wrote: > > I think it's easy problem but I can't find solution. > > I have a vector: > > vec <- c (23.4, 3.0, 14.7, 7.7) > > and I would like to add all values which are inside my vector to each > other. > > as a result a want to get one

Re: [R] add values inside vector

2009-06-01 Thread jim holtman
?sum On Mon, Jun 1, 2009 at 6:15 AM, Grze¶ wrote: > > I think it's easy problem but I can't find solution. > > I have a vector: > > vec <- c (23.4, 3.0, 14.7, 7.7) > > and I would like to add all values which are inside my vector to each > other. > > as a result a want to get one value like su

Re: [R] Nested variables

2009-06-01 Thread DanielWC
Hi. Yes I am trying to model such data, and i need R to know that Site is nested within Habitat. Do I use some kind of command before running the model (like factor() and so on) or do i write it in the model formula. If so, how? Thanks Douglas Bates-2 wrote: > > On Fri, May 29, 2009 at 7:50

  1   2   >