Ordering Filenames stored in list or vector

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Ordering Filenames stored in list or vector

BARLAS Marios 247554
Hello everyone,

I am an R rookie and I'm learning as I program.

I am working on a script to process a large amount of data: I read a pattern of filenames in the folder I want and import their data

filenames = list.files(path, pattern="*Q_Read_prist*")

myfiles = lapply(filenames, function(x) read.xlsx2(file=x, sheetName="Data", header=TRUE, FILENAMEVAR=x))

The problem is that R recognizes the files in a 'non human' order.

Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]

I tried to order them using order or sort but it doesn' seem to work. I have had the same issue in matlab but there I have a function to re-define the order in a "correct" way.

Anyone knows of a smart way to sort these guys from 1 to 19 ascending or descending?

Thanks in advance,
Mario

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Filenames stored in list or vector

Boris Steipe
The thread below has a number of solutions. I personally like the one with sprintf().
   https://stat.ethz.ch/pipermail/r-help/2010-July/246059.html


B.

On Dec 4, 2015, at 5:51 AM, BARLAS Marios 247554 <[hidden email]> wrote:

> Hello everyone,
>
> I am an R rookie and I'm learning as I program.
>
> I am working on a script to process a large amount of data: I read a pattern of filenames in the folder I want and import their data
>
> filenames = list.files(path, pattern="*Q_Read_prist*")
>
> myfiles = lapply(filenames, function(x) read.xlsx2(file=x, sheetName="Data", header=TRUE, FILENAMEVAR=x))
>
> The problem is that R recognizes the files in a 'non human' order.
>
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>
> I tried to order them using order or sort but it doesn' seem to work. I have had the same issue in matlab but there I have a function to re-define the order in a "correct" way.
>
> Anyone knows of a smart way to sort these guys from 1 to 19 ascending or descending?
>
> Thanks in advance,
> Mario
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Filenames stored in list or vector

Henrik Bengtsson-5
> filenames <- c("Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]")
> filenames <- gtools::mixedsort(filenames, numeric.type="decimal")
> filenames
[1] "Q_Read_prist#[hidden email]"  "Q_Read_prist#[hidden email]"  "Q_Read_prist#[hidden email]"

/Henrik

On Fri, Dec 4, 2015 at 7:53 AM, Boris Steipe <[hidden email]> wrote:

