I've found something irritating in the behaviour of dirname() and
subsequent interactions with file.path() and file.exists(). The problem is
how it and they deal with trailing path separators. It seems the code is
correct to specification but I think it could be better. Part of the
problem is re
I am running a DOE with the following code library(Rcmdr)
library(RcmdrMisc)
library(RcmdrPlugin.DoE)
# Define plackett burman experiment
PB.DOE <- pb(nruns= 12 ,n12.taguchi= FALSE ,nfactors= 12 -1, ncenter= 0 ,
replications= 1 ,repeat.only= FALSE ,randomize= TRUE ,se
Hi Miluj,
Perhaps you didn't get my previous email. Let your data frame be named "msdf":
block_col_summ<-function(x,step,block_size,FUN="mean") {
dimx<-dim(x)
return_value<-NA
start<-1
end<-start+block_size-1
block_count<-1
while(end <= dimx[2]) {
return_value[block_count]<-
do.call(FUN
Hi group,
I have a vector of numeric items and I want to replace based on
logical operator (> or <) with 'up', 'down' or 'nochange'
The way I am doing works sometimes and does not work sometime. I dont
understand the problem. In this example, that works for condition DN
first, gets over-written
Your goal is fundamentally flawed, since all elements of a vector must be if
the same type.
Create another vector to hold your character information.
kc <- rep( 'NC', length( kx ) )
kc[ kx <= qt[[2]] ] <- 'DN'
kc[ kx >=qt [[4]] ] <- 'UP'
--
Sent from my phone. Please excuse my brevity.
On N
Your first replacement in kx changed it to a character vector and
comparisons
of character strings given different results than comparisons of numbers
> kx <- 1:10
> qt <- quantile(kx)
> kx[kx <= qt[2]] <- "DN"
> kx
[1] "DN" "DN" "DN" "4" "5" "6" "7" "8" "9" "10"
> "10" < "6"
[1] TRUE
>
> #
Dear all;
I am getting the following error message when I run maSigPro package by
using
make.design.matrix commend. I could not figure out why this error happens.
Thanks for your help
Greg
Error in Summary.factor(c(24L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, :
‘min’ not meaningful for facto
On 12/11/2016 7:33 PM, greg holly wrote:
Dear all;
I am getting the following error message when I run maSigPro package by
using
make.design.matrix commend. I could not figure out why this error happens.
Thanks for your help
Greg
Error in Summary.factor(c(24L, 28L, 29L, 30L, 31L, 32L, 33L, 34
Hi Duncan;
Thanks for this. I used followed command. In command line: blood is the
name of the data file, degree=11 because I have 12-time point. I need to
create the design matrix of dummies (named des_blood) for fitting time
series micorarray gene expression experiments using maSigPro program.
Hi,
We can match one numerical value as follows
> 3 %in% c(4,5)
[1] FALSE
> 3 %in% c(4,5,3)
[1] TRUE
To see whether value pairs are identical,
> identical(c(3,4), c(3,5))
[1] FALSE
> identical(c(3,4), c(3,4))
[1] TRUE
Is there any way to test whether “A value pair is in a set of value
p
On 12/11/2016 8:36 PM, John wrote:
Hi,
We can match one numerical value as follows
3 %in% c(4,5)
[1] FALSE
3 %in% c(4,5,3)
[1] TRUE
To see whether value pairs are identical,
identical(c(3,4), c(3,5))
[1] FALSE
identical(c(3,4), c(3,4))
[1] TRUE
Is there any way to test whether
On 12/11/2016 8:14 PM, greg holly wrote:
Hi Duncan;
Thanks for this. I used followed command. In command line: blood is the
name of the data file, degree=11 because I have 12-time point. I need to
create the design matrix of dummies (named des_blood) for fitting time
series micorarray gene expr
This really depends on the way you represent these pairs. Here is some food for
thought:
p <- matrix( c( 1,2, 4,3, 3,3, 2,3, 4,5 ), byrow=TRUE, ncol=2 )
( 2 %in% p[,1] ) & ( 3 %in% p[,2] ) # (2,3)
( c( 2, 1, 5 ) %in% p[,1] ) & ( c( 3, 2, 5 ) %in% p[,2] ) # (2,3) (1,2) (5,5)
--
Sent from my phon
> S <- list(c(1,2), c(4,3), c(3,3), c(2,3), c(4,5))
> list(c(1,2), c(3,4), c(2,3)) %in% S # is in S?
[1] TRUE FALSE TRUE
> match(list(c(1,2), c(3,4), c(2,3)), S) # which element of S?
[1] 1 NA 4
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Sat, Nov 12, 2016 at 5:36 PM, John wrote:
> Hi,
Sorry, that was a fail. Better to think about:
any( 2 == p[,1] & 3 == p[,2] )
v <- matrix( c( 2,3, 1,2, 5,5 ), byrow=TRUE, ncol=2 )
apply( v, 1, function(x) { any( x[1]==p[,1] & x[2]==p[,2] ) } )
--
Sent from my phone. Please excuse my brevity.
On November 12, 2016 6:11:13 PM PST, Jeff Newmille
Hi john,
I don't know whether this breaks any rules, but:
target_pair<-c(3,4)
pair_list<-list(c(1,2),c(3,4),c(5,6))
sapply(pair_list,identical,target_pair)
[1] FALSE TRUE FALSE
Jim
On Sun, Nov 13, 2016 at 1:32 PM, Jeff Newmiller
wrote:
> Sorry, that was a fail. Better to think about:
>
> any(
I'm still not clear about whether this is a bug in foreach. Should c.Date be
invoked by foreach with .combine='c'?
On 11/06/2016 07:02 PM, William Dunlap wrote:
Note that in the OP's example c.Date is never invoked. c.Date is called if
.combine
calls c rather than if .combine is c:
> library(z
17 matches
Mail list logo