Displaying 20 results from an estimated 60 matches for "set2".
Did you mean:
set
2009 Dec 11
4
extracting vectors from lists of lists
...ften want to
extract a particular result from each simulation for plotting and,
ideally, put it in a matrix.
A simple example
v1 <- 1:5
v2 <- 6:10
other1 <- "stuff"
other2 <- "stuff"
set1 <- list(v1,other1)
names(set1) <- c("vec","other")
set2 <- list(v2,other2)
names(set2) <- c("vec","other")
output <- list(set1, set2)
Is there some form of lapply() that will allow me to extract v1 and v2
(ie, the $vec elements) from both sets?
Bonus if I can then put it into a matrix tidily.
many thanks
Jennifer Young
2011 Mar 08
3
allocating factor levels
...1 14:25:00 haul1
9 Start.hauling 2011-01-01 21:28:00 haul1
10 Start.hauling 2011-01-02 03:38:00 haul1
11 Start.hauling 2011-01-02 09:28:00 haul1
12 Start.hauling 2011-01-02 14:22:00 haul1
13 Start.setting 2011-01-02 20:51:00 set2
14 Start.setting 2011-01-02 21:33:00 set2
15 Start.setting 2011-01-02 22:47:00 set2
16 Start.setting 2011-01-02 23:27:00 set2
17 Start.setting 2011-01-03 00:35:00 set2
18 Start.setting 2011-01-03 01:16:00 set2
19 St...
2017 Mar 09
4
[RFC] bitfield access shrinking
...ake
simple inst-by-inst scan unscalable and oftentimes fail. It also
breaks the load-and-or-store pattern. An example is below:
Before coalescing done by earlycse/loadpre:
%bf.load = load i64, i64* %0, align 8
%bf.clear = and i64 %bf.load, -65536
%bf.set = or i64 %bf.value, %bf.clear
store i64 %bf.set2, i64* %9, align 8
.....
%bf.load1 = load i64, i64* %0, align 8
%bf.clear1 = and i64 %bf.load1, -4294901761
%bf.set1 = or i64 %bf.value1, %bf.clear1
store i64 %bf.set2, i64* %9, align 8
.....
%bf.load2 = load i64, i64* %0, align 8
%bf.clear2 = and i64 %bf.load2, -4294901761
%bf.set2 = or i64 %bf.val...
2011 Jul 13
1
UNIX diff function
Colleagues,
(R: 2.13.0; OS X)
I often receive sequential datasets in which there are new rows interposed between existing rows. For example:
SET1 <- data.frame(list(LETTERS=LETTERS[c(1:4, 6:10)], NUMBERS=c(1:4, 6:10)))
SET2 <- data.frame(list(LETTERS=LETTERS[1:10], NUMBERS=1:10))
> SET1
LETTERS NUMBERS
1 A 1
2 B 2
3 C 3
4 D 4
5 F 6
6 G 7
7 H 8
8 I 9
9 J 10
> SET2
LETTERS NUMBERS
1 A 1...
2017 Mar 09
4
[RFC] bitfield access shrinking
...t also
>> breaks the load-and-or-store pattern. An example is below:
>>
>> Before coalescing done by earlycse/loadpre:
>> %bf.load = load i64, i64* %0, align 8
>> %bf.clear = and i64 %bf.load, -65536
>> %bf.set = or i64 %bf.value, %bf.clear
>> store i64 %bf.set2, i64* %9, align 8
>> .....
>> %bf.load1 = load i64, i64* %0, align 8
>> %bf.clear1 = and i64 %bf.load1, -4294901761
>> %bf.set1 = or i64 %bf.value1, %bf.clear1
>> store i64 %bf.set2, i64* %9, align 8
>> .....
>> %bf.load2 = load i64, i64* %0, align 8
>&g...
2007 Apr 28
1
The confidence level of p-value of ks.boot
...tion. I use function ks.boot{Matching}. And what is the confidence level of the p-value, returned by ks.boot function?
The code is:
set=read.table("http://stella.sai.msu.ru:8080/~gala/data/testsets.csv",
header=T,sep=',')
set1=set[!is.na(set$set1),'set1']
set2=set[!is.na(set$set2),'set2']
library(Matching)
ks.b=ks.boot(set1,set2,1000)
ks.b
Thank you!
2011 Feb 25
0
Help with card-sorting experiment
...is:
rset[1] <- reviewer1
rset[2] <- reviewer2 .
So when I try to do
adjustedRandIndex(rset[1],rset[2])
I get an error message:
Error in FUN(X, Y, ...) : comparison of these types is not implemented
And If I do this:
> rset[1]
[[1]]
[1] set1 set2 set1 set2 set1 set2 set1 set2 set1 set2
Levels: set1 set2
PROBLEM 2)
Some of my reviewers have put single cards into two piles (which was
allowed). However, this routine for the Adjusted Rand Index doesn't seem to
be able to handle that sort of category as an input. Is that a problem fo...
2009 Oct 14
1
pairs
Dear all,
I have two sets of data (say set1 and set2) as follow:
set1
x1
x2
x3
0.30
0.43
3.88
0.38
0.59
3.53
0.30
0.42
2.12
0.33
0.53
2.12
0.30
0.47
3.76
set2
y1
y2
y3
0.32
0.47
5.18
0.23
0.26
1.06
0.42
0.65
3.88
0.28
0.38
3.76
0.35
0.47
1.41
The "pairs" function (such as pairs(~x1+x2+x3 data=set1, main=&...
2011 Nov 03
1
For loop to cycle through datasets of differing lengths
...cle through datasets. When each dataset is
of equal length, it works fine as I can combine the datasets and have each
loop pick up a different column, but when the datasets are differing
lengths, I am struggling. Here is an example:
A<-1:10
B<-1:15
C<-1:18
Set1<-data.frame(A,runif(10))
Set2<-data.frame(B,runif(15))
Set3<-data.frame(C,runif(18))
for (i in 1:3){
if (i==1) Data<-Set1 else if (i==2) Data<-Set2 else Data<-Set3
dev.new()
plot(Data[,1],Data[,2])
}
I don't always want to plot them and instead do other things, such as fit a
non-linear equation to the data...
2017 Mar 09
3
[RFC] bitfield access shrinking
...t also
>> breaks the load-and-or-store pattern. An example is below:
>>
>> Before coalescing done by earlycse/loadpre:
>> %bf.load = load i64, i64* %0, align 8
>> %bf.clear = and i64 %bf.load, -65536
>> %bf.set = or i64 %bf.value, %bf.clear
>> store i64 %bf.set2, i64* %9, align 8
>> .....
>> %bf.load1 = load i64, i64* %0, align 8
>> %bf.clear1 = and i64 %bf.load1, -4294901761
>> %bf.set1 = or i64 %bf.value1, %bf.clear1
>> store i64 %bf.set2, i64* %9, align 8
>> .....
>> %bf.load2 = load i64, i64* %0, align 8
>&g...
2007 Sep 08
1
Problem with the aggregate command
...ate the data and get the medians of each of the 23 columns for each of the years. In other words my output should be like this
Year Median
1991 123
1992 145
1993 132
etc.
The sample lines of code to do this operation is
set1 <- subset(as.data.frame(dataset),rep1==1)
set2 <- subset(as.data.frame(dataset),rep1==0)
lst <- list(unique(yeara))
y1 <- aggregate(set1,lst,median)
y2 <- aggregate(set2,lst,median)
However I'm getting an error as follows
Error in FUN(X[[1]], ...) : arguments must have same length
Can somebody please help me with what I'm...
2007 Jan 26
3
Using tapply to create a new table
All,
I'm sure that this is covered somewhere, but I can't seem to find a good explanation. I have an existing table that contains information grouped by date. This is as so:
Day NumberOfCustomers NumberOfComplaints
20060512 10040 40
20060513 32420 11
...
I also have a table at the detail level as so:
Day Meal PricePaid UsedCupon
20060512 Fish 14 Y
20060512 Chicken 20 N
2011 Mar 29
1
Multiple area plots to share the same x-axis
...t;- nrow - ii.table.row + 1}
for(ii.col in seq(1, ncol)){
ii.table <- ii.p
if(ii.p > n) break
print(dots[[ii.table]], vp=vp.layout(ii.table.row, ii.col))
ii.p <- ii.p + 1
}
}
}
set <- read.table(file="http://www.jovian.nl/set.csv", head=1, sep=",")
set2 <- read.table(file="http://www.jovian.nl/set2.csv", head=1, sep=",")
library(ggplot2)
s <- ggplot(set, aes(x = time, y = hours)) + geom_area(colour = 'red', fill
= 'red', alpha = 0.5) +
geom_area(stat = 'smooth', span = 0.2, alpha = 0.3) + yli...
2010 Aug 09
1
Smart Indexing
...per id (i.e. a 1 to n
relationship). For the ease of modeling I now want to generate a new
data frame c, which is basically a copy of data frame 'a' augmented by
the values of b. If I have
a <- data.frame(id = rep(1:3, each=3), val=rnorm(9))
b <- data.frame(id=1:3, set1=LETTERS[1:3], set2=5:7)
the resulting data frame should look like:
c <- data.frame(id = rep(1:3, each=3), val = a$val,
set1=rep(LETTERS[1:3], each=3), set2 = rep(5:7, each = 3))
While this task is just an application of some 'rep's and 'c's for
structured data frames, it is somehow cumber...
2014 Feb 05
3
[Bug 895] New: Add a 'ipv6_address' set into a ipv4 table and vice versa
...set t-ipv6-set {
type ipv6_address
}
chain c-filter {
type filter hook input priority 0;
}
}
# With a ipv6-set
$ sudo nft add table ip6 t-ipv6
$ sudo nft add chain ip6 t-ipv6 c-filter { type filter hook input priority 0
\; }
$ sudo nft add set ip6 t-ipv6 ipv6-set2 { type ipv6_address\;}
$ sudo nft add set ip6 t-ipv6 ipv4-set2 { type ipv4_address\;}
$ sudo nft list table ip6 t-ipv6
table ip6 t-ipv6 {
set ipv6-set2 {
type ipv6_address
}
set ipv4-set2 {
type ipv4_address
}
chain c-filter {
type filter hook input...
2004 Jul 21
2
Cutting heatmap dendrogram
...4 or 25 in
the example below. Any guidance on if that's possible or not, and what
kinds of commands I should be looking into would be very much appreciated.
I'm using R 1.9.0 on Windows XP.
Thanks!
Paul
# load libraries
library(stats);
# working copy of data
set1 <- as.matrix(data);
set2 <- t(set1);
# genes
genes.distance <- as.dist(1-cor(set2));
genes.clusters <- hclust(genes.distance);
genes.dendrogr <- as.dendrogram(genes.clusters);
# samples
samples.distance <- as.dist(1-cor(set1));
samples.clusters <- hclust(samples.distance1);
samples.dendrogr <- as.den...
2012 Dec 10
3
use variable in for loop to name output files
Hi,
This question should be simple to answer. I am a new R user.
I have a data.frame called appended. I would like to break it into 7 smaller
datasets based on the value of a categorical variable dp (which has values
1:7). I would like to name the smaller datasets set1, set2, set3,....,set7.
I don't know how to refer to the variable in the for loop, when naming the
output datasets. In STATA (which I am much more familiar with) each i in the
foreach loop would be refered to as `i'. This is the code I've included
below. I've also tried set[[i]] and set[i]...
2007 Nov 21
1
How to select rows with identical index from two matrix?
Dear list,
I have two martix like these, each rows with name in the matrix.
I try to select rows with identical name from two matrix and calculate their correlation.
Matrix1:
2-Sep 9 5.5 1 7.18 10.0 8 139.45
2-Sep 7 4.9 15 8.22 61.68 9 123.62
4-Sep
5-Sep
AAMP
A2M
A2M
.
.
.
Matrix2:
2-Sep 4 7 1 6.8 12 8 19.4
2010 Feb 23
1
How to change a venn command into a named object that can be plotted like a lattice object
...and then plot at will.
I thought to convert the whole thing to a PostScript file then get it back into R via grImport, but surely (please!) there must be a less roundabout way to do this.
Any help is appreciated.
Here is my code:
# Wrapper function to draw Venn diagram
Venn2 <- function(set1, set2, names, title,...){
stopifnot( length(names) == 2)
# Form universe as union of both sets
universe <- sort( unique( c(set1, set2) ) )
Counts <- matrix(0, nrow=length(universe), ncol=2)
colnames(Counts) <- names
for (i in 1:length(universe)) {
Counts[i,1] <- universe[i] %...
2003 Mar 24
2
Box Plot Question
I would like to create 15 box plots from two sets of data.
Set1 - containts PayGrade, Min_Salary, Max_Salary data for 15 pay grades
Set2 - contains PayGrade, Actual_Min, Actual_Max, and Actual_Mean for the 15
pay grades
I would like 15 box plots (one for each paygrade) whose whiskers were the
Min_Salary and Max_Salary data
and whose ''box'' was Actual_Min, Actual_Mean, Actual_Max
in order to show -- for each of te...