Re: [R] regular pentagon

2014-03-09 Thread Barry Rowlingson
On Sun, Mar 9, 2014 at 5:11 AM, Rolf Turner r.tur...@auckland.ac.nz wrote: On 08/03/14 10:22, Yuanzhi Li wrote: Hello, everyone, Do you have any idea to get a set of random points within a regular pentagon? Thanks in advance! You can easily do this using the spatstat package. Or

[R] Can rJava connect with Oracle JDK7 on Mac OS X?

2014-03-09 Thread Osamu Ogasawara
Hello, I'm writing a program that provide an interactive interface between R and JavaFX (2.2+), https://github.com/oogasawa/rjfx.chart on the top of the rJava package. This program works fine on Linux and MS-Windows, but it does not work on Mac OS X. The reason seems that rJava on Mac OS X

Re: [R] package environment versus namespace environment

2014-03-09 Thread Duncan Murdoch
On 14-03-08 6:42 PM, Benjamin Tyner wrote: Duncan, Thank you for the informative link. So, do the loaded namespaces have an ordering akin to the package search path that determines that functions in the base namespace can see objects in the utils namespace? (I noticed that loadedNamespaces()

Re: [R] Saving R files

2014-03-09 Thread Ista Zahn
Hi David, Again, please keep the list copied. I think the documentation is clear, but if you still have doubts why don't you try it and see? Best, Ista On Sat, Mar 8, 2014 at 11:39 PM, David Parkhurst parkh...@imap.iu.edu wrote: That talks about saving to file .RData. I'm still asking, can I

[R] as.Date converts to NA

2014-03-09 Thread Hermann Norpois
Hello, I have some problems with as.Date. strDates - c (01/05/1965, 08/16/1975) dates - as.Date (strDates, %m/%d%/%Y) dates [1] NA NA # I expected my dates. What was going wrong? Thanks Hermann [[alternative HTML version deleted]] __

Re: [R] as.Date converts to NA

2014-03-09 Thread Uwe Ligges
On 09.03.2014 11:34, Hermann Norpois wrote: Hello, I have some problems with as.Date. strDates - c (01/05/1965, 08/16/1975) dates - as.Date (strDates, %m/%d%/%Y) ^ Remove the % after the d. Best, Uwe Ligges dates [1] NA NA # I expected my dates. What

Re: [R] as.Date converts to NA

2014-03-09 Thread Achim Zeileis
On Sun, 9 Mar 2014, Hermann Norpois wrote: Hello, I have some problems with as.Date. strDates - c (01/05/1965, 08/16/1975) dates - as.Date (strDates, %m/%d%/%Y) Instead of %d% just %d: R as.Date(strDates, %m/%d/%Y) [1] 1965-01-05 1975-08-16 dates [1]

Re: [R] Can rJava connect with Oracle JDK7 on Mac OS X?

2014-03-09 Thread Brian Ripley
This is all in the R-admin manual. You may have to install rJava from the sources. And such questions belong on r-sig-mac: see the posting guide. On 9 Mar 2014, at 11:32, Osamu Ogasawara osamu.ogasaw...@gmail.com wrote: Hello, I'm writing a program that provide an interactive interface

Re: [R] package environment versus namespace environment

2014-03-09 Thread Benjamin Tyner
Duncan, Thanks for the explanation and commentary. Starting to make more sense...so, long story short, it seems the first thing one should check is whether base imports utils: packageDescription(base) Package: base Version: 3.0.1 Priority: base Title:

Re: [R] Saving R files

2014-03-09 Thread William Dunlap
Can I do this (in Windows 7) to save everything that comes up with ls(), guessed at by what I find with ?rm: save(list=ls(),file=C:\am\myfiles\ProjectA.RData) Or would I need forward slashes, but this would otherwise work? You did not show the error message you got from that

Re: [R] Saving R files

2014-03-09 Thread David Parkhurst
I hadn’t seen an error message because I hadn’t tried it yet. I was leery of doing so for two reasons. First, I didn’t seen anything in the ?save page that said it was possible to save to a file and directory of the user’s choice, and later to retrieve it! It would be very useful to a

[R] Help - Strucchange pakage

2014-03-09 Thread Umaga Optudio
Hi there, in Zeileis, Klieber Kramer and Hornik (2003) - Testing and dating of structural changes in practice its shows how to use the strucchange pakge to determine breakpoints in time series, my question is in regard to one of the figures that is presented in this paper. At the end of every

Re: [R] as.Date converts to NA

2014-03-09 Thread arun
Hi, Check for the additional % in your code %d%.  as.Date(strDates,%m/%d/%Y) #[1] 1965-01-05 1975-08-16 A.K. On Sunday, March 9, 2014 12:16 PM, Hermann Norpois hnorp...@gmail.com wrote: Hello, I have some problems with as.Date. strDates - c (01/05/1965, 08/16/1975) dates - as.Date (strDates,

[R] cum sums

2014-03-09 Thread Philip A. Viton
Suppose I have a dataframe beginning: id yr val a 1950 1 b 1950 10 a 1951 2 I'm trying to produce a table of cumulative sums of val, disaggregated by id and then yr, so the result should begin id yr cumval a 1950 1 a 1951 3 b 1950 10 I've been trying to do this using

Re: [R] Help - Strucchange pakage

2014-03-09 Thread Achim Zeileis
On Sun, 9 Mar 2014, Umaga Optudio wrote: Hi there, in Zeileis, Klieber Kramer and Hornik (2003) - Testing and dating of structural changes in practice its shows how to use the strucchange pakge to determine breakpoints in time series, my question is in regard to one of the figures that is

[R] How to obtain a mean by more than one other variable

2014-03-09 Thread Erynn Call
I'm trying to create a new variable (meanABUNDHA) by obtaining a mean value *by* other variables. I surveyed birds (multiple species) at multiple sites and have multiple surveys within a REP (i.e. in example data below, SURVEY 55 and 57 are in REP 11). I need the mean ABUNDHA (pooling SURVEY)

Re: [R] cum sums

2014-03-09 Thread Jim Lemon
On 03/10/2014 05:57 AM, Philip A. Viton wrote: Suppose I have a dataframe beginning: id yr val a 1950 1 b 1950 10 a 1951 2 I'm trying to produce a table of cumulative sums of val, disaggregated by id and then yr, so the result should begin id yr cumval a 1950 1 a 1951 3 b 1950 10 I've been

[R] Help resolving issues with generating a chi-squared density plot from scratch

2014-03-09 Thread Levi Robinson
I wrote the code to graph a chi-squared density function, shade the percentile, and point to the CV, but it has a few issues I can't seem to resolve 1. It won't work at all for DF = 1 due to ylim going to infinity, but I haven't been able to resolve this still after hours of trying. 2) The y-axis

Re: [R] How to obtain a mean by more than one other variable

2014-03-09 Thread Peter Alspach
Tena koe Erynn Have you checked tapply and aggregate? HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Erynn Call Sent: Monday, 10 March 2014 3:40 p.m. To: r-help@r-project.org Subject: [R] How to obtain a

Re: [R] How to obtain a mean by more than one other variable

2014-03-09 Thread Andrew Koeser
One function I like is from package psych. library(psych) describe.by(ARK$TotalWater, group=Tray:Pot) Andrew Koeser On 3/9/2014 10:39 PM, Erynn Call wrote: I'm trying to create a new variable (meanABUNDHA) by obtaining a mean value *by* other variables. I surveyed birds (multiple species) at

Re: [R] cum sums

2014-03-09 Thread Peter Alspach
Tena koe Philip An alternative to Jim's solution which seems to work and you may, or may not, find less messy: df - read.table(text=id yr val a 1950 1 b 1950 10 a 1951 2 b 1952 3 c 1952 4 a 1954 5 b 1954 2 c 1954 3,header=TRUE) df1 - df[order(df$id, df$yr),] df1$valCS - unlist(by(df1$val,