[R] Gamma Simulation from Exponential Distribution: find sample size given power and sig.Level

2018-10-28 Thread Black Yellow
I built my function to simulate two gamma distributions X and Y based on the sum of i.i.d exponential distributions. Assume my code is correct about this simulation, I am interested in finding an equal sample size n for X and Y such that n can be determined given 90% power and 5% significance level

Re: [R] date and time data on x axis

2018-10-28 Thread jim holtman
You need to specify what the format of the date will be. I am using ggplot for the plot: library(lubridate) library(tidyverse) mydata <- read.table(text = "time value 20181028_10:00:00 600 20181028_10:00:01 500 20181028_10:00:02 450 20181028_10:00:03 660", header = TR

Re: [R] date and time data on x axis

2018-10-28 Thread Rui Barradas
Hello, Maybe you could get some inspiration in the following code. op <- par(mar = c(4, 0, 0, 0) + par("mar")) plot(xdata, ydata, type = "o", xaxt = "n") axis.POSIXct(1, xdata, at = xdata, labels = xdata, las = 2) par(op) The important part is the call axis.POSIXct, argument las = 2 and the

[R] date and time data on x axis

2018-10-28 Thread snowball0916
Hi, guys How do you guys deal with the date and time data on x axis? I have some trouble with it. Could you help with this? = Sample Data = The sample data look like this: 20181028_10:00:00 600 20181028_10:00:01 500 20181028_10:00:02 450 20181028_10:00:03 660 .. ==

Re: [R] "logical indexing, " [was] match() question or needle haystack problem for a data.frame

2018-10-28 Thread David Winsemius
> On Oct 25, 2018, at 11:28 PM, Knut Krueger wrote: > > Am 25.10.18 um 16:13 schrieb peter dalgaard: >> >> Yes: x[!(x$A %in% y$B),] > > Ok thats in my opinion a little workaround > why?: > > There is an > = and != > < and > > > > means the opposite is available between terms. > > why is

[R] Handling bid dist object

2018-10-28 Thread Aerenbkts bkts
I have a distance/dissimilarity matrix (30K rows 30K columns) that is calculated in a loop and stored in ROM. I would like to do clustering over the matrix. I import and cluster it as below; Mydata<-read.csv("Mydata.csv") Mydata<-as.dist(Mydata) Results<-hclust(Mydata) But when I convert the m