Hi All,
Recently I'm doing my thesis with LHS, and I created the design by using the
folloing code.
require(DiceDesign)
require(DoE.wrapper)
set.seed(27662)
LHD=lhs.design(200,7,type=dmax,factor.names=list(
Angle1=c(80,90),Angle2=c(90,100),
Angle3=c(32,40),Radial2=c(10,15),
This post should help
http://stackoverflow.com/questions/9216138/find-the-day-of-a-week-in-r
John Kane
Kingston ON Canada
-Original Message-
From: cami090...@icloud.com
Sent: Sat, 31 Jan 2015 10:06:08 +0100
To: r-help@r-project.org
Subject: [R] R problem
Hi there,
I have a
Hi Philippe,
Ah! Thanks for pointing out the pesky ifelse() issue. I have only recently
been learning (the hard way) that ifelse() is not a tool for the uninformed
like me, but it is ever so tempting!
I would like to offer another way to speed things up. findInterval() can be
quite fast,
R x64 3.1.2 RStudio win8.1 64x error in submission
assignment 3 best function
*actually i have 2 code *
*the first have good **output but error in submission :*
*Selection: 1Error in best(BB, heart attack) : Invalid stateCalled
from: .rs.breakOnError(TRUE)*
best - function(state, outcome) {
Hi there,
I have a problem, i have a dataset, in which there are time series from 2010-
to 2014, like this:
-2014-01-30 15:39:46
-2012-04-20 14:49:02
And so on .
I want to have a situation in which there are days of week expressed in word,
because I have to calculate days of week and on the
I am trying to understand the Error function and its use in ANOVA. In
particular I want to understand the difference between two models that differ
only with respect to the Error statement:
aovsubj- aov(value~group+time+Error(subject),data=dataRMANOVA)
and
Also note that ifelse() should be avoided as much as possible. To define a
piecewise function you can use this trick:
func - function (x, min, max) 1/(max-min) * (x = min x = max)
The performances are much better. This has no impact here, but it is a good
habit to take in case you manipulate
On 31 Jan 2015, at 09:39 , Rolf Turner r.tur...@auckland.ac.nz wrote:
On 31/01/15 21:10, C W wrote:
Hi Bill,
One quick question. What if I wanted to use curve() for a uniform
distribution?
Say, unif(0.5, 1.3), 0 elsewhere.
My R code:
func - function(min, max){
1 / (max - min)
Hi Bill,
One quick question. What if I wanted to use curve() for a uniform
distribution?
Say, unif(0.5, 1.3), 0 elsewhere.
My R code:
func - function(min, max){
1 / (max - min)
}
curve(func(min = 0.5, max = 1.3), from = 0, to = 2)
curve() wants an expression, but I have a constant. And I
On 30 Jan 2015, at 20:34 , Evan Cooch evan.co...@gmail.com wrote:
The (obvious, after the fact) solution at the bottom. D'oh...
[snip]
Forgot I was dealing with a multi-dimensional array, not a list. So,
following works fine. I'm sure there are better approaches (where 'better' is
On 31/01/15 21:10, C W wrote:
Hi Bill,
One quick question. What if I wanted to use curve() for a uniform
distribution?
Say, unif(0.5, 1.3), 0 elsewhere.
My R code:
func - function(min, max){
1 / (max - min)
}
curve(func(min = 0.5, max = 1.3), from = 0, to = 2)
curve() wants an
Because your code includes set.seed, I would expect that running it all from
scratch should lead to the same result every time. I an not familiar with that
specific package, so there could be a surprise in it, but unlikely. I suspect
that you are running parts of the code to get different
ex - strptime(c(2014-01-30 15:39:46, 2012-04-20 14:49:02),
format=%Y-%m-%d %H:%M:%S)
ex
[1] 2014-01-30 15:39:46 CST 2012-04-20 14:49:02 CST
format(ex, format=%a)
[1] Thu Fri
format(ex, format=%A)
[1] Thursday Friday
weekdays(ex)
[1] Thursday Friday
Is this what you are looking for? I
Hi Ahmed,
It also works with the following working environment:
R.version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 1.2
year 2014
month 10
day
This is clearly a homework problem and probably one for an online Coursera
course. If that guess is correct, then you should be using the facilities for
help through the course website.
On Jan 31, 2015, at 2:11 AM, Wael Hammam Fouad wrote:
R x64 3.1.2 RStudio win8.1 64x error in submission
Here is another implementation:
b
[1] 1 2 3 4 5
c
[1] 1 2 1 3 5 4
outer(c,b, ==)*1
[,1] [,2] [,3] [,4] [,5]
[1,]10000
[2,]01000
[3,]10000
[4,]00100
[5,]00001
[6,]00010
Greetings
I wanted to suggest that the CRAN website needs to be updated to look and
fuction more like the Python website (https://www.python.org/). Hopefully
better. I know this is an open source project and I am more appreciative
of this project than you know. But, I would like to see it
You can also add names to the dimensions:
dimnames(P)[[1]] - c(live,dead)
dimnames(P)[[2]] - c(old,young)
names(dimnames(P)) - c(status, age, NULL)
P
, , 1
age
status old young
live 1 2
dead 3 4
, , 2
age
status old young
live 5 6
dead 7 8
R 3.1.2
Windows 7
Colleagues
I am working with c code that reads sas7bdat files into R. I have been
successful in compiling and running the code in both OS X and Windows.
Recently, the author of the c code added code that calls iconv.h (in order to
convert encodings). Using the new version
For class 'ts' the 'window' function in the base package will do it.
x - ts(101:117, start=2001.75, frequency=4)
x
Qtr1 Qtr2 Qtr3 Qtr4
2001 101
2002 102 103 104 105
2003 106 107 108 109
2004 110 111 112 113
2005 114 115 116 117
window(x, start=2002.5)
It would have been nice if you had at least supplied a subset (~10 lines)
from a couple of files so we could see what the data looks like and test
out any solution. Since you are using 'data.table', you should probably
also use 'fread' for reading in the data. Here is a possible approach of
Hi
Is there an easy way to drop, for instance, the first 4 observation of a
time series object in R? I have tried to google the answer without any
luck.
To be more clear:
Let us say that I have a time seres object x which data from 2000Q1 to
2014Q4 but I only want the data from 2001Q1 to
Dear All,
The latest issue of The R Journal is now available at
http://journal.r-project.org/archive/2014-2/
Many thanks to all contributors.
Regards,
-Deepayan
___
r-annou...@r-project.org mailing list
I have climate data for 20 years for US counties (FIPS) in csv format, each
file represents one year of data. I have extracted the data and reshaped
the yearly data files using melt();
for (i in filelist) {
tmp1 - as.data.table(read.csv(i,header=T, sep=,))
tmp2 - melt(tmp1, id=FIPS)
On Sat, Jan 31, 2015 at 2:16 PM, Mikael Olai Milhøj
mikaelmil...@gmail.com wrote:
Hi
Is there an easy way to drop, for instance, the first 4 observation of a
time series object in R? I have tried to google the answer without any
luck.
To be more clear:
Let us say that I have a time seres
Could you provide an example of trying to use pt.cex that does not do the
job?
Using pt.cex works fine for me when I've used it (R version 3.1.2 both 32
bit and 64 bit).
Here's some dummy code that demonstrates that the symbol size changes w/o
changing the text size:
26 matches
Mail list logo