Hi,
I need help to write the following log-likelihood function in R:
log(L) = sum [(y_k - y_k-1).log(m(t_k) - m(t_k-1)) - (m(t_k) - m(t_k-1)) -
log((y_k -y_k-1)!)]
I need to write this log-likelihood function in order to find the parameters
by MLE method.
Appreciate the help.
--
View this m
Hi Professor Ripley,
(Thank you very much)^infinite for your response. I still have few questions
1. R shows that I have two column in nlaw data.
ncol(nlaw)
[1] 2
corr(nlaw)
[1] 0.7763745
2. Why can't I use boot::corr? I check corr in boot package and it
seems to be used for computing correl
Dear Renata,
In your particular case, something like this should do the job:
res=qcc(MDI, type = "xbar.one")
names(res)
res$limits
A general approach (using the example in ?qcc) could be:
require(qcc)
data(pistonrings)
attach(pistonrings)
diameter <- qcc.groups(diameter, sample)
ex = qcc(diamet
charter.net> writes:
>
> I just realized after some tips and a little digging that what I was trying to
do "manually" has already been
> done. I was trying to fit my data using 'lm' then taking the "residual" data
and trying to do a spectral
> estimate (for seasonality) usiing fft and then pass
I do not see why you can not use regression even in this case.
To make things more simple suppose that the exact model is:
y = a + b*x, i.e.
y1 = a + b*x1
...
yn = a + b*xn
But you can not observe y and x. Instead you observe
ui = xi + ei (i=1,...,n) and
vi = yi + di (i=1,...,n)
Now you have
On Tue, 2 Sep 2008, Leon Yee wrote:
Dear all,
I have a string (a file path in windows system) contains several
"\"s. When I copy and paste it into R for assignment to an variable, the "\"s
are always interpreted as escaping characters. How can I keep it intact?
By reading from a file or co
Please look at the help for boot, in particular what it says the form of
'statistic' should be. Possibly what you want is
corr.t <- function(data, ind) cor(data[ind,])[1,2]
nlaw appears to be a single-column matrix: that will not work either.
On Mon, 1 Sep 2008, [EMAIL PROTECTED] wrote:
Hi
Dear all,
I have a string (a file path in windows system) contains several "\"s.
When I copy and paste it into R for assignment to an variable, the "\"s
are always interpreted as escaping characters. How can I keep it intact?
Thanks.
Regards,
Leon
__
if your two points are valid and you would be willing to run a least
spuares regression on then you should be fairly comfortable with
using na.approx in the zoo package. If interpolating values is going
to give you an erroneous result then maybe this is not the correct
path. But have a look.
On
Hi R users,
I have one simple question but I really don't know why I can't get it work.
The data was adopted from Efron's An introduction to the bootstrap book.
nlaw
LSAT GPA
[1,] 576 3.39
[2,] 635 3.30
[3,] 558 2.81
[4,] 578 3.03
[5,] 666 3.44
[6,] 580 3.07
[7,] 555 3.00
[
Hello, Kevin
You can get some hints by browsing in this mailist with the subject
of " Upgrading R means I lose my packages", which were posted several
days ago.
HTH
Leon
[EMAIL PROTECTED] wrote:
More and more I am getting warnings from packages that I install that the package was
buil
More and more I am getting warnings from packages that I install that the
package was built with 2.7.2 (I am running 2.7.1). I would like to upgrade but
don't want to loose all of the packages that I have installed and the settings.
Is there a way to just "upgrade" without uninstalling and reins
The statement Globals <<- list() in the body of a function in a package was
intended to write an empty list to the R workspace to collect results during
the computations of the function. A package name space has not been specified.
The package appears to function correctly, but
during the R CM
Renata Mara Schneckenberg Wowk wrote:
Hi Gents,
I need to get the control limits from qcc function.
As follows:
qcc(MDI, type = "xbar.one")
Call:
qcc(data = MDI, type = "xbar.one")
xbar.one chart for MDI
Summary of group statistics:
Min. 1st Qu. MedianMean
Check out:
http://www.sciviews.org/_rgui/projects/Editors.html
On Mon, Sep 1, 2008 at 8:52 PM, Yuan Jian <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am looking for R editor. does anyone know good editor? which tells you
> syntax error and it has function to beautify format (insert TAB etc.).
>
> Yu
>
>
Hi Gents,
I need to get the control limits from qcc function.
As follows:
qcc(MDI, type = "xbar.one")
Call:
qcc(data = MDI, type = "xbar.one")
xbar.one chart for MDI
Summary of group statistics:
Min. 1st Qu. MedianMean 3rd Qu.Max.
0.3266 0.4249 0.4371 0.
Hi,
I am looking for R editor. does anyone know good editor? which tells you
syntax error and it has function to beautify format (insert TAB etc.).
Yu
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https:
I am estimating a multinomial model with two quantitative predictors, X1
and X2, and 3 responses. The responses are called neutral, positive and
negative with neutral being the baseline. There are actually many models
being estimated because I estimate the model over time and also for
various
Dear support, we are trying to export a frequency distributions obtanined by
stament freq(x,variable.labels=NULL,display.na=TRUE,levels=NULL)
of prettyR.
How can I do it?
Thanks in advance
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailm
I don't really understand this. You seem willing only to reveal the bit of the
process where you are convinced the problem is. This may not be helpful if the
problem lies elsewhere.
I take it you are using the lda() function from MASS, though you don't say.
Let's look at a little example:
re
I've made an LDA model on some data from one source. I have some new data
that I want to see if I can "place" to the sources in the LDA model.
I used the predict function as follows:
predict(wak.insitu.ld, wak.alr.alluvial)
where wak.insitu.ld is an LDA model generated from some data and
wak.
On 01/09/2008 6:17 PM, Steve Murray wrote:
Dear all,
I'm trying to interpolate a dataset to give it twice as many values (I'm giving
the dataset a finer resolution by interpolating from 1 degree to 0.5 degrees)
to match that of a corresponding dataset.
I have the data in both a data frame for
Thank you prof,
Answered by the author of the function in question! :) Who could ask for
more?
Imad.
Prof Brian Ripley wrote:
>
> On Mon, 1 Sep 2008, Henrique Dallazuanna wrote:
>
>> See ?browseURL
>
> Or more generally on Windows, ?shell.exec (which is what browseURL does by
> default on
Dear all,
I'm trying to interpolate a dataset to give it twice as many values (I'm giving
the dataset a finer resolution by interpolating from 1 degree to 0.5 degrees)
to match that of a corresponding dataset.
I have the data in both a data frame format (longitude column header values
along t
Hi Duncan,
Yes, unfortunately my filter must have eaten your first response to my
parseHTTPHeader question. Thanks for responding to it again here on the
list and for the more efficient paste tip.
Below is a getURI call that returns a "not found" message. It is a
publicly available web site
On Mon, 1 Sep 2008, Tim Beissbarth wrote:
Somewhere in between the R-Versions 2.6 and 2.7 the behaviour of the function
type.convert and therefore also read.table, read.csv, etc. has changed (see
below):
In 2.6 and before:
type.convert(c("+", "-", "+"))
[1] + - +
Levels: + -
In 2.7 and lat
On Mon, 1 Sep 2008, Henrique Dallazuanna wrote:
See ?browseURL
Or more generally on Windows, ?shell.exec (which is what browseURL does by
default on Windows).
On Mon, Sep 1, 2008 at 5:06 PM, Applejus <[EMAIL PROTECTED]> wrote:
Hi,
Is there a way to launch a file from an R command?
To
ivo welch wrote:
please ignore part 1. of course, the cat works. my mistake. I just
need to learn how to step up frames, please.
parent.frame() will give you the frame of the caller. For example, in
the browser,
caller <- parent.frame()
ls(caller)
caller$foo
etc. parent.frame() has
Michael Friendly wrote:
How can I read a space-delimited file, where the data values for each case
are folded before column 80, and so appear on two lines for each case?
The first few cases look like this
loc type bio H2S sal Eh7 pH buf P K Ca Mg Na Mn Zn Cu NH4
OI DVEG 676 -610 33 -290 5.00 2.
Somewhere in between the R-Versions 2.6 and 2.7 the behaviour of the
function type.convert and therefore also read.table, read.csv, etc.
has changed (see below):
In 2.6 and before:
> type.convert(c("+", "-", "+"))
[1] + - +
Levels: + -
In 2.7 and later:
> type.convert(c("+", "-", "+"))
[1] 0 0
Hum, looks like I forgot to copy r-help on this.
--
O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED])
See ?browseURL
On Mon, Sep 1, 2008 at 5:06 PM, Applejus <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Is there a way to launch a file from an R command?
> To be more precise: I am using windows, and I have an html file in the
> working directory of R, and I would like my code in R to automatically
> lau
Hi
I am a new user of R, and doing clustering analysis (dendrogram). I am quite
interested in pvclust package because of facility of AU probability of each
cluster.
Now, i have a problem when handling large data set. I have data set of 183 rows
and 5546 columns, and interested to make clusterin
ivo welch wrote:
stumped again by SQL... If I have a table named "main" in an SQLite
data base, how do I get the names of all its columns? (I have a mysql
book that claims the SHOW command does this sort of thing, but it does
not seem to work on SQLite.)
If you are using RSQLite, then a lot
On Mon, 01-Sep-2008 at 07:32PM +0200, Dani Valverde wrote:
> I've thought about it, but the position should be always the same,
> locator() should return me the same value.
Here's a function I wrote for this type of job many years ago. The xp
and yp paramaters are very similar to ncp units in g
Hi,
Is there a way to launch a file from an R command?
To be more precise: I am using windows, and I have an html file in the
working directory of R, and I would like my code in R to automatically
launch the html file in the browser (that is, open the file). Basically, i
would like to simulate a
Hi there,
Am I correct to believe that tetrachoric correlation is a special case
of polychoric correlation when there are only two levels to the ordered
factor? Thus it should be okay to use hetcor from the polycor package
to build a matrix of correlations for binary variables?
If this is t
try:
tapply(data,factor-vectors,avg.f, part)
On Mon, Sep 1, 2008 at 1:41 PM, Wolfgang Waser <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> the following problem is still beyond my R-knowledge:
>
> I have one data vector containing the signal from 4 channels that are measured
> subsequently and in repea
I posted before recently about fitting 3D data x, y, z where all have
error attached.
I want to predict z from x and y; something like
z = b0 + b1*x + b2*y
But multiple regression is not suitable because all of x, y, and z have errors.
I have plotted a 3D scatterplot of some data using rgl. I see
please ignore part 1. of course, the cat works. my mistake. I just
need to learn how to step up frames, please.
regards,
/iaw
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://w
dear R wizards---I am not sure at what point I owe pennance for asking
so many questions. I am now wrangling debugging. I want to write a
function
assert = function( condition, ... ) {
if (!condition) {
cat(...); cat("\n");
browser();
}
stopifnot(condition);
}
assert( nrow(ds)==12,
Dear Michael:
There are doubtless better ways to do this, but the I just got the
following ugly hack to work for me:
rawDat <- readLines('linthall.dat')
(N <- length(rawDat))
N2 <- ((N-1)/2)
outDat <- character(N2+1)
outDat[1] <- rawDat[1]
for(i in 1:N2)
outDat[i+1] <- paste(rawDat[(2*
Hi all,
the following problem is still beyond my R-knowledge:
I have one data vector containing the signal from 4 channels that are measured
subsequently and in repeating cycles (with one factor vector for cycle and
one for channel identification).
To extract the mean of each channel during ea
On 9/1/08, Jason Pare <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am having trouble adding symbols to grid graphics. I am able to
> create a lattice scatterplot using xyplot, which has a range from
> -15:15 in both the X and Y directions. However, when I try to add
> circles and text to this grap
I've thought about it, but the position should be always the same,
locator() should return me the same value.
Daniel Valverde Saubí
Grup de Biologia Molecular de Llevats
Facultat de Veterinària de la Universitat Autònoma de Barcelona
Edifici V, Campus UAB
08193 Cerdanyola del Vallès- SPAIN
Cen
Dani Valverde wrote:
> Hello,
> I would like to place some text that should appear in the same
> position of the graphic device, preferably outside the plotting area,
> regardless the x and y axes limits. How can I do this?
I think you can use title() with an adj= argument.
Otherwise, try mtext()
Hello,
I would like to place some text that should appear in the same position
of the graphic device, preferably outside the plotting area, regardless
the x and y axes limits. How can I do this?
Best,
Dani
--
Daniel Valverde Saubí
Grup de Biologia Molecular de Llevats
Facultat de Veterinària
Try this:
lines <- read.table("
http://www.math.yorku.ca/SCS/viscollin/data/linthall.dat";, fill = TRUE,
header = TRUE)
DF <- do.call(rbind,
lapply(split(lines, rep(1:(nrow(lines)/2), each = 2)),
function(x)cbind(x[1, 1:13], x[2, 1:4])))
names(DF) <- names(lines)
On
Dear useRs,
I would like to transform nls() to nlme().
The script for my estimation with nls() is the following:
-
R> sapply(demeaned, class)
idyrclckgp sic
Hello,
I am having trouble adding symbols to grid graphics. I am able to
create a lattice scatterplot using xyplot, which has a range from
-15:15 in both the X and Y directions. However, when I try to add
circles and text to this graph using grid.circle() and grid.text(),
they are offset using the
I seem to be missing something here:
given a set X:{a,b,c,whatever...}
the mathematical definition of 'permutation' is the set of all possible
sequences of the elements of X.
The definition of 'combination' is all elements of 'permutation' which
cannot be re-ordered to become a different elemen
How can I read a space-delimited file, where the data values for each case
are folded before column 80, and so appear on two lines for each case?
The first few cases look like this
loc type bio H2S sal Eh7 pH buf P K Ca Mg Na Mn Zn Cu NH4
OI DVEG 676 -610 33 -290 5.00 2.34 20.238 1441.67 2150.00
dear friends - I have an ordered factor, ID, in a data.frame, labs, and
make a table,
aa <- with(labs,table(val >150,ID)) - and now the order in the table is
according to the alphabetic order in ID, and not as I want it. I have
tried adding
[order(unique(labs$ID)] but it doesn't help.
I have R
Dear R List,
I noticed something odd when I started saving R graphs in pdf format
and including them in LaTeX documents using (e.g.)
\includegraphics{mygraphic.pdf}. A very thin dotted border is
included in the LaTeX document around the graphic, and I cannot seem
to make it go away. I s
On Mon, Sep 1, 2008 at 5:26 PM, Rainer M Krug <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 1, 2008 at 5:22 PM, Henrique Dallazuanna <[EMAIL PROTECTED]>
> wrote:
>> If I understand:
>>
>> tt <- c(expression(italic('First\nset')), expression(italic('Second\nset')),
>> expression(italic('third\nset')))
>
On Mon, Sep 1, 2008 at 5:22 PM, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote:
> If I understand:
>
> tt <- c(expression(italic('First\nset')), expression(italic('Second\nset')),
> expression(italic('third\nset')))
> barplot(1:3, names.arg=tt)
Thanks a lot - that is exactly what I was looking for
If I understand:
tt <- c(expression(italic('First\nset')), expression(italic('Second\nset')),
expression(italic('third\nset')))
barplot(1:3, names.arg=tt)
On Mon, Sep 1, 2008 at 12:17 PM, Rainer M Krug <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am using mathematical anotation to make the labels in a
Hi
I am using mathematical anotation to make the labels in a barplot in
italics. as an example (adapted from
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/129808.html):
tt <- c("italic(First~~set)", "italic(Second~~set)", "italic(third~~set")
barplot(1:3, names.arg=parse(text=tt))
But I would
Troels Ring wrote:
> dear friends - I have an ordered factor, ID, in a data.frame, labs,
> and make a table,
> aa <- with(labs,table(val >150,ID)) - and now the order in the table
> is according to the alphabetic order in ID, and not as I want it. I
> have tried adding
> [order(unique(labs$ID)] but
wow! the answer seems to be "pragma table_info(main);" thanks, Gabor.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented,
Henrique Dallazuanna schrieb:
You can do this:
hh <- lapply(h, head, mh)
hh$breaks <- head(h$breaks, mh + 1)
class(hh) <- "histogram"
plot(hh)
Thanks a lot, that's exactly what I need :-) (I did not consider the class...)
Putting an xlim could also be an solution but I think this is much more
I am a new user of R package and I needed a help
regarding plotting confidence limits for FFT ( chisquare based) and
spectrum
using the monte carlo simulations of background red noise . How do I do
it
in R can any one help in this issue?
sudheer
--
> I tried to shorten my histogram (because the distribution is quite skewed
> and I simply don't want to see the long tail but still use the histogram
> plot). How can I do something like this? (The example does not work but I
> don't know why...)
>
> data <- rnorm(100) # as example, of course t
You can do this:
hh <- lapply(h, head, mh)
hh$breaks <- head(h$breaks, mh + 1)
class(hh) <- "histogram"
plot(hh)
On Mon, Sep 1, 2008 at 10:44 AM, Antje <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I hope this question is not as stupid as the one before ...
> I tried to shorten my histogram (becaus
Antje,
Have a look at ?hist. It seems like you want this:
data <- rnorm(100)
hist(data, xlim = c(0,6))
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and F
Hi there,
I hope this question is not as stupid as the one before ...
I tried to shorten my histogram (because the distribution is quite skewed and I
simply don't want to see the long tail but still use the histogram plot). How
can I do something like this? (The example does not work but I don'
Date: Sun, 31 Aug 2008 21:29:38 -0400
From: "ivo welch"
Subject: Re: [R] SQL Primer for R
stumped again by SQL... If I have a table named "main" in an SQLite
data base, how do I get the names of all its columns? (I have a mysql
book that claims the SHOW command does this sort of thing, but it
[EMAIL PROTECTED] schrieb:
I don't understand the warning I get when executing the following code:
x <- rnorm(100)
h <- hist(x, plot= FALSE, freq = FALSE)
The warning is
"Warning message:
In hist.default(x, plot = FALSE, freq = FALSE) :
argument ‘freq’ is not made use of"
The explanation is
I am a new user of R package and I needed a help
regarding plotting confidence limits for FFT ( chisquare based) and spectrum
using the monte carlo simulations of background red noise . How do I do it
in R can any one help in this issue?
sudheer
º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø
Some junk got in at the beginning. It should be:
Lines <- "video 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Try this:
pairs <- data.frame(pred = unlist(DF[2:21]), lab = DF[,22])
library(caret)
pred <- factor(pairs$pred)
lab <- factor(pairs$lab)
table(pred, lab)
sensitivity(pred, lab)
specificity(pred, lab)
Lines <- "video 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 1 0 0 0 0 0 0 0 0
On 01/09/2008 7:11 AM, Chibisi Chima-Okereke wrote:
Hi All,
I would like to be able to use play3d() to translate the view along a
surface, and zoom in and out. All the examples in play3d() function
description are of rotations.
I would also like to know if there is a method of creating a legend
Hi All,
I would like to be able to use play3d() to translate the view along a
surface, and zoom in and out. All the examples in play3d() function
description are of rotations.
I would also like to know if there is a method of creating a legend of for
the 3d surface using rgl package.
Thanks in a
> I don't understand the warning I get when executing the following code:
>
> x <- rnorm(100)
> h <- hist(x, plot= FALSE, freq = FALSE)
The warning is
"Warning message:
In hist.default(x, plot = FALSE, freq = FALSE) :
argument ‘freq’ is not made use of"
The explanation is pretty simple.
freq
It's a problem in read.fwf. It should not set a default for as.is, and in
R-devel will not.
On Mon, 1 Sep 2008, [EMAIL PROTECTED] wrote:
On 01-Sep-08 08:20:25, ONKELINX, Thierry wrote:
Try to add options(stringsAsFactors = FALSE) in your Rprofile.site
(in the etc directory). Using as.is = T
Dear Felix,
I have no idea about the calculation of your accuracy, sensitivity, etc, but
the sums:
dat <- read.table(file="clipboard") #read in your data as dataframe dat
dat$comp <- apply(dat,1,function(x) sum(x[-c(1,22)]==as.numeric(x[22])))
Good luck
Bart
drflxms wrote:
>
> Dear R-collea
try something like this:
dat <- read.table(textConnection("video 1 2 3 4 5 6 7 8 9 10 11 12 13
14 15 16 17 18 19 20 21
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Hi Thierry,
On 01-Sep-08 09:45:27, ONKELINX, Thierry wrote:
>
> Dear Ted,
>
> I noticed that as.is was set by default in read.fwf. So if the
> user sets stringsAsFactor it is passed through ... to read.table.
> But I'm not sure how as.is is passed to read.table when onlye
> stringsAsFactors is s
Dear Ted,
I noticed that as.is was set by default in read.fwf. So if the user sets
stringsAsFactor it is passed through ... to read.table. But I'm not sure
how as.is is passed to read.table when onlye stringsAsFactors is set. If
it's the default (FALSE) then it might be conflicting with
stringsAs
Dear R-colleagues,
this is a question from a R-newbie medical doctor:
I am evaluating data on inter-observer-reliability in endoscopy. 20
medical doctors judged 42 videos filling out a multiple choice survey
for each video. The overall-data is organized in a classical way:
observations (items fro
On 01-Sep-08 08:20:25, ONKELINX, Thierry wrote:
>
> Try to add options(stringsAsFactors = FALSE) in your Rprofile.site
> (in the etc directory). Using as.is = TRUE seems safer than
> stringsAsFactors = FALSE in the read.fwf function. Because as.is
> is set to FALSE by default and stringsAsFactors
Hello everybody,
I don't understand the warning I get when executing the following code:
x <- rnorm(100)
h <- hist(x, plot= FALSE, freq = FALSE)
If I don't use the plot-argument, I don't get a warning...
Any explanations for me?
Antje
__
R-help@r-p
Hi Yuan, Lucien, List.
try this:
f <-
function (...)
{
args <- list(...)
if(length(args)==0){
return(NULL)
}
if (length(args) == 1) {
return(args[[1]])
}
if (length(args) > 2) {
jj <- do.call("Recall", c(args[-1]))
return(do.call("Recall", c(list(ar
> I am trying to debug a program, and I think tryCatch will help. The
> functions involved
> process through so many times before I encounter the error, things
> are a bit slow to
> use debug and browser().
>
> I've read the help file and postings on conditions, and am still
> having trouble.
Try to add options(stringsAsFactors = FALSE) in your Rprofile.site (in
the etc directory). Using as.is = TRUE seems safer than stringsAsFactors
= FALSE in the read.fwf function. Because as.is is set to FALSE by
default and stringsAsFactors is not set.
HTH,
Thierry
-
A more generic solution is
allComb <- expand.grid(rep(list(letters[1:5]), 7))
whichComb <- sapply(seq_len(ncol(allComb) - 1), x = allComb, function(i,
x){
whichCombination <- sapply(seq(i + 1, ncol(x)), y = x, function(j,
y){
as.numeric(y[, i]) <= as.numeric(y[, j])
})
apply(w
86 matches
Mail list logo