- in any stretch of duplicates, the dates should be projected backwards one day for each entry, even if that causes duplicates? (for example if there was already a 9/15/19, then 9/16/19, 9/16/19 should be modified so the first 9/16/19 is changed to 9/15/19 even though there is already a 9/15/19 ?)
- in any stretch of duplicates, the dates should be shifted backwards to the first unused day, even if that causes the days to be out of order? (For example 9/13/19, 9/15/19, 9/16/19, 9/16/19 should move the first 9/16/19 to the unusued 9/14/19, resulting in 9/13/19, 9/15/19, 9/14/19, 9/16/19) ?
- in any stretch of duplicates, each one should be moved consequatively backwards, changing as many past dates as needed until there are no duplicates or out of order? For example 9/13/19, 9/15/19, 9/16/19, 9/16/19 should move to 9/13/19, 9/14/19, 9/15/19, 9/16/19 ?
Vous suivez désormais cette question
- Les mises à jour seront visibles dans votre flux de contenu suivi.
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails.
How to change repeat dates that occur right after each other
6 commentaires
Réponse acceptée
6 commentaires
- the data is sorted first by uiserId, and then by StudyDate
- The last StudyDate for one userId is never the same as the first date for the next userId
- All users have at leaset 2 rows of data
- The duplicate date is never the first date for a user
- The duplicate datees are always preceded by an 'empty' row with the 'missing' StudyDate
Plus de réponses (0)
Voir également
Catégories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Une erreur s'est produite
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asie-Pacifique
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)