Questions tagged [replicate]
280 questions
1
vote
2 answers
Replicate a given value for each ID in R
I have a dataset like this:
ID DATE NUMBER
1 01-01-20 1
1 15-01-20 2
1 24-02-20 3
2 15-03-20 1
2 20-04-20 2
2 01-05-20 3
and I want to add a new column that replicate the value of the first date for…

jeff
- 323
- 1
- 7
1
vote
2 answers
cannot replicate model with unique slug field
I cannot understand how to replicate model with unique slug field.
I see success message, but this code doesn't create additional row into DB table.
And no messages or exceptions in debugbar.
public function handle(Model $model)
{
…

schel4ok
- 634
- 1
- 11
- 33
1
vote
3 answers
Laravel replicate multiple rows didn't work
I want to replicate multiple relational rows to the same table with the diff job id.
But it doesn't work.
Here is my code
$parentJobUnits = Unit::where('job_id',$jobId)->get(); //may be single or multiple rows for units.
$JobCopy =…

kinjal jethva
- 249
- 2
- 6
- 18
1
vote
0 answers
Unable to replicate ehcache using rmi with kubernetes
I am trying to run my grails application with ehcache in kubernetes.
When I ran the docker image in my local system with 2 containers, it is able to replicate the cache between the 2 containers.
Below is the log statement of ehcache heartbeat…

Awesome
- 5,689
- 8
- 33
- 58
1
vote
1 answer
how to create a data frame with rows and columns for a function in R?
I was assigned a question that requires me to create a data frame for a function and I do not know how to proceed with it.
To evaluate the stay and switch strategies we must repeat the game many
times to determine the proportion of wins based on…

Gian Batayola
- 73
- 1
- 11
1
vote
2 answers
lapply with optional function argument and optional vector arguments
I have a function in R, say
f1 <- function(x,y,vec, func0,...){
...
...
...
return(out)
}
The arguments func0 and vec in this function f1 are function object and some vector object respectively. Now I want to repeat this function 'reps' times…

user111092
- 33
- 4
1
vote
1 answer
R: Replicate value in the column of a dataframe based on a condition
I have the following dataframe:
Categ <- rep(c("BODY", "FACE"), times = c(8,4))
Brand1 <- rep(c("XXX", "YYY"), times = c(8,4))
Product1 <- rep(c("X1", "X2", "Y1"), each =4)
Month <- rep(c("01-18", "02-18", "03-18", "04-18"), times =3)
Sales1 <-…

Morasc
- 49
- 5
1
vote
1 answer
Alter CLOB without SOURCE_LOOKUP
I am attempting to alter CLOB data to STRING(3999) row by row in a table. I am currently using SUBSTR([fieldname],1,3999), however when checking the result table against the source table it shows a NULL result despite data existing within the…

Matthew Clink
- 31
- 6
1
vote
1 answer
Plotting a graph with sample sizes and power estimates
I have simulated a linear model 1000 times using a randomly generated height and weight values, and randomly assigned each participant to a treatment or non-treatment (factor of 1 and 0). Let's say the model was:
lm(bmi~height + weight + treatment,…

Chris
- 41
- 1
- 7
1
vote
1 answer
Does MarkLogic replicas forests will also take participate in search queries
We have configured MarkLogic as follows
Host 1: master_forest_01 replica_forest_03
Host 2: master_forest_02 replica_forest_01
Host 3: master_forest_03 replica_forest_02
Everything is working fine.
Master forests are in "open"…

Manish Joisar
- 1,256
- 3
- 23
- 47
1
vote
1 answer
Attempting to generate a list in R using replicate
I'm working through exercises in DataCamp through a course I'm currently taking on EdX.
The specific question I'm stuck on requires me to create a list (l) of all possible outcomes in remaining games.
The number of remaining games is:
n <- 6
I…

John
- 15
- 5
1
vote
1 answer
"sync" or replicate between tables
I have a existing table "dbo.Source Table" and I want to make another one [me].[DestinationTable] in which to copy some columns from existing table "dbo.Source Table". I use Microsoft SQL Server Management Studio.
This is what I want, in table…

Marius Doman
- 23
- 1
- 7
1
vote
0 answers
Replicated Cache in ehcache and spring-boot
ehcache version 2.8.3 is being used in spring-boot.
The server to be tested is server A and server B based on linux
There are three kinds of cache
Below is the ehcache.xml configuration.
…

jack
- 31
- 3
1
vote
1 answer
succ not getting removed on pred
/* Define a Prolog predicate replicate/3 which corresponds to
* the Haskell function of the same name, except that the numeric
* argument is expressed symbolically.
*
* For example, replicate(s(s(s(0))),a,[a,a,a]) should be satisfied.
*/
So…

HaskellDude
- 13
- 5
1
vote
2 answers
Problem defaultCache and cache in distributed environment (Inconsistent data)
Using the same configuration, with only defaultCache, I get inconsistent data (case A). But if I add an additional cache entry will not get those errors of inconsistency (case B).
Do you know why?
I do not want to set the 130 caches that set…

shilox
- 39
- 1
- 5