similar to: random discrete from the first tuple

Displaying 20 results from an estimated 4000 matches similar to: "random discrete from the first tuple"

2007 Sep 04
2
Efficient sampling from a discrete distribution in R
Hello r-help, As far as I've seen, there is no function in R dedicated to sampling from a discrete distribution with a specified mass function. The standard library doesn't come with anything called rdiscrete or rpmf, and I can't find any such thing on the cheat sheet or in the Probability Distributions chapter of _An Introduction to R_. Googling also didn't bring back anything.
2002 Jul 01
3
Discrete random variable
Hi, I would create a function rdiscrete that returns the value of a discrete random variable X defined on a subset which can change, and for the same probability for the issue, eg: X could sometimes take a value in the subset {2,3,4} with probability 1/3 for each issue, and sometimes X could take a value in the subset {2,3,4,5,6} with probability 1/5 for each issue, etc. The function should have
2005 Dec 30
4
Count or summary data
Dear all, I want to summary and count my data something like > te.Ce [,1] [,2] [1,] -1 0.05 [2,] 1 0.05 [3,] 1 0.00 [4,] 0 0.05 [5,] -1 0.00 [6,] 0 0.10 [7,] 1 0.10 [8,] -1 0.00 [9,] -1 0.10 [10,] 0 0.05 [11,] 0 0.10 [12,] -1 0.10 [13,] 1 0.00 [14,] -1 0.05 [15,] 1 0.00 How could I count (summary) all my data which I need the result like
2005 Mar 21
5
Read a dataset with different lengths
Dear useR again, How can I read a dataset if lines in dataset did not have same elements (have different lengths), For example: 1 2, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 2 2, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 3 4, 5, 11, 1, 1, 6, 1, 1, 5, 14, 1, 1, 15, 1, 1 4 2, 5, 9, 1, 1, 14, 1, 1, 8, 16, 1, 1, 13, 1, 1 5 3, 7, 14, 1,
2004 Oct 18
2
why package gregmisc did not work
Dear useR I want to know why package gregmisc did not work very well. I did not find this package in my library directory. > local({a <- CRAN.packages() + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a, dependencies=TRUE)}) trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 21630 bytes
2005 Aug 15
2
How to get a list work in RData file
Dear R-Helper, I want to know how I get a list work which I saved in RData file. For example, > test.xy <- function(x,y) { + xy <- x+y + xy + } > > xyadd <- test.xy(x=2, y=3) > xyadd [1] 5 > x1 <- c(2,43,60,8) > y1 <- c(91,7,5,30) > > xyadd1 <- test.xy(x=x1, y=y1) > xyadd1 [1] 93 50 65 38 > save(list = ls(all=TRUE), file =
2009 Apr 16
2
Count data with several numbers separated by commas
Dear all, I have a data file with 3 variables (x1, x2, x3) where variable x1 have data that consists of several numbers separated by commas. id name x1 x2 x3 aa101 1,4,5 2 1 aa102 1,2,5 1 2 aa103 1,2,5 1 1 aa104 1,2,3 1 2 aa105 1,5 2 2 aa106 1,2,5 2 2 aa107 1,2,5 2 1 aa108 1,4,5 2 1 aa109 1,2 1 2 aa110 3,5 1 2 I want to count the number of data for each
2005 Mar 21
1
Convert numeric to class
Dear all, I have a script about iteration classification, like this below data(iris) N <- 5 ir.tr.iter <- vector('list',N) ir.tr <- vector('list',N) for (j in 1:N) { ir.tr[[j]] <- rpart(Species ~., data=iris) ir.tr.iter[j] <- ir.tr[[j]]$frame result <- list(ir.tr=ir.tr, ir.tr.iter=ir.tr.iter) } as.data.frame(as.matrix(ir.tr.iter))
2010 Mar 24
0
tuple spaces and rails
Hey all, in building an application that will require multiple ajax calls occuring concurently to different database tables in order to display data in a form, and then require user input to modify data and then update it to the database, which invokes a multi-step transaction, that is, making updates to multiple database tables, I was told in order to do this using rails and ajax, a good
2010 Aug 21
1
How to find residual in predict ARIMA
Dear All, I have a model to predict time series data for example: data(LakeHuron) Lake.fit <- arima(LakeHuron,order=c(1,0,1)) then the function predict() can be used for predicting future data with the model: LakeH.pred <- predict(Lake.fit,n.ahead=5) I can see the result LakeH.pred$pred and LakeH.pred$se but I did not see residual in predict function. If I have a model: [\ Z_t =
2011 Jan 07
2
rpm/yum/repo issue - Error: Package tuple could not be found in packagesack
Hi guys, I've been working on a yum repo for PHP 5.2 and today I wanted to update it[1], however on a test machine using my PHP packages (e.g. php-common-5.2.16-1nux) a yum update to the new RPMs with version 5.2.17 gives the following error: "Error: Package tuple ('php-common', 'i386', '0', '5.2.17', '1nux') could not be found in
2019 Nov 22
0
[PATCH nbdkit v2 01/10] python: Use PyObject_CallFunction instead of constructing the tuple.
It is unclear why we were constructing this by hand, but using the following tip we can use PyObject_CallFunction: https://stackoverflow.com/a/21221335 --- plugins/python/python.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/plugins/python/python.c b/plugins/python/python.c index 148097f..d65ac45 100644 --- a/plugins/python/python.c +++
2019 Nov 21
0
[PATCH nbdkit 1/8] python: Use PyObject_CallFunction instead of constructing the tuple.
It is unclear why we were constructing this by hand, but using the following tip we can use PyObject_CallFunction: https://stackoverflow.com/a/21221335 --- plugins/python/python.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/plugins/python/python.c b/plugins/python/python.c index 148097f..d65ac45 100644 --- a/plugins/python/python.c +++
2014 Mar 13
2
Re: [supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
* Richard W.M. Jones: > This seems to change the result of this (very important and complex) > function. Since you didn't answer my followup message, I take it that I failed to convince you. I noticed that I can get away with leaving the structure of the function as-is, just changing the type... What do you think about this diff? Cheers, -Hilko diff --git a/src/build.ml
2005 Aug 15
2
queer data set
I have a dataset that is basically structureless. Its dimension varies from row to row and sep(s) are a mixture of tab and semi colon (;) and example is HEADER1 HEADER2 HEADER3 HEADER3 A1 B1 C1 X11;X12;X13 A2 B2 C2 X21;X22;X23;X24;X25 A3 B3 C3 A4 B4 C4 X41;X42;X43 A5 B5 C5 X51 etc., say. Note that a blank
2014 Mar 10
3
[supermin 3/3] Use the file tuple up to the point where files are copied into the filesystem / chroot
--- src/build.ml | 43 ++++++++++++++++++++++++++----------------- src/chroot.ml | 12 +++++++----- src/dpkg.ml | 17 +++++++++++++++-- src/ext2.ml | 8 +++++++- 4 files changed, 55 insertions(+), 25 deletions(-) diff --git a/src/build.ml b/src/build.ml index 9225184..205701b 100644 --- a/src/build.ml +++ b/src/build.ml @@ -106,11 +106,7 @@ let rec build debug *) let files =
2020 Feb 12
6
[RFC] Optional parameter tuples
Hi, this is an RFC for optional, named parameter tuples for intrinsics. The proposed syntax is: %z = call @llvm.some.intrinsic(%a, %b) optional_tuple(%x, %y, %z) where from the perspective of the call site %x, %y and %z are simply additional parameters. Optional parameter tuples would be very useful for constrained fp intrinsics and vector predication. Some examples: ; Default fpenv fadd
2005 Mar 15
0
Packages for multi-class classification with boosting
Are there any packages to handle multi-class classification with boosting. I know adaboost function include in package "boost" but that is only for two-class. Thanks for your help. Xiyan Lon
2010 Dec 09
1
Getting a periodogram for discrete data
nitish wrote: > > I have a dataset that goes like: dataset = > t |x > 0 |x1 > 1 |x2 > 2 |0 > 3 |0 > 4 |0 > 5 |0 > 6 |x3 > 7 |0 > 8 |0 > 9 |0 > 10 |x4 > > and so on. I wish to detect the periodicity of occurrences. t is in > seconds and x are arbitrary, whose magnitude i am not interested in. I > just wish to get a best
2005 Oct 21
1
Generalised rbind/cbind
Dear list, Is there a generalised form of rbind/cbind for combining matrices/arrays into higher-D structures? ie. if I have: a <- matrix(2,2,2) b <- matrix(3,2,2) how can I get array(rep(c(3,2), each=4), c(2,2,2)) ? It seems like this would be the job of a generalised abind function: abind(a,b, along=1) == rbind(a,b) abind(a,b, along=2) == cbind(a,b) abind(a,b, along=3)