Questions tagged [replicate]

280 questions
0
votes
0 answers

How to regenerate fresh matrix when replicating

I have the following script: randomdiv <- function(ncells, ndivs, size, accuracy) { sz <- matrix(nrow = ncells, ncol = ndivs) for (j in 1:ncells) { total_subunits <- size for (i in 1:ndivs) { accurate_subunits <- (size * accuracy) random_subunits…
Jordan
  • 131
  • 8
0
votes
3 answers

bash: how to copy multiple copies of one file into another fast?

I need to stress-test a program by feeding it input files of progressively larger sizes. I have an input file inputSmall.txt which I want to replicate N times and cat those copies into the same file. N is large file. If there anything that would…
I Z
  • 5,719
  • 19
  • 53
  • 100
0
votes
1 answer

Vectorize Evaluations of Meshgrid Points in Matlab

I need the "for" loop in the following representative section of code to run as efficiently as possible. The mean function in the code is acting as a representative placeholder for my own function. x = linspace(-1,1,15); y =…
0
votes
0 answers

randomizing subsets of dataframe and replicate function saving results for each replicate

I have a dataframe (df2) like this: locus transect fq d Locus_1 A 0.000 20 Locus_1 A 0.000 35 Locus_1 A 0.000 50 Locus_2 A 0.200 20 Locus_2 A 0.083 35 Locus_2 A 0.125 50 Locus_3 A 0.134 20 Locus_3 A 0.208 35 Locus_3 A 0.218 50 Locus_4 A…
IlaC
  • 1
  • 1
0
votes
2 answers

Sql Query problems with Case, Replicate and Trim functions

I have some problems in my SQL queries. The table name is debitorders which consists of the following columns: firstname (varchar(50),null) surname (varchar(50),null) accountnumber (varchar(50),null) accounttype (varchar(50),null) bankname…
Christoph Bethge
  • 217
  • 1
  • 5
  • 20
0
votes
1 answer

Matlab - replicating arrays values according to occurrences array

For example, A = [19 20 21 22 23 24 25]; B = [2 0 3 0 0 0 2]; How can we get a new array, repeating each value from B accordingly X times? For example, answer here is: [19 19 21 21 21 25 25]. Please note that I am only allowed to a for loop…
iAmWanteD
  • 303
  • 2
  • 9
0
votes
1 answer

Laravel 4.2 replicate including child items

I tried to replicate the rows but without results, I get orders replicate without the corresponding items. ORDERS pk(id) auto increment id total status date -----+-------------+-----------+------------- 118 899.58 2 …
0
votes
1 answer

How can I update and replicate one column from one table to another column from another table?

I need to replicate one column (TYPE) from one table (CUTOMER) to another column (UNDEF000) from table (ORDERS), by this way everytime when someone update column(TYPE) to be automaticaly replicated on (UNDEF000), Table CUSTOMER and ORDERS are linked…
0
votes
0 answers

Understanding Standard Deviation of means when sampling 100% of the population multiple times

This may sound like an incredibly naive question but here's what I'm doing and here's why this has had me stumped. I have a population of 1000 samples from which I am trying to sub-sample 5%, 10%, 15%...... 100% using the following code in…
VGu
  • 386
  • 5
  • 23
0
votes
1 answer

add number to data.frame

I want to accomplish this: df <- data.frame(val1 = c(10,11, 12, 13)) df2 <- data.frame(c1 = 1, c2 = 2, c3 = 3, c4 = 4) df <- data.frame(rep(df, NCOL(df2))) df2 <- df2[rep(1, NROW(df)),] df3 <- df + df2 df3 val1 val1.1 val1.2 val1.3 1 11 12 …
user3385769
  • 161
  • 6
  • 16
0
votes
3 answers

Python 3 Self replicating file into random directory - then running file

I have a fun little script that i would like to make a copy of itself in a random directory - then run that copy of itself. I know how to run files with (hacky): os.system('Filename.py') And i know how to replicate files with shuttle - but i am…
user24492
  • 37
  • 6
0
votes
0 answers

Evaluating a function for given vectors with different lengths in R

I have written an predictor function on R and I tried several combinations of inputs in the function to see how the output would change. The problem is that my function takes 4 numeric parameters and I want to test my function by plugging all…
yahsin
  • 21
  • 4
0
votes
1 answer

SQL2000 - Replication - Publisher DB is removed but subscription still exists

I've tried to remove a replication between 2 databases on 2 different servers (both are SQL Server 2000). The replication is completely removed from the publisher, however, the subscriber still has a link. I don't know very much about replication,…
Jan Solo
  • 183
  • 1
  • 8
  • 19
0
votes
1 answer

Replicate using foreign key - Laravel

I am trying to replicate certain data in my DB and I followed the steps as in the following link. Laravel 4: replicate to table However, I need to replicate some other data using only a foreign key.I tried to use the find() method to get my data but…
omarsafwany
  • 3,695
  • 8
  • 44
  • 75
0
votes
1 answer

Plotting replicates arranged in a single column in R

I have measured two replicates of many variables in 40 individuals. My dataset is arranged in columns in a way that each column represents one variable. This means that in each column I have the two replicates of the 40 individuals, i.e., 80 values.…
David VR
  • 11
  • 4