Re: [R] Need help to unzip files in Windows

2021-08-23 Thread Anas Jamshed
but the point is that where should I start from now On Tue, Aug 24, 2021 at 7:43 AM Andrew Simmons wrote: > Hello, > > > I see what you're saying that the .tar archive contains many more > compressed files, but that's not necessarily a problem. R can read directly > from a compressed file

Re: [R] Need help to unzip files in Windows

2021-08-23 Thread Andrew Simmons
Hello, I see what you're saying that the .tar archive contains many more compressed files, but that's not necessarily a problem. R can read directly from a compressed file without having to decompress it beforehand. I modified my code to look a little more like yours: # need to do

Re: [R] data manipulation question

2021-08-23 Thread Jim Lemon
Hi Kai, How about setting: germlinepatients$DisclosureStatus <- NA then having your three conditional statements as indices: germlinepatients$DisclosureStatus[germlinepatients$gl_resultsdisclosed == 1] <-"DISCLOSED" germlinepatients$DisclosureStatus[germlinepatients$ gl_resultsdisclosed == 0]

Re: [R] Need help to unzip files in Windows

2021-08-23 Thread Anas Jamshed
sir after that I want to run: #get the list of sample names GSMnames <- t(list.files("~/Desktop/GSE162562_RAW", full.names = F)) #remove .txt from file/sample names GSMnames <- gsub(pattern = ".txt", replacement = "", GSMnames) #make a vector of the list of files to aggregate files <-

Re: [R] Dynamic Creation and Use of Object Names

2021-08-23 Thread Dr Eberhard Lisse
Thanks, long weekend coming up :-)-O el On 2021-08-23 18:06 , Bert Gunter wrote: ... and to add to Ivan's suggestions, **depending on what you are trying to show with your grid of graphs,** you may wish to consider using ggplot's "facet" capabilities to assure that any quantitative variables

[R] data manipulation question

2021-08-23 Thread Kai Yang via R-help
Hello List, I wrote the script below to assign value to a new field DisclosureStatus. my goal is if gl_resultsdisclosed=1 then DisclosureStatus=DISCLOSED else if gl_resultsdisclosed=0 then DisclosureStatus= ATTEMPTED else if gl_resultsdisclosed is missing and gl_discloseattempt1 is not missing

Re: [R] Need help to unzip files in Windows

2021-08-23 Thread Abby Spurdle
There are some differences in R, between Windows and Linux. You could try the 'shell' command instead. #On Windows ?shell On Tue, Aug 24, 2021 at 4:53 AM Anas Jamshed wrote: > > I have the file GSE162562_RAW. First I untar them > by untar("GSE162562_RAW.tar") > then I am running like: >

Re: [R] Need help to unzip files in Windows

2021-08-23 Thread Andrew Simmons
Hello, I tried downloading that file using 'utils::download.file' (which worked), but then continued to complain about "damaged archive" when trying to use 'utils::untar'. However, it seemed to work when I downloaded the archive manually. Finally, the solution I found is that you have to specify

Re: [R] Need help to unzip files in Windows

2021-08-23 Thread Anas Jamshed
I am trying this URL: " https://ftp.ncbi.nlm.nih.gov/geo/series/GSE162nnn/GSE162562/suppl/GSE162562_RAW.tar " but it is not giving me any file On Mon, Aug 23, 2021 at 11:42 PM Andrew Simmons wrote: > Hello, > > > I don't think you need to use a system command directly, I think > 'utils::untar'

Re: [R] Need help to unzip files in Windows

2021-08-23 Thread Andrew Simmons
Hello, I don't think you need to use a system command directly, I think 'utils::untar' is all you need. I tried the same thing myself, something like: URL <- "https://exiftool.org/Image-ExifTool-12.30.tar.gz; FILE <- file.path(tempdir(), basename(URL)) utils::download.file(URL, FILE)

Re: [R] Selecting elements

2021-08-23 Thread Silvano Cesar da Costa
Hi, I apologize for the confusion. I will try to be clearer in my explanation. I believe that with the R script it becomes clearer. I have 4 variables with 10 repetitions and each one receives a value, randomly. I order the dataset from largest to smallest value. I have to select 10 elements in

[R] Need help to unzip files in Windows

2021-08-23 Thread Anas Jamshed
I have the file GSE162562_RAW. First I untar them by untar("GSE162562_RAW.tar") then I am running like: system("gunzip ~/Desktop/GSE162562_RAW/*.gz") This is running fine in Linux but not in windows. What changes I should make to run this command in windows as well [[alternative HTML

Re: [R] Dynamic Creation and Use of Object Names

2021-08-23 Thread Bert Gunter
... and to add to Ivan's suggestions, **depending on what you are trying to show with your grid of graphs,** you may wish to consider using ggplot's "facet" capabilities to assure that any quantitative variables that you are encoding in the maps (e.g. by color, density shading, etc.) are depicted

Re: [R] Dynamic Creation and Use of Object Names

2021-08-23 Thread Dr Eberhard Lisse
Thank you, more to study :-)-O el On 23/08/2021 10:20, Ivan Krylov wrote: On Mon, 23 Aug 2021 08:37:54 +0200 Dr Eberhard Lisse wrote: create the variables dynamically and add them to to the grid (dynamically, ie adding more countries) In my opinion, creating variables in the global

Re: [R] Dynamic Creation and Use of Object Names

2021-08-23 Thread Ivan Krylov
On Mon, 23 Aug 2021 08:37:54 +0200 Dr Eberhard Lisse wrote: > create the variables dynamically and add them to to > the grid (dynamically, ie adding more countries) In my opinion, creating variables in the global environment programmatically may lead to code that is hard to understand and debug

Re: [R] Selecting elements

2021-08-23 Thread PIKAL Petr
Hi Only I got your HTML formated mail, rest of the world got complete mess. Do not use HTML formating. As I got it right I wonder why in your second example you did not follow 3A - 3B - 2C - 2D as D were positioned 1st and 4th. I hope that you could use something like sss <-

[R] [R-pkgs] New Release: package replacer_v.1.0.0

2021-08-23 Thread DB
"replacer v.1.0.0" new package submission "replacer" is a value replacement utility currently based on the powerful package "data.table", available on CRAN. This utility is purposed for outside-database update of datasets. It is accessible to beginners to `R` and facilitates complex dataset

[R] Dynamic Creation and Use of Object Names

2021-08-23 Thread Dr Eberhard Lisse
Hi, I have a function PICTURE() and do something like COUNTRY = 'Namibia' NAKURVE = PICTURE(COUNTRY) NAKURVE ggsave(paste0(tolower(COUNTRY),".png"), width = 16, height = 9) COUNTRY = ('Germany') DEKURVE = PICTURE(COUNTRY) DEKURVE

Re: [R] Find "undirected" duplicates in a tibble

2021-08-23 Thread Kimmo Elo
Hi! Thank you very much for the fascinating solutions. Nice to learn different approaches. All solutions seem to work with text data as well. @Gabor (who suggested the 'igraph' package): yes, I am familiar with 'igraph' and the solution suggested by you works fine, too. Since I need this kind of