Displaying 20 results from an estimated 900 matches similar to: "Please help R error message "masked from 'package:utils':combn""
2012 Oct 14
1
PFIM 3.2
Dear R-user,
I'm having some difficulty with working PFIM 3.2, a package for
implementing population PK/PD in R. I wish to evaluate the determinant of
Fisher information matrix each time with successive dose from a pre defined
sequence of doses and want to store those values in a vector. It's
important to note that in my 'stdin.r' file, dose<-c(u) and each time u is
to be
2009 May 28
3
String replacement in an expression
Dear R-experts,
I need to replace in an expression the character "Cl" by "Cl+beta"
But in the following case:
form<-expression((Cl-(V *ka) ) +(V *Vm *exp(-(Clm/Vm) *t)))
gsub("Cl","(Cl+beta)",as.character(form))
We obtain:
[1] "((Cl+beta) - (V * ka)) + (V * Vm * exp(-((Cl+beta)m/Vm) * t))"
the character "Clm" has been
2006 May 09
1
combn(n, k, ...) and all its re-inventions
It seems people are reinventing the wheel here:
The goal is to generate all combinations of 1:n of size k.
This (typically) results in a matrix of size k * choose(n,k)
i.e. needs O(n ^ k) space, hence is only applicable to
relatively small k.
Then alternatives have been devised to generate the combinations
"one by one", and I think I remember there has been a
quiz/challenge about 20
2013 Sep 06
1
Importing function that is previously imported by other package
Dear developeRs,
I encounter the following problem: in the current version of my package
FrF2, certain calls to a functioni do not work when package combinat is
loaded, because function combn from combinat masks the function from
utils that my package uses.
I tried to solve this issue by importing function combn into the
namespace of FrF2; I don't need to export it, I just want to use it
2006 May 08
3
Non repetitive permutations/combinations of elements
Hello all,
I am trying to create a matrix of 1s and -1s without any repetitions for a
specified number of columns.
e.g. 1s and -1s for 3 columns can be done uniquely in 2^3 ways.
-1 -1 -1
-1 -1 1
-1 1 -1
-1 1 1
1 -1 -1
1 -1 1
1 1 -1
1 1 1
and for 4 columns in 2^4 ways and so on.
I finally used the function combn([0 1],3) that I found at the following link
2005 Aug 17
2
Copying rows from a matrix using a vector of indices
Hi,
I am trying to use a vector of indices to select some
rows from a matrix. But before I can do that I somehow
need to convert 'combinations' into a list, since
'mode(combinations)' says it's 'numerical'. Any idea
how I can do that?
library("combinat")
combinations <- t(combn(8,2))
indices <- c(sample(1:length(combinations),10))
# convert
???
2017 Nov 01
2
"prob" package alternative
The prob package has been archived because it depends upon some other
packages which have issues.
However, such projects as Introduction to Probability and Statistics in R
depend upon it for learning. There are a few other resources that also use
it.
Does anyone know of any workarounds?
Someone at stack exchange mentioned using R 2.9. However, that broke my
RStudio (WSOD) and the dependent
2017 Nov 02
2
"prob" package alternative
The issue is fAsianOptions. Is there a version that works with the latest
version of R? If not, which version of it works with which version of R and
where can it be found? I tried several at the archive already.
Alternatively, is there another package that behaves similarly to prob?
On Wed, Nov 1, 2017 at 6:17 PM, David Winsemius <dwinsemius at comcast.net>
wrote:
>
> > On Nov
2017 Nov 01
0
"prob" package alternative
> On Nov 1, 2017, at 12:51 PM, Tiby Kantrowitz <tlkantro at gmail.com> wrote:
>
> The prob package has been archived because it depends upon some other
> packages which have issues.
>
> However, such projects as Introduction to Probability and Statistics in R
> depend upon it for learning. There are a few other resources that also use
> it.
>
> Does anyone
2005 Dec 08
1
Listing all possible samples of size n form a population of size N
Dear useRs!
I would like to list all possible samples of size n form a population of
size N. Obviously, N must be small (up to 20??) for this to be possible.
For example, let say that N = 3 and n = 2. Therefore, we can say we have
units 1, 2 and 3. I believe all possible samples are : {1,2},{2,3} and
{1,3}.
I would like to emphasize that I am not looking for the number of different
2017 Nov 02
2
"prob" package alternative
Yes. That's the version I've been discussing that has non-zero exit status.
That situation is why CRAN retired the prob package. It's possible you
installed that library earlier in development and it's been "carried"
along. It no longer installs, now.
The problems with all of this seem to have started this month according to
the conversations. However, no one has
2003 May 22
3
How to avoid function masking
Hi All,
I've been working on updating the 'genetics' package. As a consequence of
the upgrade, .First.lib() looks like:
.First.lib <- function(libname, pkgname)
{
if (!require(combinat))
warning("Unable to load 'combinat' library. Function
`diseq.ci' will fail.")
require(gregmisc)
genotype <-
2006 Nov 09
2
Algorithm needed
I have a matrix of size "n" and I want to create a new one in which the columns
are sums of the original matrix, with some order in the sums. For example, if
matrix A has 4 columns, then the new matrix should have 6 columns with the
following info from the columns of A: 1+2, 1+3, 1+4, 2+3, 2+4, 3+4. If matrix A
has 5 columns, then the new matrix has 10 columns: 1+2, 1+3, 1+4, 1+5, 2+3,
2010 Nov 25
2
delete-d jackknife
Hi dear all,
Can aynone help me about delete-d jackknife
usually normal jackknife code for my data is:
n <- nrow(data)
y <- data$y
z <- data$z
theta.hat <- mean(y) / mean(z)
print (theta.hat)
theta.jack <- numeric(n)
for (i in 1:n)
theta.jack[i] <- mean(y[-i]) / mean(z[-i])
bias <- (n - 1) * (mean(theta.jack) - theta.hat)
print(bias)
but how i can apply delete-d jackknife
2015 Mar 21
3
Combinatoria
Hola buenos días, me presento, me llamo Miguel y 'soy de' y 'vivo en'
Galicia.
Soy profesor de secundaria (Bachillerato Adultos) y llevo 15 días
estudiando R a un buen ritmo, pero todavía me faltan miles de cosas.
He visto que R facilita, no solo el análisis de datos y que posee una
potencia en cálculos estadísticos a cualquier nivel, sino gran caudal de
recursos para Data Mining,
2006 Jul 13
1
looping using combinatorics
I have a problem where I need to loop over the total combinations of
vectors (combined once chosen via combinatorics). Here is a
simplification of the problem:
STEP 1: Define three vectors a, b, c.
STEP 2: Combine all possible pairwise vectors (i.e., 3 choose 2 = 3
possible pairs of vectors: ab,ac, bc)
NOTE: the actual problem has 8 choose 4, 8 choose 5 and 8 choose 6
combinations.
STEP
2017 Nov 02
2
"prob" package alternative
Yes, that is exactly what I was doing two days ago.
Warning in install.packages :
installation of package ?fAsianOptions_3010.79.tar.gz? had non-zero exit
status
Which is what a reading of the explanation for why "prob" was retired leads
one to expect. Do you have some other suggestion about how to get it to
work? I notice you're not using Windows which might have a relationship
2017 Nov 02
0
"prob" package alternative
> On Nov 2, 2017, at 11:15 AM, Tiby Kantrowitz <tlkantro at gmail.com> wrote:
>
> The issue is fAsianOptions. Is there a version that works with the latest version of R? If not, which version of it works with which version of R and where can it be found? I tried several at the archive already.
sessionInfo()
R version 3.4.2 Patched (2017-10-04 r73465)
Platform:
2015 Mar 22
3
Combinatoria
Hola amigos, muchas gracias por vuestra ayuda.
Entonces veo que mi sorpresa era legítima. Por todos vuestros mails la
conclusión es que:
- En el módulo base de R no incluye combinatoria elemental, ni siquiera
el número combinatorio Cm,n hay que cargar el paquete *combinat*
- Y para las variaciones con repetición el paquete* gtools*
- Y aún así no tenemos ni las combinaciones ni las
2015 Mar 21
4
Combinatoria
En relación con lo que comenta Carlos, por ejemplo para el caso de las Variaciones sin Repetición, puede ser instructivoenseñar como se construye como por ejemplo:
VsinR <- function(m, n){ return (factorial(m)/factorial(m-n))}
VsinR(9,3)
-------------------------
Creo que con la función factorial que viene por defecto en R puedes construir siguiendo este modelo rápidadmentecasi cualquier