Re: [R] Loop to check for large dataset

2016-10-10 Thread Adrian Dușa
8 148 1 1 > > > > Cheers > > Petr > > > > > > *From:* dusa.adr...@gmail.com [mailto:dusa.adr...@gmail.com] *On Behalf > Of *Adrian Du?a > *Sent:* Monday, October 10, 2016 12:26 PM > *To:* Christoph Puschmann > *Cc:* r-help@r-project.org; PIKAL Petr &g

Re: [R] Loop to check for large dataset

2016-10-10 Thread PIKAL Petr
il.com [mailto:dusa.adr...@gmail.com] On Behalf Of Adrian Du?a Sent: Monday, October 10, 2016 12:26 PM To: Christoph Puschmann Cc: r-help@r-project.org; PIKAL Petr Subject: Re: [R] Loop to check for large dataset This is an example of how a reproducible code looks like, assuming you have three columns i

Re: [R] Loop to check for large dataset

2016-10-10 Thread Adrian Dușa
This is an example of how a reproducible code looks like, assuming you have three columns in your dataset named S (store), P (product) and W (week), and also assuming they have integer values from 1 to 19, 1 to 22 and 1 to 157 respectively: # mydata <- expand.grid(seq(19), seq(22), seq(15

Re: [R] Loop to check for large dataset

2016-10-10 Thread PIKAL Petr
ull set STORE, WEEK and description and merge it with original data by merge. Cheers Petr From: Christoph Puschmann [mailto:c.puschm...@student.unsw.edu.au] Sent: Monday, October 10, 2016 9:34 AM To: PIKAL Petr ; r-help@r-project.org Subject: Re: [R] Loop to check for large dataset Dear Petr,

Re: [R] Loop to check for large dataset

2016-10-10 Thread Christoph Puschmann
Dear Petr, I attached a sample file, which contains the first 4 products. It is more that I have: 157 weeks, 19 different Stores and 22 products: 157*19*22 = 65,626 rows. And as I sated I have roughly 63,127 rows. (so some have to be missing). All the best, Christoph

Re: [R] Loop to check for large dataset

2016-10-10 Thread PIKAL Petr
Hi see in line > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Christoph > Puschmann > Sent: Sunday, October 9, 2016 1:27 AM > To: Adrian Dușa > Cc: r-help@r-project.org; Christoph Puschmann > > Subject: Re: [R] Loop to

Re: [R] Loop to check for large dataset

2016-10-08 Thread Christoph Puschmann
Dear Adrian, Yes it is a cyclical data set and theoretically it should repeat this interval until 61327. The data set itself is divided into 2 Parts: 1. Product category (column 10) 2. Number of Stores Participating (column 01) Overall there are 22 different products and in each you have 19 diffe

Re: [R] Loop to check for large dataset

2016-10-08 Thread Adrian Dușa
It would help to have a minimal, reproducible example. Unless revealing the structure of your FD object, it is difficult to understand how a column having 61327 values would be "consistent over an 1 to 157 interval": is this interval cyclic until it reaches 61327 values? >From your example using F

Re: [R] Loop to check for large dataset

2016-10-08 Thread ruipbarradas
Hello, I'm not at all sure if the following is what you need but instead of for (i in length(FD$WEEK)) try for (i in 1:length(FD$WEEK)) or even better for (i in seq_len(FD$WEEK)) And use Control[i, 1], not Control[, 1] Hope thi helps, Rui Barradas Citando Christoph Puschmann : Hey

[R] Loop to check for large dataset

2016-10-08 Thread Christoph Puschmann
Hey all, I would like to know if anyone, can put in the right direction of the following problem: I am currently want to use it to check if a column with a length of 61327 is consistent over an 1 to 157 interval until the end of the column. In the case the interval is interrupted I want to kno