similar to: conflict when passing an argument to a function within an other function

Displaying 20 results from an estimated 600 matches similar to: "conflict when passing an argument to a function within an other function"

2008 Sep 25
2
ggplot, qplot in loop
Dear List, yes, me again trying to work with qplot ;-) I would like to make several single plots within a loop, like this (simplified and so on...): trials <- c("A","B","C") mycolours <- ("wheat","darkolivegreen","lightgreen",
2008 Aug 05
1
xyplot key issue - line colors
I have a problem regarding the colors assigned to the lines in the key to an xy plot. I specify the plot like this: xyplot(numbers~sqrt(breaks)|moltype+disttype, groups = type, data = alldata, layout = c(3,2), type = "l" , lwd = 2, col = c("gray", "skyblue"), key = simpleKey(levels(alldata$type), points = FALSE, lines = TRUE, columns = 2, lwd = 2,
2009 Mar 28
7
unicode only works with a second one
I'd like to paste a zodiac sign on a graph, but it only prints it when I add another unicode ( \u3030) to the desired \u2648 - why? See the examplecode (compare the orange with the skyblue): plot(c(-1,1),c(-4,-2),type="n") text(x=0,y=-3.0,labels="\u2648 \u3030",cex=2.3,col="skyblue") text(x=0,y=-3.2,labels="\u2648",cex=2.3,col="orange")
2020 Sep 27
2
GRÁFICO DE BARRAS COMPARATIVO VARIOS AÑOS
Buenas noches, Tengo que preparar un gráfico de barras comparativo para varios años, en el que tenga agrupadas, 3 barras para enero, 3 barras para febrero, 3 barras para marzo y así sucesivamente para todos los meses, estando en cada mes, los años 2020, 2019 y 2018 (juntas), un pequeño espacio y luego las de febrero y así sucesivamente... Con el siguiente código, hago un año:
2018 Jan 12
1
shading (fill) the area between two lines
Dear All: I am trying to shade the area between the two lines; *line 1* and *line 2*. You can use this code as an example. x100<-c(-1,1,2,3,4,5,6,3) y100<-c(4,5,3,1,4,4,2,-1) plot(x100,y100) *##### line1* abline(a=-(Beta0-1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3, col="skyblue", lty=3) ##### lty=3, *##### line 2* abline(a=-(Beta0+1)/Beta[1,2],
2008 Oct 20
2
pass longer arguments to adj of text()
Hi, text()'s pos does handle more dimensional labels, while adj does not - or how can I pass an array to text() and use the adj argument (skyblue text)? plot(-1:1,-1:1) text(c(0,0),c(0,0),c("a","b"),pos=c(1,2),col="red") text(c(0,0),c(0,0),c("a","b"),adj=cbind(c(1,2),c(1,1)),col="skyblue") Thomas
2010 Apr 23
1
help in conditional histogram
Dear Dr. Sarkar, When I try to run the codes, I found the following problem: > h<- sample(1:14, 319, rep=T) > c<- sample(1:14, 608, rep=T) > n<- sample(1:14, 1140, rep=T) > vt<-c(h, c, n) > ta<-rep(c("h", "c", "n"), c(319, 608, 1140)) > > to<-data.frame(vt,ta) > library(lattice) Attaching package: 'lattice'
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 Apr 07
2
label the bars by the percentage values in the conditional histogram?
HI, Dear R-community: I have the following codes to plot the conditional histogram, is a way to label the bars by the percentage values in the conditional histogram? h<- sample(1:14, 319, rep=T) c<- sample(1:14, 608, rep=T) n<- sample(1:14, 1140, rep=T) vt<-c(h, c, n) ta<-rep(c("h", "c", "n"), c(319, 608, 1140)) to<-data.frame(vt,ta)
2010 Apr 07
1
help in histogram
x<- sample(1:14, 319, rep=T) hist(x, freq=F, xlab='',ylab="Percent of Total", col="skyblue", labels=TRUE, right=FALSE,main="Position of Hypothetical Protein") Is there is way to round the labels to 2 decimal digits, for example, 0.088 is changed to 0.09. Thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]]
2012 Jul 28
2
low resolution word map
Hi, I'd like to have a low resolution word map in R. The "maps" package has this option, but if I use the argument, the map looses sense: Russia and Australia get empty etc library("maps") m=map(col="skyblue",fill=TRUE,plot=TRUE,resolution=10) length(m$x) If I drop the "fill=TRUE", the effect of "resolutaion=10000" is lost, ie no change. Is
2008 Dec 06
2
Barplot label
Dear all, I am trying to make barplot from matrix with "beside=FALSE". I have 165 labels in my bar plot. When i plot the label horizontally below the barplot, then all labels are not appear in the plot due to lack of space. I used the following function: barplot(t(bar), main="Barplot based on LCMS", ylab="RF membership Probability",   
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",
2009 Aug 20
1
lattice xyplot strip colors and location
Hi all, I've been trying (unsuccessfully) to modify an xyplot I created using the lattice package. I would like to change default strip colors and locations. I started with numeric data in 4 columns, which look like this: 0.25 2 1 32 0.25 2 2 30 0.25 2 3 27 0.25 2 4 23 0.25 2 5 17 0.25 3 1 30 0.25
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 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 =
2005 Mar 30
5
2d plotting and colours
Hi! I am new to R just 3 days in it and i apologize if my questions seem very trivial and consumed your valuable time. I am coding in perl and i stumbled upon R regarding plotting good statistical graphs. I tried the kmean clustering for a large matrix ,say > 150 * 150 . I tried the example code given in the tutorial to perform 2d plot # i ranges from 2 to 10 cl <- kmeans(x, i, 20)
2020 Sep 23
2
ORDEN GRÁFICO POR MESES
Hola, Estoy haciendo un gráfico con: ############################################################################# ## GRAFICO BARRAS : VALORES AL DEBE MENSUALIZADO ggplot(Diario_S2, aes(x=mes_AAA, by = MES , y=ARS_DEB))+ # ASIGNAR VARIABLES geom_bar(stat="identity", width=0.7, # ANCHO BARRAS colour="grey", fill="darkgreen", #
2000 Feb 29
0
mapping of colornames into hsv: half way done
Ok, now we have the mapping of color names to color codes (see below) and conversion to rgb (something like Ben Bolker's function), but how to convert rgb to hsv? Thanks to Brian Ripley, Peter Dalgaard and Ben Bolker Details below Regards Jens etc/colors.big maps 455 names to rgb in S syntax etc/rgb.txt maps 657 names to rgb in C syntax, but unlike colors() it has mixed upper and
2009 Jul 16
2
putting circles/buffers arround points on a 2D graph/plot
Hi, I'll try to keep my question brief and to the point, to anyone who helps 'THANK YOU!' I want to get a circle/ring/buffer or some other form of drawn line around certain points on a x,y plot, the points usually don't form a circle, often they form a 'wobbly' shape, so ideally I'd like something that follows the shape the points make. I'll start by explaining