{"action":"opened","issue":{"url":"https://api.github.com/repos/pbiecek/archivist/issues/61","labels_url":"https://api.github.com/repos/pbiecek/archivist/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/pbiecek/archivist/issues/61/comments","events_url":"https://api.github.com/repos/pbiecek/archivist/issues/61/events","html_url":"https://github.com/pbiecek/archivist/issues/61","id":56091191,"number":61,"title":"able to delete many artifacts in one single call of rmFromRepo","user":{"login":"MarcinKosinski","id":6773454,"avatar_url":"https://avatars.githubusercontent.com/u/6773454?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinKosinski","html_url":"https://github.com/MarcinKosinski","followers_url":"https://api.github.com/users/MarcinKosinski/followers","following_url":"https://api.github.com/users/MarcinKosinski/following{/other_user}","gists_url":"https://api.github.com/users/MarcinKosinski/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinKosinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinKosinski/subscriptions","organizations_url":"https://api.github.com/users/MarcinKosinski/orgs","repos_url":"https://api.github.com/users/MarcinKosinski/repos","events_url":"https://api.github.com/users/MarcinKosinski/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinKosinski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-30T22:08:21Z","updated_at":"2015-01-30T22:08:21Z","closed_at":null,"body":"Now archivist is able to delete many artifacts in one single call of `rmFromRepo()` function.\r\nAdded new parameter `many`, when set to `TRUE` enables to remove many artifacts. \r\nMore information in this example or in note here \r\n````{Ruby}\r\n?rmFromRepo\r\n````\r\n\r\nExample of usage.\r\n````{Ruby}\r\n> # lm object\r\n> model <- lm(Sepal.Length~ Sepal.Width + Petal.Length + Petal.Width, data= iris)\r\n> \r\n> # agnes (twins) object\r\n> library(cluster)\r\n> data(votes.repub)\r\n> agn1 <- agnes(votes.repub, metric = \"manhattan\", stand = TRUE)\r\n> \r\n> # fanny (partition) object\r\n> x <- rbind(cbind(rnorm(10, 0, 0.5), rnorm(10, 0, 0.5)),\r\n+            cbind(rnorm(15, 5, 0.5), rnorm(15, 5, 0.5)),\r\n+            cbind(rnorm( 3,3.2,0.5), rnorm( 3,3.2,0.5)))\r\n> fannyx <- fanny(x, 2)\r\n> \r\n> # lda object\r\n> library(MASS)\r\n> \r\n> Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),\r\n+                    Sp = rep(c(\"s\",\"c\",\"v\"), rep(50,3)))\r\n> train <- c(8,83,115,118,146,82,76,9,70,139,85,59,78,143,68,\r\n+            134,148,12,141,101,144,114,41,95,61,128,2,42,37,\r\n+            29,77,20,44,98,74,32,27,11,49,52,111,55,48,33,38,\r\n+            113,126,24,104,3,66,81,31,39,26,123,18,108,73,50,\r\n+            56,54,65,135,84,112,131,60,102,14,120,117,53,138,5)\r\n> lda1 <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train)\r\n> \r\n> # qda object\r\n> tr <- c(7,38,47,43,20,37,44,22,46,49,50,19,4,32,12,29,27,34,2,1,17,13,3,35,36)\r\n> train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3])\r\n> cl <- factor(c(rep(\"s\",25), rep(\"c\",25), rep(\"v\",25)))\r\n> qda1 <- qda(train, cl)\r\n> \r\n> # glmnet object\r\n> library( glmnet )\r\n> \r\n> zk=matrix(rnorm(100*20),100,20)\r\n> bk=rnorm(100)\r\n> glmnet1=glmnet(zk,bk)\r\n> \r\n> \r\n> # creating example Repository - that examples will work\r\n> \r\n> # save examples\r\n> \r\n> exampleRepoDir <- tempdir()\r\n> createEmptyRepo( repoDir = exampleRepoDir )\r\n> saveToRepo( iris, repoDir=exampleRepoDir )\r\n[1] \"ff575c261c949d073b2895b05d1097c3\"\r\n> saveToRepo( model, repoDir=exampleRepoDir )\r\n[1] \"cd6557c6163a6f9800f308f343e75e72\"\r\nattr(,\"data\")\r\n[1] \"7a761a2ae54f3d90060a9f6ca04b3506\"\r\n> saveToRepo( agn1, repoDir=exampleRepoDir )\r\n[1] \"db864b3dcc09888f5f7f2750b4ab553d\"\r\nattr(,\"data\")\r\n[1] \"c2380a7b8c090d6564ff12cdd60aaf7f\"\r\n> saveToRepo( fannyx, repoDir=exampleRepoDir )\r\n[1] \"7f4dc95318112b5429fe6df2641dace1\"\r\nattr(,\"data\")\r\n[1] \"1789d98595882fae43dcdd4572fa0bc2\"\r\n> saveToRepo( lda1, repoDir=exampleRepoDir )\r\n[1] \"2ae5f73c0b979532555fb3800458a4d4\"\r\nattr(,\"data\")\r\n[1] \"53a9f3aa4235e111524dda17aad2ee3a\"\r\n> saveToRepo( glmnet1, repoDir=exampleRepoDir )\r\n[1] \"1a5e019f736fc7d08e33fd4e244a009e\"\r\nattr(,\"data\")\r\n[1] \"b8401329de1b779fd53f469446f63e5a\"\r\n> \r\n> \r\n> allUniqueMd5hashes <- unique(showLocalRepo(exampleRepoDir)[,1])\r\n> allUniqueMd5hashes\r\n [1] \"ff575c261c949d073b2895b05d1097c3\" \"cd6557c6163a6f9800f308f343e75e72\"\r\n [3] \"7a761a2ae54f3d90060a9f6ca04b3506\" \"db864b3dcc09888f5f7f2750b4ab553d\"\r\n [5] \"c2380a7b8c090d6564ff12cdd60aaf7f\" \"7f4dc95318112b5429fe6df2641dace1\"\r\n [7] \"1789d98595882fae43dcdd4572fa0bc2\" \"2ae5f73c0b979532555fb3800458a4d4\"\r\n [9] \"53a9f3aa4235e111524dda17aad2ee3a\" \"1a5e019f736fc7d08e33fd4e244a009e\"\r\n[11] \"b8401329de1b779fd53f469446f63e5a\"\r\n> rmFromRepo(allUniqueMd5hashes, many = TRUE, repoDir = exampleRepoDir)\r\n> unique(showLocalRepo(exampleRepoDir)[,1])\r\ncharacter(0)\r\n\r\n````"}}