Displaying 20 results from an estimated 20000 matches similar to: "Complex sort problem"
2011 Feb 26
2
Reproducibility issue in gbm (32 vs 64 bit)
Dear List,
The gbm package on Win 7 produces different results for the
relative importance of input variables in R 32-bit relative to R 64-bit. Any
idea why? Any idea which one is correct?
Based on this example, it looks like the relative importance of 2 perfectly
correlated predictors is "diluted" by half in 32-bit, whereas in 64-bit, one
of these predictors gets all the importance
1999 Apr 03
2
tabulate causes segmentation fault (PR#156)
Peter,
I thought this one was noted and fixed, but I could be wrong.
R : Copyright 1999, The R Development Core Team
Version 0.63.3 (March 6, 1999)
....
[Previously saved workspace restored]
> tabulate(1:10, 5)
Process R:1 segmentation fault at Sat Apr 3 17:48:34 1999
--
(The following contact details become official on 1 May 1999, but
the email
2011 Mar 19
2
persuade tabulate function to count NAs in a data frame
Hi,
I'd like to ask you a question again. It is basically about data frames, NAs and tabulate function.
I have this data frame. I already used this in one of the previous questions of mine. It intentionally looks this simple, my real 'df' dataframe is much bigger actually and again, I am not willing to annoy anyone with huge databases... So, my database:
id
2004 Oct 20
2
apply function
Hi all,
I have a question about apply function. Is that possible to pass some
non-default arguments in the function we want to apply ?
For example:
if "mat" is a matrix and I want to use the "tabulate" function on its row.
The command apply(mat,1,tabulate) works but I have problem with this one
apply(mat, 1, tabulate(nbins=4)).
Any clue ?
Thanks,
Eric
--
Eric
2014 Jan 18
6
My first package
Hi All,
I'm planning to submit my first package to R, and although I read all the
documentation, I'm not very clear on the following 2 items, from which I'd
appreciate your guidance:
1)I understand it is suggested to use the R dev version to build the
package. Which one specifically should I use to build a package on a Mac
OS? How about package dependencies, which version should I
2016 Apr 01
3
TensorFlow in R
Hi All,
I didn't have much success through my Google search in finding any active
R-related projects to create a wrapper around TensorFlow in R. Anyone know
if this is on the go?
Thanks,
Axel.
[[alternative HTML version deleted]]
2016 Apr 01
3
TensorFlow in R
Hi All,
I didn't have much success through my Google search in finding any active
R-related projects to create a wrapper around TensorFlow in R. Anyone know
if this is on the go?
Thanks,
Axel.
[[alternative HTML version deleted]]
2013 Feb 10
3
Constrained Optimization in R (alabama)
Dear List,
I'm trying to solve this simple optimization problem in R. The parameters
are the exponents to the matrix mm. The constraints specify that each row
of the parameter matrix should sum to 1 and their product to 0. I don't
understand why the constraints are not satisfied at the solution. I must be
misinterpreting how to specify the constrains somehow.
library(alabama)
ff <-
2009 Jul 20
1
tabulate can accept NA values?
tabulate has
.C("R_tabulate", as.integer(bin), as.integer(length(bin)),
as.integer(nbins), ans = integer(nbins), PACKAGE="base")$ans
The implementation of R_tabulate has
if(x[i] != R_NaInt && x[i] > 0 && x[i] <= *nbin)
and so copes with (silently drops) NA. Perhaps the .C could have
NAOK=TRUE? This is useful in apply'ing tabulate to
2010 Feb 21
4
R on 64-Bit…
Dear R users,
I know this issue came up in the list several times. I’m currently running
R on 32-bit on Windows and due to memory limitation problems would like to
move to a 64-bit environment. I’m exploring my options and would appreciate
your expertise:
1) Windows 64-bit: Prof. Brian Ripley recently posted the experimental
built of R for win 64-bit. I’ll appreciate any feedback on
2013 Jan 10
6
sort matrix based on a specific order
Hi I have a character matrix with 2 columns A and B, If I want to sort the matrix based on the column B, but based on a specific order of characters:
mat<-cbind(c('w','x','y','z'),c('a','b','c','d'))
ind<-c('c','b','d','a')
I want "mat" to be sorted by the sequence in "ind":
2017 Sep 21
3
Add wrapper to Shiny in R package
Dear List,
I'm trying to add a function that calls a Shiny App in my R package. The
issue is that within my function, I'm creating objects that I'd like to
pass to the app. For instance, from the example below, I'm getting
"Error: object
'xs' not found". How can I pass "xs" explicitly to shinyApp()?
*Under R directory:*
myApp <- function(x, ...) {
2010 Mar 14
7
R on Linux - a primer
Hi,
I'm looking to move from Windows into a 64-bit Linux environment. Which is
the best Linux Flavor to use within R? To install R on this environment, do
I need to do any compiling?
Thanks all!
Axel.
[[alternative HTML version deleted]]
2017 Sep 21
0
Add wrapper to Shiny in R package
Dear Axel,
I've used environment for such problems.
assign("xs", xs, envir = my.env) in the myApp function
get("xs", envir = my.env) in the server function
Best regards,
ir. Thierry Onkelinx
Statisticus/ Statiscian
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
AND FOREST
Team Biometrie &
2017 Nov 10
2
Calculating frequencies of multiple values in 200 colomns
|> x <- sample(0:2, 10, replace = TRUE)
|> x
[1] 1 0 2 1 0 2 2 0 2 1
|> tabulate(x)
[1] 3 4
|> table(x)
x
0 1 2
3 3 4
B.
> On Nov 10, 2017, at 4:32 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote:
>
>
>
> Thank you for your effort Bert..,
>
>
> I knew what is the problem now, the values (1,2,3) were only an example. The values I have are
2017 Sep 08
2
quote()/eval() question
Dear list,
For a reason it would take me long to explain, I need to do something along
the lines of what's shown below -- i.e., create an object from
dplyr::summarise, and then evaluate it on a data frame.
I know I could directly do:
df %>% dplyr::summarise(x1_mean = mean(x1))
but this is not what I'm looking for.
library(dplyr)
df <- data.frame(x1 = rnorm(100), x2 =
2011 Mar 17
2
Help with Time Series Plot
Dear List,
This is an embarrassing question, but I can seem to make this work…How do I
change the font size on the xlab and on the numbers shown in the x-axis on
the time series plot below. The arguments cex.lab and cex.axis do not seem
to be 'passing' to the plot function.
plot(ts(rnorm(100), start=2004, freq=12),
ylab="RQI", xlab="My X lab",
2017 Sep 17
2
Shiny App inside R Package
Dear List,
I have a wrapper function that creates a Shiny App, as illustrated below.
I'd like to include the function myApp() inside a package. I'd appreciate
your guidance here, as I could not find good instructions on this online.
myApp <- function(x) {
require(shiny)
shinyApp(
ui = fluidPage(
sidebarLayout(
sidebarPanel(sliderInput("n",
2017 Sep 21
1
Add wrapper to Shiny in R package
Thank you Thierry. I'm trying to following your suggestion in the example
below, but getting:
Error in get("xs", envir = my.env) : object 'my.env' not found.
library(shiny)
library(shinydashboard)
myApp <- function(x, ...) {
xs <- scale(x)
my.env <- new.env()
assign("xs", xs, envir = my.env)
shiny::runApp(app)
}
app = shinyApp(
ui =
2011 Feb 12
2
Predictions with missing inputs
Dear users,
I'll appreciate your help with this (hopefully) simple problem.
I have a model object which was fitted to inputs X1, X2, X3. Now, I'd like
to use this object to make predictions on a new data set where only X1 and
X2 are available (just use the estimated coefficients for these variables in
making predictions and ignoring the coefficient on X3). Here's my attempt
but, of