Displaying 20 results from an estimated 96 matches for "miaojpm".
2018 May 23
3
find the permutation function of a sorting
...characters) by the
permutation it returns? Thanks,
> x <- c(10,7,4,3,8,2)
> sort(x, index.return=TRUE)
$x
[1] 2 3 4 7 8 10
$ix
[1] 6 4 3 2 5 1
2018-05-23 10:49 GMT+08:00 David Winsemius <dwinsemius at comcast.net>:
>
>
> > On May 22, 2018, at 10:06 PM, John <miaojpm at gmail.com> wrote:
> >
> > Hi,
> >
> > Is there any way to find the permutation function of the sorting and to
> > apply the function (or its inverse) elsewhere?
> >
> > For example, the following permutation function from the sorting in the
> &...
2018 May 23
3
find the permutation function of a sorting
...ply the permutation function to a new set
c("D","E", "F")?
so that the result is
c("E","D", "F").
2018-05-23 11:06 GMT+08:00 David Winsemius <dwinsemius at comcast.net>:
>
>
> > On May 22, 2018, at 10:57 PM, John <miaojpm at gmail.com> wrote:
> >
> > Thanks, David.
> > I got the answer from the web.
> > Is there any easy way to permute a set (e.g., a set of characters) by
> the permutation it returns? Thanks,
> >
> >
> > > x <- c(10,7,4,3,8,2)
> > > sort...
2018 May 23
0
find the permutation function of a sorting
> On May 22, 2018, at 10:57 PM, John <miaojpm at gmail.com> wrote:
>
> Thanks, David.
> I got the answer from the web.
> Is there any easy way to permute a set (e.g., a set of characters) by the permutation it returns? Thanks,
>
>
> > x <- c(10,7,4,3,8,2)
> > sort(x, index.return=TRUE)
> $x
> [1]...
2012 Apr 12
4
Definition of "lag" is opposite in ts and xts objects!
Example:
Will ts objects be obsolete or modified?
> a [,1]
1983 Q1 2.747365190
1983 Q2 2.791594762
1983 Q3 -0.009953715
1983 Q4 -0.015059485
1984 Q1 -1.190061246
1984 Q2 -0.553031799
1984 Q3 0.686874720
1984 Q4 0.953911035> lag(a,4) [,1]
1983 Q1 NA
1983 Q2 NA
1983 Q3 NA
1983 Q4 NA
1984 Q1 2.747365190
1984 Q2
2018 May 23
0
find the permutation function of a sorting
...","E", "F")?
> so that the result is
> c("E","D", "F").
>
>
>
>
> 2018-05-23 11:06 GMT+08:00 David Winsemius <dwinsemius at comcast.net>:
>
>>
>>
>>> On May 22, 2018, at 10:57 PM, John <miaojpm at gmail.com> wrote:
>>>
>>> Thanks, David.
>>> I got the answer from the web.
>>> Is there any easy way to permute a set (e.g., a set of characters) by
>> the permutation it returns? Thanks,
>>>
>>>
>>>> x <- c(10,7,4,3,...
2017 Oct 12
1
dual y-axis for ggplot
...etype_manual(values = c("twodash", "solid"),guide=FALSE)
p
I searched for help and used the info I found at this link:
https://stackoverflow.com/questions/37140266/how-to-merge-color-line-style-and-shape-legends-in-ggplot
HTH,
Eric
On Thu, Oct 12, 2017 at 10:14 AM, John <miaojpm at gmail.com> wrote:
> Sorry let me clarify.
> If I modify the line
> p <- p + geom_line(aes(y = air_temp, colour = "Temperature"))
> by
> p <- p + geom_line(aes(y = air_temp, colour = "Temperature", linetype
> ="Temperature"))
> and
>...
2012 Feb 17
4
How can I tabulate time series data (in RStudio or any other R editor)?
Hello,
I have a question on how to tabulate the time series data. I use
RStudio, but if can be done in any other R editor, it should work in
RStudio as well.
> a1<-11:22
> a1ts<-ts(a1, frequency=4, start=c(1978,1))
> a1ts Qtr1 Qtr2 Qtr3 Qtr4
1978 11 12 13 14
1979 15 16 17 18
1980 19 20 21 22
If I click the variable "a1ts" on the
2017 Sep 28
5
rename multiple files by file.rename or other functions
Hi,
I have 50 files whose names are
XYZW01Genesis_ABC.mp3
XYZW02Genesis_ABC.mp3
.......
XYZW50Genesis_ABC.mp3
As you can tell, the only difference across the files are 01, 02,
03,....50.
I would like to rename them to
01Gen01.mp3
01Gen02.mp3
.......
01Gen50.mp3
If I store them in one folder and write an R code in that folder, how can
it be done?
Thanks,
John
[[alternative
2013 May 03
10
Why can't R understand if(num!=NA)?
I have a program, when I write
if(num!=NA)
it yields an error message.
However, if I write
if(is.na(num)==FALSE)
it works.
Why doesn't the first statement work?
Thanks,
Miao
[[alternative HTML version deleted]]
2017 Oct 12
0
dual y-axis for ggplot
...h", "solid")),
I will have two lines with different color and different line type,
but I will have two legends (one with blue/red,solid, the other with two
dash/solid, black ).
How can I have only one legend with blue/two dash and red/solid?
2017-10-12 0:06 GMT-07:00 John <miaojpm at gmail.com>:
> Hi,
>
> To my knowledge, an excellent of ggplot with a second y-axis is
>
> https://rpubs.com/MarkusLoew/226759
>
> In this example, the author uses two colors for the two lines, but the
> line shapes are the same -- both are solid. Could each line...
2017 Sep 24
3
"XLConnect" packages; Excel dates read incorrectly
...> It could be due to this:
> >>
> >> https://support.microsoft.com/en-au/help/214330/differences-
> >> between-the-1900-and-the-1904-date-system-in-excel
> >>
> >> Jim
> >>
> >>
> >> On Sat, Sep 23, 2017 at 1:04 PM, John <miaojpm at gmail.com> wrote:
> >>> Hi,
> >>>
> >>> I tried to read xlsx files by "XLConnect" packages, but the dates are
> >>> one day earlier than it is supposed to be. I moved from California to
> >>> Taiwan (Eastern Asia), and it...
2017 Oct 12
2
dual y-axis for ggplot
Hi,
To my knowledge, an excellent of ggplot with a second y-axis is
https://rpubs.com/MarkusLoew/226759
In this example, the author uses two colors for the two lines, but the
line shapes are the same -- both are solid. Could each line have its own
color as well as its own shape? For example, can I make the red line with
the linetype "twodash", while the blue line with the
2012 Feb 21
2
Debugging using RStudio or any other R editor
Hello,
I am using RStudio and have trouble finding out the problematic line in
the presence of a bug. Could I view the line NUMBER which contains a bug?
Is there any R editor able to do it?
Thanks,
Miao
[[alternative HTML version deleted]]
2012 Mar 22
2
Any package recommended for time series graphics in R?
Hello,
I would like to produce a few time series graphs with R. My data is
usually quarterly or monthly. I sometimes need to have two y-axes, one at
the left, the other right. Is there any toolbox producing nice looking time
series graphs?
Thanks,
miao
[[alternative HTML version deleted]]
2013 Jun 11
2
How can we access an element in a structure
Hi,
I have a structure, which is the result of a function
How can I access the elements in the gradient?
> dput(test1)
structure(-1.17782911684913, gradient = structure(c(-0.0571065371783791,
-0.144708170683529), .Dim = 1:2, .Dimnames = list(NULL, c("x1",
"x2"))))
> test1[[1]]
[1] -1.177829
> test1
[1] -1.177829
attr(,"gradient")
x1
2017 Oct 17
0
ggplot / second axis / just a notation problem
Hi John,
Why not just try both and see which one makes sense?
On Tue, Oct 17, 2017 at 12:24 PM, John <miaojpm at gmail.com> wrote:
> Hi,
>
> I have a question on ggplot2 with the second axis, but I don't think one
> needs to know ggplot2 package in order to answer this question.
>
> In this example,
> https://rpubs.com/MarkusLoew/226759
> since the transformation of...
2018 May 23
2
find the permutation function of a sorting
Hi,
Is there any way to find the permutation function of the sorting and to
apply the function (or its inverse) elsewhere?
For example, the following permutation function from the sorting in the
matrix form is
c(1,2,3), c(2,1,3)
> sort(c("bc","ac","dd"))
[1] "ac" "bc" "dd"
I try to find it in the permutations/permute
2018 May 23
0
find the permutation function of a sorting
> On May 22, 2018, at 10:06 PM, John <miaojpm at gmail.com> wrote:
>
> Hi,
>
> Is there any way to find the permutation function of the sorting and to
> apply the function (or its inverse) elsewhere?
>
> For example, the following permutation function from the sorting in the
> matrix form is
> c(1,2,3), c(2...
2017 Sep 24
0
"XLConnect" packages; Excel dates read incorrectly
...quot;2004-01-23" "2004-01-26" "2004-01-27" "2004-01-28" "2004-01-29"
"2004-01-30" "2004-02-02"
HTH,
Eric
p.s.
you can also just use the shorter
date11<-as.Date(as.POSIXlt(a_col$date))
On Sun, Sep 24, 2017 at 8:51 AM, John <miaojpm at gmail.com> wrote:
> Hi,
>
> Thank you for all your responses.
> For Eric, The files are attached. (I believe it was also attached in my
> first message)
> For David, Could you send me the link regarding possible solutions or a
> more comprehensive description of...
2017 Oct 17
2
ggplot / second axis / just a notation problem
Hi,
I have a question on ggplot2 with the second axis, but I don't think one
needs to know ggplot2 package in order to answer this question.
In this example,
https://rpubs.com/MarkusLoew/226759
since the transformation of the second axis is given by y1=y2*5,
#####
p <- p + scale_y_continuous(sec.axis = sec_axis(~.*5, name = "Relative
humidity [%]"))
#####
Note