On Tue, 18 Jul 2017 09:58:19 +0700
Jesadaporn Pupantragul wrote:
> Hello r-help
> I am learning R and use R-studio.
> I create vector x <- c(19,17,23,11) and use function order(x).
> The result show [1] 4 2 1 3. Why it doesn't show [1] 3 2 4 1.
> Follow picture that i attach.
> Thank you for you
I think you want rank, not order.
> x <- c(19,17,23,11)
> order(x)
[1] 4 2 1 3
> rank(x)
[1] 3 2 4 1
See help(order) and help(rank) for the difference.
Peter
On Mon, Jul 17, 2017 at 7:58 PM, Jesadaporn Pupantragul
wrote:
> Hello r-help
> I am learning R and use R-studio.
> I create vector x <-
On 18/07/17 14:58, Jesadaporn Pupantragul wrote:
Hello r-help
I am learning R and use R-studio.
I create vector x <- c(19,17,23,11) and use function order(x).
The result show [1] 4 2 1 3. Why it doesn't show [1] 3 2 4 1.
Follow picture that i attach.
Thank you for you answer.
Perhaps this will
You need to study ?order and perhaps also subscripting. If that isn't
sufficient, I suggest you consult one of the many R web tutorials that
cover this.
Perhaps this will help:
x[order(x)] gives x in sorted order, which is what you woud get with
sort(x). Indeed, the code implementing sort.defaul
Hi Jesadaporn,
Try:
order(x,decreasing=TRUE)
Jim
On Tue, Jul 18, 2017 at 12:58 PM, Jesadaporn Pupantragul
wrote:
> Hello r-help
> I am learning R and use R-studio.
> I create vector x <- c(19,17,23,11) and use function order(x).
> The result show [1] 4 2 1 3. Why it doesn't show [1] 3 2 4 1.
>
It seems that the method `iteration` in the function `ode` can be useful in my
case:
> Method "iteration" is special in that here the function func should
> return the new value of the state variables rather than the rate of
> change. This can be used for individual based models, for difference
>
I am trying to use a shiny app to update records in an sqlite database. I keep
running into the following error:
unable to find an inherited method for function 'dbSendQuery' for signature
'"src_dbi", "character"'
The query I am trying to send is:
[1] "update kpquestions set mrisupercat = 'Dem
awesome, thank you! looks like folks on bugzilla have also reproduced and
submitted a patch, so i am happy. thanks all
On Mon, Jul 17, 2017 at 11:36 AM, William Dunlap wrote:
> The original file had a lot of trailing null bytes so I tried making a
> similar file with:
>
> tf <- tempfile(); file
The original file had a lot of trailing null bytes so I tried making a
similar file with:
tf <- tempfile(); file <- file(tf, "wb")
for(i in 1:(2^15-1))writeBin(rep(as.raw(32:127), len=2^16), file)
for(i in 1:(2^15-1))writeBin(rep(as.raw(0L), len=2^16), file)
close(file)
log2(file.size(tf))
#[1] 31
I'll pass. Just because some non-CRAN "archive" package has bugs or your disk
storage is flaky does not mean that any of dozens or hundreds of other
compression tools (e.g. the built-in Windows "Send to compressed folder" pop-up
menu) won't get it right, and we would know if it did fail because
On 7/16/2017 9:36 AM, Nada Gh wrote:
Hi,
I create a plot using sunflowerplot, I need to highlight one point to show
its importance. What suggestion you have to accomplish this?
Thanks,
In general, the way to answer such a question for yourself is to read
the documentation for arguments relat
hi, thanks again for taking the time. since corrupted compression prompted
the segfault for me in the first place, i've just posted the text file
as-is. it's a 2.4GB file so to be avoided on a metered internet
connection. i've updated the bugzilla report at
https://bugs.r-project.org/bugzilla3/s
12 matches
Mail list logo