similar to: save txt file

Displaying 20 results from an estimated 2000 matches similar to: "save txt file"

2009 Oct 10
1
permutations
Question 1. I would calculate all the permutations of numbers (23,46,70,71,89) How can I write correctly the code? (Load gregmisc) > permutations (..?...) ______________________ Question 2. It's possible permute a string? ..for example: EIGER EGIER EREGI etc..etc.. Thanks, E. -- View this message in context: http://www.nabble.com/permutations-tp25834463p25834463.html Sent from the R
2006 Jul 25
1
[RODBC] ERROR: Could not SQLExecDirect
Hi, I've got a problem with RODBC and saving (sqlSave) of a dataframe in Access. R 2.0.1 is running on windows XP. When executing the examples in R help for the "USArrests" data set "sqlSAve" works fine, but running sqlSave() for a dataframe "Adat" > str(Adat) `data.frame': 1202 obs. of 18 variables: containing 18 columns and ca. 1200 rows fails.
2013 Jan 19
2
PriorityInheritance doesn't work (tinc 1.0.19)
Hello! I'd like to use PriorityInheritance option, despite it is still experimental. (Why it could be experimental, when it looks quite simple feature, no?) But this option doesn't change the TOS field of outgoing UDP packet. I just do tcpdump on outgoing interface from vty1: $ sudo tcpdump -vni eth0 udp dst port 655 And from vty2 I do ping with setting of tos field to EF(0xb8). $
2000 Feb 17
2
bug in rbinom? (PR#448)
# Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@biostat.ku.dk # ###################################################### In version 0.99.0 for Windows NT I get the following: > .Random.seed [1] 0 21012
2012 Jan 04
5
a quick question about "rbinom"
Hello, I have the following code using rbinom, but I don't understand what *"+1"* means in the code. Could someone help? Thanks so much, > X1<-c("A","B")[rbinom(n,1,0.6)+1] > X2<-c("C","D")[rbinom(n,1,0.1)+1] -- View this message in context: http://r.789695.n4.nabble.com/a-quick-question-about-rbinom-tp4262977p4262977.html Sent
2012 Jun 18
6
Trying to speed up an if/else statement in simulations
Dear R-help, I am trying to write a function to simulate datasets of size n which contain two time-to-event outcome variables with associated 'Event'/'Censored' indicator variables (flag1 and flag2 respectively). One of these indicator variables needs to be dependent on the other, so I am creating the first and trying to use this to create the second using an if/else statement.
2005 Apr 02
2
Solaris10/amd64 + SunSutio Compile (PR#7767)
Full_Name: Teru KAMOGASHRIA Version: 2.0.1 OS: SunOS sun 5.10 Generic i86pc i386 i86pc Submission from: (NULL) (219.5.176.24) rbinom.c cannot be compiled because of the casting problem. /opt/SUNWspro/bin/cc -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -D__NO_MATH_INLINES -g -c rbinom.c -o rbinom.o "rbinom.c", line 60: operand must have real
2010 Jun 23
1
Generation of binomial numbers using a loop
Dea'R' helpers I have following data - prob = c(0.1, 0.2, 0.3, 0.4, 0.5) frequency = c(100, 75, 45, 30, 25) no_trials = c(10, 8, 6, 4, 2) freq1 = rbinom(frequency[1], no_trials[1], prob[1]) freq2 = rbinom(frequency[2], no_trials[2], prob[2]) freq3 = rbinom(frequency[3], no_trials[3], prob[3]) freq4 = rbinom(frequency[4], no_trials[4], prob[4]) freq5 = rbinom(frequency[5],
2006 Sep 20
1
Simulation help
I'm trying to simulate trend data over a five year period. I want different trend profiles...the simplest being a linear trend. I've been using the following code: patBdta1 <- NULL for(i in 1:100) patBdta1 <- rbind(patBdta1,c(yr1= mean(rbinom(50,1,.50)), yr2 =mean(rbinom(50,1,.51)), yr3 =mean(rbinom(50,1,.52)),
2010 Feb 17
1
lapply to apply a function using a vector
Hi, First, thank you all for your help. Here is my problem (simplified): Say I have a list: a=list(matrix(50,nrow=5,ncol=5),matrix(25,nrow=5,ncol=5),matrix(10,nrow=5,ncol=5)) I'd like to use rbinom with a different probability for each matrix. I tried: b=c(.8,.1,.9) brep=rep(b,each=25) lapply(a,function(a) rbinom(25,a,brep)) but that doesn't work-- it just uses the first value of b
2007 Oct 17
3
how to repeat the results of a generated probabilities
hello, I want to simulate 200 times the mean of a joint probability (y1) and 200 times the mean of another joint distribution (y2), that is I'm expecting to get 200 means of y1 and 200 means of y2. y1 and y2 are probabilities that I calculate from the marginal prob. (z1 and z2 respectively) multiple by the conditional prob. (x1 and x2 respectively), which I generaterd from the binomial
2008 Sep 09
2
naive variance in GEE
Hi, The standard error from logistic regression is slightly different from the naive SE from GEE under independence working correlation structure. Shouldn't they be identical? Anyone has insight about this? Thanks, Qiong a<-rbinom(1000,1) b<-rbinom(1000,2,0.1) c<-rbinom(1000,10,0.5) summary(gee(a~b, id=c,family="binomial",corstr="independence"))$coef
2005 Aug 16
2
quirky behavior from rbinom (PR#8071)
Full_Name: Chris Paulse Version: 2.1.1 OS: WinXP Submission from: (NULL) (129.98.60.134) This seems strange. I have a small block of code that repeatedly calls rbinom. I put a break in there in case it returns NaN, as I've been having problems with this. Here is a transcript from the debug session: Browse[1]> theP [1] 1 Browse[1]> yleft[dataIndex] [1] 3 Browse[1]> rbinom(1,3,1)
2008 Jul 09
3
rbinom for a matrix
I have a large matrix full of probabilities; I would like to convert each probability to a 1 or a 0 using rbinom. How can I do this on the entire matrix? The matrix was converted from a raster ArcMap dataset, so the matrix is essentially a map. Because of this, I have no column headings. Thanks! -- View this message in context: http://www.nabble.com/rbinom-for-a-matrix-tp18366867p18366867.html
2011 Nov 07
3
Correction in error
Hello R community, following is my code and it shows error, can some one fix this error and explain why this occurs? gibbs <-function(m,n, theta = 0, lambda = 1){ alpha <- 1.5 beta <- 1.5 gamma <- 1.5 x<- array(0,c(m+1, 3)) x[1,1] <- theta x[1,2] <- lambda x[1,3]<- n for(t in 2:m+1){ x[t,1] <- rbinom(x[t-1,3], 1, x[t-1,1])
2008 May 28
5
"rbinom" not using probability of success right
I am trying to simulate a series of ones and zeros (1 or 0) and I am using "rbinom" but realizing that the number of successes expected is not accurate. Any advice out there. This is the example: N<-500 status<-rbinom(N, 1, prob = 0.15) count<-sum(status) 15 percent of 500 should be 75 but what I obtain from the "count" variable is 77 that gives the probability of
2023 Apr 08
1
Error message for infinite probability parameters in rbinom() and rmultinom()
On 08/04/2023 5:53 p.m., Martin Maechler wrote: >>>>>> Christophe Dutang >>>>>> on Sat, 8 Apr 2023 14:21:53 +0200 writes: > > > Dear all, > > > Using rmultinom() in a stochastic model, I found this function returns an error message 'NA in probability' for an infinite probability. > > > Maybe, a more
2007 Nov 12
4
a repetition of simulation
Hello, I have a simple (?) simulation problem. I'm doing a simulation with logistic model and I want to reapet it 600 times. The simulation looks like this: z <- 0 x <- 0 y <- 0 aps <- 0 tiss <- 0 for (i in 1:500){ z[i] <- rbinom(1, 1, .6) x[i] <- rbinom(1, 1, .95) y[i] <- z[i]*x[i] if (y[i]==1) aps[i] <- rnorm(1,mean=13.4, sd=7.09) else aps[i] <-
2005 Feb 28
2
A problem about outer()
Dear all, I have something about function outer() that I can't understand. Just see the following example. The two NaNs are due to 0/0, but I can't figure out the cause of the last two errors. I wonder if some one can explain this for me. ___________________________________________________________________ > sx=rbinom(10,1,0.5);ot=rbinom(10,1,0.5);ag <- rbinom(10,100,0.3);ho <-
2013 May 21
2
problem with "transform" and "get" functions
Hello, I'm having a problem using the "transform" and "get" functions. I'm probably making a dumb mistake, and I need help! I start by making a small simulated dataset. I save the names of the variables in "var.names." Without getting into the details of it, I have to create a custom function to perform some statistics. As part of this, I need to sequentially