[R] Plot Arrows with Angle and length

2017-03-29 Thread julio cesar oliveira
Dears, The arrows command uses the start and end coordinates of each vector, but I have the starting coordinates, azimuth, and length. So, There are package that plot this arrows? Example: > x<- c(1,2,4) > y<- c(2,3,5) > Azimuth<- c(45,90,180) > Length<- c(1,0.5,1) Thanks, Julio [[a

Re: [R] Plot Arrows with Angle and length

2017-03-29 Thread Bert Gunter
It's just basic trig to convert. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Mar 29, 2017 at 6:44 AM, julio cesar oliveira wrote: > Dears, >

[R] Archive format

2017-03-29 Thread Joe Gain
Hello, we are collecting information on the subject of research data management in German on the webplatform: www.forschungsdaten.info One of the topics, which we are writing about, is how to *archive* data. Unfortunately, none of us in the project is an expert with respect to R and so I wo

Re: [R] Plot Arrows with Angle and length

2017-03-29 Thread S Ellison
> The arrows command uses the start and end coordinates of each vector, but > I have the starting coordinates, azimuth, and length. > > So, There are package that plot this arrows? > > Example: > > > x<- c(1,2,4) > > y<- c(2,3,5) > > Azimuth<- c(45,90,180) > > Length<- c(1,0.5,1) May be package

[R] [R-pkgs] valaddin (0.1.0): Make your functions more robust

2017-03-29 Thread Eugene Ha
Dear fellow R users, valaddin (0.1.0) has been published on CRAN: https://cran.r-project.org/package=valaddin Using valaddin, you can transform an existing function into a function with input validation, without having to rewrite it with stop() or stopifnot() statements. It therefore provides a c

Re: [R] Plot Arrows with Angle and length - correction

2017-03-29 Thread S Ellison
Apologies; 'length' is an arrows() argument. Use something else - see below. > > x<- c(1,2,4) > > y<- c(2,3,5) > > Azimuth<- c(45,90,180) > > Length<- c(1,0.5,1) May be packages out there but if it's a quick fix you want, roll your own. arrows.az <- function(x, y, azimuth, size, ..., units=c("de

Re: [R] Archive format

2017-03-29 Thread Bert Gunter
Joe: 1. This may be the wrong forum for this question, as this list is about R programming issues. However, I don't know what the right forum should be. You might consider stats.stackexchange.com. Some IT forum might be better (but which???) 2. A google search on "data formats for archiving" (or

Re: [R] Archive format

2017-03-29 Thread Thierry Onkelinx
Dear Joe, I'd choose a plain text format. They can be read and parsed with a very wide range of software. That is IMHO a much more important factor for long term archivation that file size or the ease to read it with specific software. The choice between tab-delimited, comma separated values, XML

[R] RMySQL system error: 10060

2017-03-29 Thread Omayma Said
I have a project with a connection that was working properly on the same device. I usually work on two devices and pull my updates from a remote repo. I suddenly got the error below. However, I could connect from the same device through MySQL workbench. I posted the on [Stackoverflow]( http://stac

[R] Getting an unexpected extra row when merging two dataframes

2017-03-29 Thread Paul Bernal
Hello everyone, Hope you are all doing great. So I have two datasets: -dataset1Frame: which contains the historical number of transits from october 1st, 1985 up to march 1, 2017. It has two columns, one called TransitDate and the other called Transits. dataset1Frame is a table comming from an SQL

Re: [R] Plot Arrows with Angle and length

2017-03-29 Thread William Dunlap via R-help
II find using complex numbers makes for less typing with this sort of thing. Note the use of plot(asp=1,...) to force equal scales on both axes so the angles are right. (I think asp=1 should have been the default when plotting complex numbers, but too late now.) > azimuthToNative <- function(degr

Re: [R] Archive format

2017-03-29 Thread Jeff Newmiller
The relevance to R (and therefore R-help) of this question is marginal at best. R might not be the language of choice when you go retrieve the data. Also, this question seems dangerously close to a troll, because the obvious answer is that the data should be in an open format but if you are not

Re: [R] Plot Arrows with Angle and length

2017-03-29 Thread Jim Lemon
Hi Julio, Perhaps "vectorField" (plotrix) is what you are looking for. Jim On Thu, Mar 30, 2017 at 12:44 AM, julio cesar oliveira wrote: > Dears, > > The arrows command uses the start and end coordinates of each vector, but I > have the starting coordinates, azimuth, and length. > > So, There a

[R] I want to delete "yhat" and transpose "Response" into a vector

2017-03-29 Thread BR_email
Hi R'ers: I need a little help. Thanks in advance. Bruce dd<- read.csv("C:/R_Data/firstRdata.csv", sep=",", header=TRUE) dd<- data.frame(yhat,Response) attach(dd) dd <- dd[order(-yhat),] dd # delete yhat and transpose Response into a vector Attached is dataset. -- Bruce ___

Re: [R] I want to delete "yhat" and transpose "Response" into a vector

2017-03-29 Thread Duncan Murdoch
On 29/03/2017 6:14 PM, BR_email wrote: Hi R'ers: I need a little help. Thanks in advance. Bruce dd<- read.csv("C:/R_Data/firstRdata.csv", sep=",", header=TRUE) dd<- data.frame(yhat,Response) attach(dd) dd <- dd[order(-yhat),] dd # delete yhat and transpose Response into a vector Sound

Re: [R] I want to delete "yhat" and transpose "Response" into a vector

2017-03-29 Thread Jim Lemon
Hi Bruce, Before we get into the whole business of why your CSV file is lying by the side of the road to the R help list, let's deal with a few more important things. 1) You have created a data frame "dd" by reading your CSV file (we hope). 2) You have then overwritten this with two vectors (?) o

Re: [R] I want to delete "yhat" and transpose "Response" into a vector

2017-03-29 Thread Bruce Ratner PhD
Duncan, it's not a homework assignment. Jim, thank you. Bruce __ Bruce Ratner PhD The Significant Statistician™ (516) 791-3544 Statistical Predictive Analytics -- www.DMSTAT1.com Machine-Learning Data Mining -- www.GenIQ.net > On Mar 29, 2017, at 6:29 PM, Duncan Murdoch wrote: >

Re: [R] I want to delete "yhat" and transpose "Response" into a vector

2017-03-29 Thread Bruce Ratner PhD
Duncan, it's not a homework assignment. Thanks. Bruce __ > On Mar 29, 2017, at 6:29 PM, Duncan Murdoch wrote: > >> On 29/03/2017 6:14 PM, BR_email wrote: >> Hi R'ers: >> I need a little help. >> Thanks in advance. >> Bruce >> >> dd<- read.csv("C:/R_Data/firstRdata.csv", s

Re: [R] Getting an unexpected extra row when merging two dataframes

2017-03-29 Thread jim holtman
first of all when you read the data in you get 379 rows of data since you did not say 'header = TRUE' in the read.table. Here is what the first 6 lines of you data are: > dataset1 <- read.table('/users/jh52822/downloads/containertestdata.txt') > > str(dataset1) 'data.frame': 379 obs. of 2 vari

[R] Parallel programming.

2017-03-29 Thread Art U
Hello everyone, I have general question about parallel programming. I'm doing simulations that involves bootstrap. For now I'm using parLapply only for bootstrap part and then function "replicate" for simulations. It is very long function, so here is a short version: simfun=function(data,n,alpha

[R] Calculating between and within subject coefficient of variation

2017-03-29 Thread Alicia Ellis
Let's say I have repeated measures of some outcome on some subjects. I want to be able to calculate the within and between subject coefficient of variation for this measure. An example data frame is: df<-data.frame(ID = c(1,1,1,2,2,2,3,3,3), DAY = c(0,3,6, 0,3,6, 0,3,6),