Aline Laufer a écrit :Que dois-je envoyer? le fichier excel? ou un copier-coller des deux variables sous R? Et concrètement "dput" ça s'utilise comment (pour situer je viens juste d'apprendre à mettre un code R sur le forum...)
Bonjour Aline,
alors si tu arrives à mettre du code R sur le forum, tu as fais le plus dur, sans rire. Après, le problème c'est d'intéresser quelqu'un à ton problème. Les gens sont paresseux, au plus tu leur facilites le travail pour reproduire ton problème, au plus tu as des chances d'avoir des réponses.Tout le monde ici a R sous la main, mais tout le monde n'a pas tes données. C'est ici que dput te facilite la vie. Il donne une représentation de tes données, même complexes, que tout le monde peut copier/coller dans R. Pas une horreur de fichier excel qu'il prendrait un temps fou à comprendre. Non, simplement tes données à toi telles qu'elles sont sous R. Par exemple, supposons que mes données perso soient celles de data(crimtab), et que j'ai un problème avec elles, je peux faire un dput(crimtab) pour construire un bout de code du genre :
Code : Tout sélectionner
mesdonnees <-
structure(c(0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 2L,
1L, 1L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 2L, 3L, 1L, 1L, 1L, 2L, 2L,
0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L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L
), .Dim = c(42L, 22L), .Dimnames = list(c("9.4", "9.5", "9.6",
"9.7", "9.8", "9.9", "10", "10.1", "10.2", "10.3", "10.4", "10.5",
"10.6", "10.7", "10.8", "10.9", "11", "11.1", "11.2", "11.3",
"11.4", "11.5", "11.6", "11.7", "11.8", "11.9", "12", "12.1",
"12.2", "12.3", "12.4", "12.5", "12.6", "12.7", "12.8", "12.9",
"13", "13.1", "13.2", "13.3", "13.4", "13.5"), c("142.24", "144.78",
"147.32", "149.86", "152.4", "154.94", "157.48", "160.02", "162.56",
"165.1", "167.64", "170.18", "172.72", "175.26", "177.8", "180.34",
"182.88", "185.42", "187.96", "190.5", "193.04", "195.58")), class = "table")
plot(mesdonnees)
Que tout le monde peut exécuter sans effort en faisant un simple copier/coller du code dans sa propre console R (sous Linux, Mac ou windaube). Comme ça tout le monde est certain de bien parler de la même chose et d'avoir toutes les données nécessaires disponibles. Bon, bien entendu, ça ne marche que pour des petits jeux de données, mais ça peut aider dans un premier temps.
Amicalement,
Jean