Displaying 20 results from an estimated 21 matches for "ind3".
Did you mean:
ind
2011 Dec 04
2
frequency table?
...s rows. And I wanted a table which tells me how many times each
individual occurs with another. I don't really know how such a table is
called...it is not a frequency table....My eventual goal is to make
Venn-diagrams from the occurence of my individuals.
So I've this:
cluster ind1 ind2 ind3 etc.
1 0 1 2
2 3 0 1
3 1 1 1
And I want to go to this:
ind1 ind2 ind3
ind1 0 4 2
ind2 4 0 4
ind3 2 4 1
is there a way to do this?
Thank you...
2011 Mar 10
2
within group sequential subtraction
Hi Everyone,
I would like to do sequential subtractions within a group so that I know the
time between separate observations for a group of individuals.
My data:
data <- structure(list(group = c("IND1", "IND1", "IND2",
"IND2", "IND2", "IND3", "IND4", "IND5",
"IND6", "IND6"), date_obs = structure(c(6468,
7063, 9981, 14186, 14372, 5129, 9767, 11168, 10243, 10647), class =
"Date")), .Names = c("group",
"date_obs"), row.names = c(NA, 10L), class = "data.fra...
2011 Dec 04
1
similarity matrix
...a file with individuals as colums and the clusters where they occur
in as rows. And I wanted a similarity matrix which tells me how many times
each individual occurs with another. My eventual goal is to make
Venn-diagrams from the occurence of my individuals.
So I've this:
cluster ind1 ind2 ind3 etc.
1 0 1 2
2 3 0 1
3 1 1 1
And I want to go to this:
ind1 ind2 ind3
ind1 0 4 2
ind2 4 0 4
ind3 2 4 1
is there a way to do this?
Thank you...
2009 Sep 11
2
Accumulating results from "for" loop in a list/array
...c = c(rep("n",7),rep("y",3)), d =
c("y", rep("n",4), rep("y",2), rep("n",3)))
for (i in 1:(dim(x)[2])) {
assign(paste("ind", i, sep = ""), which(x[ , i] == "y"))
accum <- c(ind1, ind2, ind3, ind4)
}
> ind1
[1] 4 5 9 10
> ind2
[1] 1 2 7 8 9
> ind3
[1] 8 9 10
> ind4
[1] 1 6 7
> accum
[1] 4 5 9 10 1 2 7 8 9 8 9 10 1 6 7
Are there any alternative method where the highlighted statement above can
be represented without typing individual objects manually?...
2009 Feb 13
0
lists on a script
Dear R experts,
I have a problem with a function I wrote. The fuction looks like this:
series<-function(x,s){
foo<-list();
ind3<-integer();
for (j in diff){
for (i in 1:(n-12)){
if
(!(x[i,j]==0)&!(x[i+1,j]==0)&!(x[i+2,j]==0)&!(x[i+3,j]==0)&!(x[i+4,j]==0)&!(x[i+5,j]==0)&!(x[i+6,j]==0)
&!(x[i+7,j]==0)&!(x[i+8,j]==0)&!(x[i+9,j]==0)&!(x[i+10,j]==0)&!(x[i+11,j]==0)&!(x[i+1...
2011 Dec 03
1
pivot table help
...ent
clusters and can occurs multiple times within a cluster (that's the reason
that there can be more than 8 members). I want a presence/ absence table for
each individual within each cluster.
So I want to go from:
Cluster Member1 Member2 etc.
1 ind1 ind2
2 ind3 ind1
3 ind2 ind1
to
cluster ind1 ind2 ind3
1 1 1 0
2 1 0 1
3 1 1 0
Has anybody any idea how I can do this? I already tried alot of things with
piv...
2011 Aug 10
2
choosing selective data with permutations
Hello,
I am a R beginner and hoping to obtain some hints or suggestions about
using permutations to sort a data set I have.
Here is an example dataset:
Ind1 11 00 12 15 28
Ind2 21 33 22 67 52
Ind3 22 45 21 22 56
Ind4 11 25 74 77 42
Ind5 41 32 67 45 22
This will be read into a variable using read.table. What I want to do
is permute these individuals and every time pick 3 individuals and
write them to a new variable. I want to do this 100 times so that in
the end I will h...
2010 Jan 20
7
Data Manipulation
...Ticker by Industry and create file names from
the
Industry Factor and export to a txt file.
I have tried the folowing
ind=finvizAllexETF$Industry
ind is then "Aluminum" "Business Services" "Regional Airlines"
ind2=gsub(" " ,"",ind)
ind3
[1] "Aluminum" "BusinessServices" "RegionalAirlines"
> for (i in 1:3) ind3[i]<- AllexETF$Ticker[AllexETF$Industry==ind2[i]]
Warning messages:
1: In ind3[i] <- finvizAllexETF$Ticker[AllexETF$Industry == ind2[i]] :
number of items to replace is not a...
2011 Dec 05
1
Subsetting a data frame
...ally need help with subsetting data frames:
I have a large database of medical records and I want to be able to match
patterns from a list of search terms .
I've used this simplified data frame in a previous example:
db <- structure(list(ind = c("ind1", "ind2", "ind3", "ind4"), test1 = c(1,
2, 1.3, 3), test2 = c(56L, 27L, 58L, 2L), test3 = c(1.1, 28,
9, 1.2)), .Names = c("ind", "test1", "test2", "test3"), class =
"data.frame", row.names = c(NA,
-4L))
terms_include <- c("1","...
2009 Aug 09
1
problem adding columns to matrix
...32586 27.32586
4 27.32586 28.32586 29.32586 27.32586 28.32586
>rownames(m)<-paste("ind", 1:4, sep="")
>
>
> m
size head pectoral area weight
ind1 27.32586 28.32586 29.32586 27.32586 28.32586
ind2 28.32586 29.32586 27.32586 28.32586 29.32586
ind3 29.32586 27.32586 28.32586 29.32586 27.32586
ind4 27.32586 28.32586 29.32586 27.32586 28.32586
> s<-factor(c("m","m","f","f"))
>
>
> s
[1] m m f f
Levels: f m
> cbind(m,s)
size head pectoral area weight s
ind1 27.325...
2003 Jun 05
1
Logical vectors
...logical vectors ?
i.e.
x<-4
ind <- 1:19200
pin <- c(0, rep(400, 48) * (1:48))
ind1<-((pin[j] + 1) <= ind) & (ind <= pin[j + 2])
ind2<-((pin[j+x] + 1) <= ind) & (ind <= pin[j+x + 2])
ind2 and ind1 give the right TRUE index
#but I would like something like that
ind3<-((pin[j] + 1) <= ind) & (ind <= pin[j + 2]) & ((pin[j+x] + 1) <= ind)
& (ind <= pin[j+x + 2])
#but it doesn't work !
Help, thanks
Nolwenn
********************************************
Nolwenn Le Meur
INSERM U533
Facult? de m?decine
1, rue Gaston Veil
44035 Nantes C...
2011 Mar 09
2
Cleaning date columns
Hi Everyone,
I have the following problem:
data <- structure(list(prochi = c("IND1", "IND1", "IND1",
"IND2", "IND2", "IND2", "IND2", "IND3",
"IND4", "IND5"), date_admission = structure(c(6468,
6470, 7063, 9981, 9983, 14186, 14372, 5129, 9767, 11168), class = "Date")),
.Names = c("prochi",
"date_admission"), row.names = c("27", "28", "21", "86&...
2008 Oct 29
1
Subsetting data in a loop
...oing wrong.
Thanks,
Tim
one_year<-list()
for (i in min(mydat$Year):max(mydat$Year)) #Loops from first to last year in dataset
{
myear<-mydat[mydat$Year==i,]
name<-paste("Year",i)
one_year[name]<-myear
}
mydat:
Year Month Day number other Ind1 Ind2 Ind3 Ind4
1985 8 13 1 1 0 0 0 0
1986 8 5 2 3 0 0 0 0
1991 4 24 3 0 0 0 0 0
1991 4 25 4 0 0 0 0 0
1991 ...
2011 Jan 20
2
Using a list as multidimensional indexer
Hello list.
Another 'puzzle' for which I don't have a clean solution.
Say I have a multidimensional object, e.g.:
Mm<-matrix(1:6, nrow=2, dimnames=list(c("a","b"), c("g","h","i")))
And on the other hand I have a list
Ind<-list("b","g")
This holds, for each dimension, an indexer for that dimension.
Now I would
2017 Nov 18
0
Using cforest on a hierarchically structured dataset
...variance of the temperature.
Visually the dataset thus looks like this:
Y_behaviour_frequency?? Individual?? Session?? X1?? X2 X3?? ...
????????????????? 0.5???????? ind1??????? S1??? 5 10??? 7?? ...
???????????????? 0.55???????? ind2??????? S1??? 5 10??? 7?? ...
????????????????? 0.2???????? ind3??????? S1??? 5 10??? 7?? ...
...?????????????????????????????????????? S1??? 5 10??? 7?? ...
????????????????? 0.3???????? ind1??????? S2?? 15 7?? 50?? ...
???????????????? 0.01???????? ind5??????? S2?? 15 7?? 50?? ...
...?????????????????????????????????????? S2?? 15 7?? 50?? ...
??????????????...
2011 Oct 05
2
Subsetting a data frame with multiple values and exclusions.
Hi all,
I realise that the convention is to provide a working example of my problem
but the data are of a sensitive nature so I'm not able to do that in this
case.
I need to query a database for multiple search terms:
db <- structure(list(ind = c("ind1", "ind2", "ind3", "ind4"), test1 = c(1,
2, 1.3, 3), test2 = c(56L, 27L, 58L, 2L), test3 = c(1.1, 28,
9, 1.2)), .Names = c("ind", "test1", "test2", "test3"), class =
"data.frame", row.names = c(NA,
-4L))
terms_include <- c("1","2...
2006 Mar 09
1
HCLUST subroutine question -- FORTRAN DO loops
...IND1=IOFFST(N,I2,K)
ELSE
IND1=IOFFST(N,K,I2)
ENDIF
IF (J2.LT.K) THEN
IND2=IOFFST(N,J2,K)
ELSE
IND2=IOFFST(N,K,J2)
ENDIF
IND3=IOFFST(N,I2,J2)
D12=DISS(IND3)
C
C WARD'S MINIMUM VARIANCE METHOD - IOPT=1.
C
IF (IOPT.EQ.1) THEN
DISS(IND1)=(MEMBR(I2)+MEMBR(K))*DISS(IND1)+
X (MEMBR(J2)+MEMBR(K))*DISS(IND2) - MEMBR(K)*D12
DISS(IND1)=DISS(IND1) / (MEMBR(I2)+MEMBR...
2005 Jul 25
0
lda: scaling to 'disctiminant function'
...d.spss("eurowork.sav")
Ind <- cbind(EW$AGR, EW$MIN, EW$MAN, EW$PS, EW$CON, EW$SER, EW$FIN,
EW$SPS, EW$TC)
Dep <- EW$GROUP
LDA <- lda(Dep ~ Ind, prior=c(1,1,1)/3)
So far so good.
I have....
> LDA$scaling
LD1 LD2
Ind1 1.3415788 3.689959
Ind2 1.5118460 5.215123
Ind3 1.4480197 3.653298
Ind4 2.1898063 3.875867
Ind5 1.2055849 3.913750
Ind6 0.8257858 3.718032
Ind7 1.3481728 3.699259
Ind8 1.2364320 3.871438
Ind9 2.0652630 2.891655
What do I do with this to convert it to the coefficients for the
discrimination functions?
cheers
Worik
2010 Feb 02
1
ggplot/time series with indicators question
Hello, I am trying to plot time-series data with certain weeks highlighted using symbols.
require(ggplot2)
#plotting time series data
timescale <- seq(as.Date("01/01/09","%m/%d/%y"), length.out=12, by=7)
data.all <- data.frame(
id = c(rep('111',12),rep('222',12),rep('333',12)),
week=c(timescale,timescale,timescale),
2010 May 03
2
Hierarchical factors
Hello,
Hierarchical factors are a very common data structure. For instance, one
might have municipalities within states within countries within
continents. Other examples include occupational codes, biological
species, software types (R within statistical software within analytical
software), etc.
Such data structures commonly use hierarchical coding systems. For
example, the 2007 North