> The thread below has a number of solutions. I personally like the one with sprintf().
>    https://stat.ethz.ch/pipermail/r-help/2010-July/246059.html
>
>
> B.
>
> On Dec 4, 2015, at 5:51 AM, BARLAS Marios 247554 <[hidden email]> wrote:
>
>> Hello everyone,
>>
>> I am an R rookie and I'm learning as I program.
>>
>> I am working on a script to process a large amount of data: I read a pattern of filenames in the folder I want and import their data
>>
>> filenames = list.files(path, pattern="*Q_Read_prist*")
>>
>> myfiles = lapply(filenames, function(x) read.xlsx2(file=x, sheetName="Data", header=TRUE, FILENAMEVAR=x))
>>
>> The problem is that R recognizes the files in a 'non human' order.
>>
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>>
>> I tried to order them using order or sort but it doesn' seem to work. I have had the same issue in matlab but there I have a function to re-define the order in a "correct" way.
>>
>> Anyone knows of a smart way to sort these guys from 1 to 19 ascending or descending?
>>
>> Thanks in advance,
>> Mario
>>
>>       [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Filenames stored in list or vector

R. Mark Sharp
In reply to this post by BARLAS Marios 247554
Mario,

I am certain there are more elegant solutions. This is an effort to make the process clear by dividing out each transformation used into separate lines.

## Start of code
library(stringi) # This is written in C and C++ (ICU library), is fast, and is well documented.
filenames <- c("Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]")
indx_list <- stri_split_regex(filenames, pattern = "[@.]")
indx <- sapply(indx_list, function(x) {x[[2]]})
filenames_df <- data.frame(file_name = filenames, indx = indx,
                            stringsAsFactors = FALSE)
filenames_ordered <- filenames_df[order(as.numeric(filenames_df$indx)),
                                    "file_name"]
filenames_ordered
## end of code
Mark


R. Mark Sharp, Ph.D.
Director of Primate Records Database
Southwest National Primate Research Center
Texas Biomedical Research Institute
P.O. Box 760549
San Antonio, TX 78245-0549
Telephone: (210)258-9476
e-mail: [hidden email]







> On Dec 4, 2015, at 4:51 AM, BARLAS Marios 247554 <[hidden email]> wrote:
>
> Hello everyone,
>
> I am an R rookie and I'm learning as I program.
>
> I am working on a script to process a large amount of data: I read a pattern of filenames in the folder I want and import their data
>
> filenames = list.files(path, pattern="*Q_Read_prist*")
>
> myfiles = lapply(filenames, function(x) read.xlsx2(file=x, sheetName="Data", header=TRUE, FILENAMEVAR=x))
>
> The problem is that R recognizes the files in a 'non human' order.
>
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>
> I tried to order them using order or sort but it doesn' seem to work. I have had the same issue in matlab but there I have a function to re-define the order in a "correct" way.
>
> Anyone knows of a smart way to sort these guys from 1 to 19 ascending or descending?
>
> Thanks in advance,
> Mario
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Filenames stored in list or vector

BARLAS Marios 247554
Thanks a lot for the clarifying code Mark!

Actually, I took a lazy option and after some digging around I found out the package called "naturalsort" which provides a pretty compact solution!

As a rookie, I have another question. My main interest in R is that I hope to integrate in a scripting fashion good amount of data crunching coming from electrical measurements and at the same time give me a nice visualization option all in the same tool.

Is it a proper tool for such use in your experience? So far I was using Matlab + OriginPro for treatment and visualization but now, starting my PhD I feel like I want something more "integrated"

Thanks,
Mario
________________________________________
From: Mark Sharp [[hidden email]]
Sent: Friday, December 04, 2015 5:25 PM
To: BARLAS Marios 247554
Cc: [hidden email]
Subject: Re: [R] Ordering Filenames stored in list or vector

Mario,

I am certain there are more elegant solutions. This is an effort to make the process clear by dividing out each transformation used into separate lines.

## Start of code
library(stringi) # This is written in C and C++ (ICU library), is fast, and is well documented.
filenames <- c("Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
           "Q_Read_prist#[hidden email]")
indx_list <- stri_split_regex(filenames, pattern = "[@.]")
indx <- sapply(indx_list, function(x) {x[[2]]})
filenames_df <- data.frame(file_name = filenames, indx = indx,
                            stringsAsFactors = FALSE)
filenames_ordered <- filenames_df[order(as.numeric(filenames_df$indx)),
                                    "file_name"]
filenames_ordered
## end of code
Mark


R. Mark Sharp, Ph.D.
Director of Primate Records Database
Southwest National Primate Research Center
Texas Biomedical Research Institute
P.O. Box 760549
San Antonio, TX 78245-0549
Telephone: (210)258-9476
e-mail: [hidden email]







> On Dec 4, 2015, at 4:51 AM, BARLAS Marios 247554 <[hidden email]> wrote:
>
> Hello everyone,
>
> I am an R rookie and I'm learning as I program.
>
> I am working on a script to process a large amount of data: I read a pattern of filenames in the folder I want and import their data
>
> filenames = list.files(path, pattern="*Q_Read_prist*")
>
> myfiles = lapply(filenames, function(x) read.xlsx2(file=x, sheetName="Data", header=TRUE, FILENAMEVAR=x))
>
> The problem is that R recognizes the files in a 'non human' order.
>
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>
> I tried to order them using order or sort but it doesn' seem to work. I have had the same issue in matlab but there I have a function to re-define the order in a "correct" way.
>
> Anyone knows of a smart way to sort these guys from 1 to 19 ascending or descending?
>
> Thanks in advance,
> Mario
>
>       [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Ordering Filenames stored in list or vector

John Kane
Hi Marios,

>"My main interest in R is that I hope to integrate in a scripting fashion good amount of data crunching
> coming from electrical measurements and at the same time give me a nice
> visualization option all in the same tool.

I have never used Matlab, etc, so I have no idea how these integrate but it should be possible to go from raw data to written paper if you want to in R.

See http://yihui.name/knitr/demo/showcase/ for some examples.

It

John Kane
Kingston ON Canada


> -----Original Message-----
> From: [hidden email]
> Sent: Mon, 7 Dec 2015 10:59:58 +0000
> To: [hidden email]
> Subject: Re: [R] Ordering Filenames stored in list or vector
>
> Thanks a lot for the clarifying code Mark!
>
> Actually, I took a lazy option and after some digging around I found out
> the package called "naturalsort" which provides a pretty compact
> solution!
>
> As a rookie, I have another question.
>
> Is it a proper tool for such use in your experience? So far I was using
> Matlab + OriginPro for treatment and visualization but now, starting my
> PhD I feel like I want something more "integrated"
>
> Thanks,
> Mario
> ________________________________________
> From: Mark Sharp [[hidden email]]
> Sent: Friday, December 04, 2015 5:25 PM
> To: BARLAS Marios 247554
> Cc: [hidden email]
> Subject: Re: [R] Ordering Filenames stored in list or vector
>
> Mario,
>
> I am certain there are more elegant solutions. This is an effort to make
> the process clear by dividing out each transformation used into separate
> lines.
>
> ## Start of code
> library(stringi) # This is written in C and C++ (ICU library), is fast,
> and is well documented.
> filenames <- c("Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]", "Q_Read_prist#[hidden email]",
>            "Q_Read_prist#[hidden email]")
> indx_list <- stri_split_regex(filenames, pattern = "[@.]")
> indx <- sapply(indx_list, function(x) {x[[2]]})
> filenames_df <- data.frame(file_name = filenames, indx = indx,
>                             stringsAsFactors = FALSE)
> filenames_ordered <- filenames_df[order(as.numeric(filenames_df$indx)),
>                                     "file_name"]
> filenames_ordered
> ## end of code
> Mark
>
>
> R. Mark Sharp, Ph.D.
> Director of Primate Records Database
> Southwest National Primate Research Center
> Texas Biomedical Research Institute
> P.O. Box 760549
> San Antonio, TX 78245-0549
> Telephone: (210)258-9476
> e-mail: [hidden email]
>
>
>
>
>
>
>
>> On Dec 4, 2015, at 4:51 AM, BARLAS Marios 247554 <[hidden email]>
>> wrote:
>>
>> Hello everyone,
>>
>> I am an R rookie and I'm learning as I program.
>>
>> I am working on a script to process a large amount of data: I read a
>> pattern of filenames in the folder I want and import their data
>>
>> filenames = list.files(path, pattern="*Q_Read_prist*")
>>
>> myfiles = lapply(filenames, function(x) read.xlsx2(file=x,
>> sheetName="Data", header=TRUE, FILENAMEVAR=x))
>>
>> The problem is that R recognizes the files in a 'non human' order.
>>
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email] Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>> Q_Read_prist#[hidden email]   Q_Read_prist#[hidden email]
>>
>> I tried to order them using order or sort but it doesn' seem to work. I
>> have had the same issue in matlab but there I have a function to
>> re-define the order in a "correct" way.
>>
>> Anyone knows of a smart way to sort these guys from 1 to 19 ascending or
>> descending?
>>
>> Thanks in advance,
>> Mario
>>
>>       [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.