Displaying 20 results from an estimated 928 matches for "dicing".
Did you mean:
icing
2007 Oct 08
5
Dice simulation: Getting rep to re-evaluate sample()?
I'm trying to get R to simulate the sum of the values on 10 fair dice
(yes, it's related to a homework problem, but is not the problem
itself). I tried to do this:
> rep(sum(sample(1:6,100,replace=T)), times=10)
[1] 341 341 341 341 341 341 341 341 341 341
and noticed that sum(sample()) seems to be only evaluated once. How can
I overcome this, so that I get a vector of values that
2009 Feb 02
4
New to R
Hello All,
A colleague of mine started working with R and out of curiosity I did
some research on the language. Very nice. In my opinion this is one
of the best languages I've found for getting tasks I'm interested in
done. I wrote this simple die roller and was curious to know if it is
R enough.
##############################################################################
#
2010 Apr 24
4
DICE Coefficient of similarity measure
Hi,
I wanted the DICE coefficient (similarity measure for binary variables)
to be calculated in R and found that the "igraph" package has the option
of "similarity.dice" to do this. But, for this command, the input object
should be an igraph object. But, I have a dataframe of columns
containing 1's and 0's. Can I convert this dataframe into an igraph
object, so that
2007 Mar 02
0
Dice dissimilarity output and 'phylo' function in R
Dear All,
I get some problems using the 'phylo' and
dissimilarity functions in R. I converted an output
from 'hclust' into an order of phylo so as to be able
to use the 'consensus' function on it. Each time I
submit the consensus codes, my computer hangs. When I
tried to see what the contents of the object converted
into order phylo is, I get the message
2009 Dec 15
1
Starting with R and distributions graphics
HI, i'm really new of R and i need some help.
I have to describe some distributions for some dices throw:
- launching 3 dices i need the distribution of the sum of the two higher
values
- launching 4 dices i need the distribution of the occurrences of the same
value
possibly i need a way to compare the two distribution adding the fourth dice
to the first without summing it (only for
2010 Jul 27
1
as.dendrogram for DICE coefficient.
Hi R,
I was using 'as.dendrogram' with the DIST coefficient, where the smaller
values of the DIST coefficient, say that the objects are closer to each
other, while the larger values of the coefficient say that the objects
are far from each other.
But now, I have my coefficient as the DICE coefficient(in some sense
similar to correlation coefficient), where the larger coefficient
2010 Oct 05
3
R-help
Im trying to simulate the rolling of a pair of dice
this is my function:
#function to simulate tosses of a pair of dice
#from the simulation, the program returns the empirical probability of
#observing a double
count <- 0
for(j in 1:sim){#begin loop
die1 <- sample(1:6,1)
print(die1)
die2 <- sample(1:6,1)
print(die2)
count <- ifelse(die1 == die2, count + 1, count)
}#end loop
emprob
2011 Aug 30
3
Simulating distribution of max of two die
Hallo
I am teaching a very elementary intro course about R, and want to show
the students how to find the distribution of the maximum of rolling
two balanced die. Is there perhaps a more elegant way to do this,
other than the way I am using below? (I would like to show them two
ways - the one shown here, and perhaps and improved/elegant approach
(showing off the "beauty" of R.
2018 Oct 21
2
Instalar paquetes antiguos en Windows 10
Hola a todos! Espero que alguien me pueda echar algo de luz al problema que tengo.
Estoy intentando instalar algunos paquetes antiguos en R (3.3.0), como ?devtools? en su penúltima versión, y me está resultando imposible. Instalé Rtools y R me dice que funciona, pero no consigo hacer que se instale el paquete. He probado bajando el paquete en formato .tar.gz y luego con las instrucciones:
2010 Aug 18
5
ifelse command
hello people,
I want to make a biased dice using the sample() function and print out the
results after n number of runs, I've successfully generated the dice using
the following command:
mydie2<-function(n=1000,y=NULL,...){
for(i in 1:n){
x<-sample(1:6,n,replace=TRUE,prob=c(1,1,2,3,2,1)/10)
x=runif(n)
if(x<=1/10){y[i]=1}
else if(x<=2/10){y[i]=2}
else if(x<=4/10){y[i]=3}
else
2006 May 16
1
Size of observations
Hi All
I had to assure the randomness of backgammon game's two dices.
I took 8,000,000 observations and found that one of the dices is not uniform
distributed.
I took 80,000,000 observations and found that the dice is uniform
distributed.
In both tests I used Pearson Chi Square test.
My questions:
1. How many observations should I take?
2. How much the 80,000,000
2008 Mar 17
0
R.matlab errors and slow con
Hi,
I have noticed that when using R.matlab that the connection can become quite
slow though it remains open.
I have to kill both my R session and Matlab to start over and establish a
new connection (eg. close(matlab) - seems hung).
Is there a way around this?
I have been doing the following to establish the connection :
Matlab(host="localhost", port=9999, remote=FALSE)
matlab<-
2011 Mar 21
0
seek advise for slice & dice a table
hi,
im having a table which holds a lot of information. i would like to
slice & dice in a BI-manner the table. u guys have any suggestions?
table looks a bit like this:
user
app [appa, appb, appc]
action [actiona, actionb, actionc]
timestamps
...
so it would be cool to sort, drill in&up based on the various dimensions.
im not asking for a full bi-solution, but maybe the one or the other
2007 Mar 06
3
Is there a quick way to count the number of times each element in a vector appears?
Hi there,
I'm writing a function that calculates the probability of different
outcomes of dice rolls (e.g., the sum of the highest three rolls of
five six-sided dice). I'm using the "combinations" function from the
"gtools" package, which is great: it gives me a matrix with all of the
possible combinations (with repetitions allowed). Now I want to count
the number
2013 Jul 12
3
Eliminar filas que cumplen con mas de un criterios simultaneamente ...
Estimada comunidad, tengo el siguiente problema:
Un data.frame con muchas filas de las que debo eliminar aquellas que
cumplen varios criterios al mismo tiempo. Por ejemplo este data.frame:
sol con dia NCar NIns isom area rep tipo
1 con 0.001 1 160s 0 s 6.083543e-01 1
2 con 0.001 1 161c 1 c 1.391274e-03 1 <NA>
3 con 0.001 1 161c 1 c
2012 May 09
2
Memoria de R y bucles for
Buenos días:
A ver.... una duda muy general, y otra más específica...
Después de haber conseguido tratar con R.... y hacer un script de 161 páginas...
es hora de empezar a hacer bucles para reducirlo a menos de 5 hojas....
el primer problema que me encuentro es que se queja de que el vector de datos que intruduzco (una base de datos de 11 años) es demasiado grande;
tengo segun R... un vector de
2006 Feb 12
0
slicing and dicing timestamps by month, week, day, etc
I''m trying to finish up a comp lab sign-in app in RoR that includes a db
table logging each visit with a timestamp. I want to be able to loop
through the visits table and get a weekly or monthly array and print a
table of the last four weeks listing a count for the number of visits
each day. I''ve got it working alright but it''s pretty ugly...overcoded.
Does anyone
2014 May 29
5
ayuda con "unexpected symbol"
Hola,
Tengo la version R 3.1, estoy intentado usar este script pero me dice que
el simbolo " no tiene que estar ahi, ya intente borrando comillas o
diferentes formas y no lo consigo, si alguien sabe agradezco ayuda.
setwd("C:/users/marta/desktop/DB")
library(chron)
library(xlsx)
filename<-"univerest_50.csv"
filename<-"monicap_50.csv"
2008 Sep 05
1
Trouble with R CMD check: I can't seem to get dependencies right (maybe I'm using R_LIBS incorrectly?)
Hi there,
I'm in the following directory:
~/Documents/Rstuff/diceFiles/dice_1.1
The directory "dice" is in this directory, with all the usual build
files (DESCRIPTION, NAMESPACE, etc). I'm trying to run the following
command:
R CMD check dice
(where "dice" is the name of the package I'm checking), and I get the following:
* checking package dependencies ...
2014 Jun 04
2
R latex ubuntu
Buenas noches
Instale ubuntu 14.04, corro un archivo que me funcionaba en windows, pero
no se que librería debería cargar (instalar) para solucionar el problema.
El codigo R dice:
function(x)
tools::texi2pdf
El error dice:
Error en texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,
:
Running 'texi2dvi' on '
Otro archivo se compilo sin problemas (lyx con sreave).