Re: [R-es] Cambiar formato fecha

2018-09-28 Thread Javier Marcuzzi
Estimada Miriam
Le respondo corto, estoy en el celular, escriba str(los datos), su fecha
puede ser en realidad texto. Hay varias formas, lubridate, pero yo aprendí
striptime y me siento cómodo con este comando.
Javier Marcuzzi

El vie., 28 de sep. de 2018 1:20 PM,  escribió:

> Buenas tardes,
> Tengo un problema con una columna de formato fecha. Adjunto una imagen d
> cómo tengo las fechas en la columna. ¿Cómo puedo ponerlas todas en el
> mismo formato?
>
>
>
> Muchas gracias
> ___
> R-help-es mailing list
> R-help-es@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-help-es
>

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] Boxplot with linear (not categorical) x-axis

2018-09-28 Thread William Dunlap via R-help
Use the 'at' argument to boxplot.  E.g.,

> x <- rep(c(2,4,8,16), c(5,10,20,30))
> y <- seq_along(x)
> par(mfrow=c(2,1))
> boxplot(y~x, at=unique(x))
> boxplot(y~x)


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Fri, Sep 28, 2018 at 3:05 AM, Luigi Marongiu 
wrote:

> Dear all,
> I am using boxplot to draw some data. Would be possible to have the
> X-axis linear (as in a scatter plot) instead of the standard
> categorical axis?
> The data I have is subdivided into three groups at the numerical
> values 1, 3, 5; boxplot treats these as categorical values; in fact, I
> can write my own labels simply by using the values 1, 2, 3 for the
> position of the labels as in the example.
> Thank you,
>
> 
> # generate data.frames
> A = c(70, 22, 4, 21, 29, 35, 24, 20, 9, 21,
>   22, 12, 20, 21, 13, 18, 15, 3, 9, 23,
>   6, 5, 2, 24, 25, 21, 16, 0, 4, 1)
> B = c(17, 21, 70, 6, 23, 10, 8, 5, 22, 5,
>   21, 5, 19, 9, 23, 24, 11, 13, 7, 15,
>   25, 9, 13, 14, 11, 9, 12, 0, 5, 9)
> C = c(17, 8, 30, 22, 11, 32, 33, 8, 160, 11,
>   35, 7, 36, 15, 11, 25, 16, 6, 38, 19,
>   35, 30, 12, 27, 22, 32, 47, 39, 31, 26)
> X = rep(c(1, 3, 5),30*3)
> dfA <- data.frame(X, c(A, B, C))
> names(dfA) <- c("X", "Y")
> par(mfrow=c(2,1))
> boxplot(dfA$Y ~ dfA$X,
> ylim=c(0, 80),
> col="green",
> ylab="Y-values",
> xlab="X-values",
> main="usual X labels"
> )
> boxplot(dfA$Y ~ dfA$X,
> ylim=c(0, 80),
> col="green",
> ylab="Y-values",
> xlab="X-values",
> main="custom X labels",
> xaxt="n"
> )
> x.lab = c("A", "B", "C")
> x.pos = c(1, 2, 3)
> axis(side=1, at=x.pos,
>  lab=x.lab, cex.axis=1)
>
> --
> Best regards,
> Luigi
>
> __
> R-help@r-project.org 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] subset only if f.e a column is successive for more than 3 values

2018-09-28 Thread William Dunlap via R-help
Do you also want lines 38 and 39 (in addition to 40:44), or do I
misunderstand your problem?

When you deal with runs of data, think of the rle (run-length encoding)
function.  E.g. here is
a barely tested function to find runs of a given minimum length and a given
difference between
successive values.  It also returns a 'runNumber' so you can split the
result into runs.

findRuns <- function(x, minRunLength=3, difference=1) {
 # for integral x, find runs of length at least 'minRunLength'
 # with 'difference' between succesive values
 d <- diff(x)
 dRle <- rle(d)
 w <- rep(dRle$lengths>=minRunLength-1 & dRle$values==difference,
dRle$lengths)
 values <- x[c(FALSE,w) | c(w,FALSE)]
 runNumber <- cumsum(c(TRUE, diff(values)!=difference))
 data.frame(values=values, runNumber=runNumber)
}

> findRuns(c(10,8,6,4,1,2,3,20,17,18,19,20))
  values runNumber
1  1 1
2  2 1
3  3 1
4 17 2
5 18 2
6 19 2
7 20 2
> findRuns(c(10,8,6,4,1,2,3,20,17,18,19,20), minRunLength=4)
  values runNumber
1 17 1
2 18 1
3 19 1
4 20 1
> findRuns(c(10,8,6,4,1,2,3,20,17,18,19,20), difference=-2)
  values runNumber
1 10 1
2  8 1
3  6 1
4  4 1


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Thu, Sep 27, 2018 at 7:48 AM, Knut Krueger 
wrote:

> Hi to all
>
> I need a subset for values if there are f.e 3 values successive in a
> column of a Data Frame:
> Example from the subset help page:
>
> subset(airquality, Temp > 80, select = c(Ozone, Temp))
> 29 45   81
> 35 NA   84
> 36 NA   85
> 38 29   82
> 39 NA   87
> 40 71   90
> 41 39   87
> 42 NA   93
> 43 NA   92
> 44 23   82
> .
>
> I would like to get only
>
> ...
> 40 71   90
> 41 39   87
> 42 NA   93
> 43 NA   92
> 44 23   82
> 
>
> because the left column is ascending more than f.e three times without gap
>
> Any hints for a package or do I need to build a own function?
>
> Kind Regards Knut
>
> __
> R-help@r-project.org 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/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] subset only if f.e a column is successive for more than 3 values

2018-09-28 Thread Knut Krueger

Hi Jim,
thank's it is working with the given example,
but whats the difference when using

testdata=data.frame(TIME=c("17:11:20", "17:11:21", "17:11:22", 
"17:11:23", "17:11:24", "17:11:25", "17:11:26", "17:11:27", "17:11:28", 
"17:21:43",
"17:22:16", "17:22:19", "18:04:48", "18:04:49", 
"18:04:50", "18:04:51", "18:04:52", "19:50:09", "00:59:27", "00:59:28",

"00:59:29", "04:13:40", "04:13:43", "04:13:44"),

index=c(8960,8961,8962,8963,8964,8965,8966,8967,8968,9583,9616,9619,12168,12169,12170,12171,12172,18489
  ,37047,37048,37049,48700,48701,48702))

seqindx<-rle(diff(testdata$index)==1)
runsel<-seqindx$lengths >= 3 & seqindx$values
# get the indices for the starts of the runs
starts<-cumsum(seqindx$lengths)[runsel[-1]]+1
# and the ends
ends<-cumsum(seqindx$lengths)[runsel]+1

eval(parse(text=paste0("testdata[c(",paste(starts,ends,sep=":",collapse=","),"),]")))

the result (index)  is 
12168,9619,9616,9583,8968,12168,12169,12170,12171,12172



maybe the gaps between .. 8967,8968,9583,9616,9619,12168,12169 ..?

Regards Knut

__
R-help@r-project.org 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.


[R-es] Problema utilizando la función dist2isobath (marmap package) con un sistema de coordenadas proyectadas

2018-09-28 Thread Isa García Barón
Tengo un grid creado en un sistema de coordenadas proyectado (WGS84 zona
30N) y estoy intentando extraer la distancia más cercana a la costa desde
de todas las celdas del grid, asi como a otras isóbatas utilizando la
función "dist2isobath" del paquete marmap.

Para ello reproyecté los datos del ETOPO1 (batimetría oceánica) a la misma
proyección que los datos de mi grid y después he intentado utilizar la
función "dist2isobath", pero me da un error. Aparentemente sólo funciona
con coordenadas geográficos (ver el error a continuación). ¿Sabeis cómo
puedo resolverlo o si existe otra función con la que trabajar con
coordenadas proyectadas?

Aquí os paso un ejemplo de los datos y el script, asi como el error que
obtengo:

head(grid) # ejemplo de mis datos del grid

Lon Lat1 -124195.7 49866522 -120195.7 49866523 -116195.7
49866524 -112195.7 49866525 -108195.7 49866526 -104195.7 4986652

summary(etopo1) # ETOPO1 ya reproyectado y convertido a la clase "bathy"
# Bathymetric data of class 'bathy', with 1329 rows and 709 columns#
Latitudinal range: 4306614.28 to 5618264.28 (4306614.28 N to
5618264.28 N)# Longitudinal range: -550748.25 to 1203531.75 (550748.25
W to 1203171.75 E)# Cell size: 79258.1 minute(s)
# Depth statistics:# Min.  1st Qu.   Median Mean  3rd Qu.
Max. NA's# -5586.23 -4004.18   -99.56 -1392.81   244.61  2928.77
141413
# First 3 columns and rows of the bathymetric matrix:
#   4306614.27700283 4308466.88999718 4310319.50299153
# -550748.253167697   NA   NA   NA
  # -549427.259191793   NA   NA
   NA   # -548106.265215889   NA
NA   NA
##  Y aquí utilizao la función para obtener las distancias:

DistCoast <- dist2isobath(etopo1, grid[,1:2], isobath=0)
Error in .pointsToMatrix(p) : longitude < -360

Gracias por la ayuda!

-- 
*-*
*Isabel García Barón*
Email: xan...@gmail.com
PhD Student at AZTI Foundation -  AZTI Fundazioa
Marine Ecosystems Functioning
Herrera Kaia, Portualdea z/g 20110 - Pasaia (Gipuzkoa)

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


Re: [R] Boxplot with linear (not categorical) x-axis

2018-09-28 Thread Richard M. Heiberger
install.packages("HH")
library(HH)
system.file("demo/bwplot.examples.r", package="HH")
demo("bwplot.examples", package="HH", ask=FALSE)

## your example
dfA <- data.frame(X, Y=c(A, B, C))
dfA$X.factor <- factor(dfA$X)
position(dfA$X.factor) <- c(1,3,5)
bwplot(Y ~ X.factor, panel=panel.bwplot.intermediate.hh, data=dfA, xlim=c(0,6))

On Fri, Sep 28, 2018 at 6:05 AM, Luigi Marongiu
 wrote:
> Dear all,
> I am using boxplot to draw some data. Would be possible to have the
> X-axis linear (as in a scatter plot) instead of the standard
> categorical axis?
> The data I have is subdivided into three groups at the numerical
> values 1, 3, 5; boxplot treats these as categorical values; in fact, I
> can write my own labels simply by using the values 1, 2, 3 for the
> position of the labels as in the example.
> Thank you,
>
>
> # generate data.frames
> A = c(70, 22, 4, 21, 29, 35, 24, 20, 9, 21,
>   22, 12, 20, 21, 13, 18, 15, 3, 9, 23,
>   6, 5, 2, 24, 25, 21, 16, 0, 4, 1)
> B = c(17, 21, 70, 6, 23, 10, 8, 5, 22, 5,
>   21, 5, 19, 9, 23, 24, 11, 13, 7, 15,
>   25, 9, 13, 14, 11, 9, 12, 0, 5, 9)
> C = c(17, 8, 30, 22, 11, 32, 33, 8, 160, 11,
>   35, 7, 36, 15, 11, 25, 16, 6, 38, 19,
>   35, 30, 12, 27, 22, 32, 47, 39, 31, 26)
> X = rep(c(1, 3, 5),30*3)
> dfA <- data.frame(X, c(A, B, C))
> names(dfA) <- c("X", "Y")
> par(mfrow=c(2,1))
> boxplot(dfA$Y ~ dfA$X,
> ylim=c(0, 80),
> col="green",
> ylab="Y-values",
> xlab="X-values",
> main="usual X labels"
> )
> boxplot(dfA$Y ~ dfA$X,
> ylim=c(0, 80),
> col="green",
> ylab="Y-values",
> xlab="X-values",
> main="custom X labels",
> xaxt="n"
> )
> x.lab = c("A", "B", "C")
> x.pos = c(1, 2, 3)
> axis(side=1, at=x.pos,
>  lab=x.lab, cex.axis=1)
>
> --
> Best regards,
> Luigi
>
> __
> R-help@r-project.org 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.

__
R-help@r-project.org 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.


Re: [R] Boxplot: draw outliers in colours

2018-09-28 Thread Jim Lemon
Hi Luigi,
An easy way is to use "points" to overplot the outliers:

grbxp<-boxplot(dfA$Y ~ dfA$X,
 ylim=c(0, 200),
 col="green",
 ylab="Y-values",
 xlab="X-values"
 )
points(grbxp$group,grbxp$out,col="green")


On Fri, Sep 28, 2018 at 7:51 PM Luigi Marongiu  wrote:
>
> Dear all,
> I am trying to overlap two series of boxplots on the same graph. In
> order to distinguish the outliers from one series to the other, would
> be possible to colour the outliers?: instead of the standard black, is
> it possible to give a chosen colour?
> Thank you
>
> >>>
> This is the example. I could not generate not normally distributed
> random values (even with runif), so I had to create the values
> manually and they are still a bit rough (in the real thing, the two
> series are more distant), anyway this should better explain the case.
> Note that the three outliers at the bottom right belong to the 'blue'
> distribution and the upper outlier on the right belongs to the 'green'
> distribution, so making them in blue and green colours would make
> clearer their positions.
>
> # generate data.frames
> A = c(70, 22, 4, 21, 29, 35, 24, 20, 9, 21,
>   22, 12, 20, 21, 13, 18, 15, 3, 9, 23,
>   6, 5, 2, 24, 25, 21, 16, 0, 4, 1)
> B = c(17, 21, 70, 6, 23, 10, 8, 5, 22, 5,
>   21, 5, 19, 9, 23, 24, 11, 13, 7, 15,
>   25, 9, 13, 14, 11, 9, 12, 0, 5, 9)
> C = c(17, 8, 30, 22, 11, 32, 33, 8, 160, 11,
>   35, 7, 36, 15, 11, 25, 16, 6, 38, 19,
>   35, 30, 12, 27, 22, 32, 47, 39, 31, 26)
> D = c(79, 26, 8, 33, 59, 67, 60, 65, 54, 88,
>   78, 105, 59, 40, 109, 81, 28, 26, 94,
>   35, 10, 38, 58, 79, 58, 10, 5, 8, 4, 50)
> E = c(98, 104, 101, 102, 97, 97, 97,
>   100, 97, 102, 100, 103, 104,
>   104, 99, 102, 100, 97, 102, 105,
>   99, 105, 100, 102, 100, 115,
>   112, 113, 111, 115)
> G = c(105, 130, 97, 105, 113, 123,
>   149, 15, 134, 148, 98, 104,
>   113, 108, 209, 145, 138, 119,
>   142, 129, 298, 101, 136, 129,
>   148, 295, 125, 277, 107, 642)
> X = rep(c(1, 3, 5),30*3)
> dfA <- data.frame(X, c(A, B, C))
> dfB <- data.frame(X, c(D, E, G))
> names(dfA) <- c("X", "Y")
> names(dfB) <- c("X", "Y")
>
> # plot
> boxplot(dfA$Y ~ dfA$X,
> ylim=c(0, 200),
> col="green",
> ylab="Y-values",
> xlab="X-values"
> )
> par(new=TRUE)
> boxplot(dfB$Y ~ dfB$X,
> ylim=c(0, 200),
> col="blue",
> ylab="", xlab="",
> xaxt="n", yaxt="n"
> )
>
>
> --
> Best regards,
> Luigi
>
> __
> R-help@r-project.org 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.

__
R-help@r-project.org 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.


[R] Boxplot with linear (not categorical) x-axis

2018-09-28 Thread Luigi Marongiu
Dear all,
I am using boxplot to draw some data. Would be possible to have the
X-axis linear (as in a scatter plot) instead of the standard
categorical axis?
The data I have is subdivided into three groups at the numerical
values 1, 3, 5; boxplot treats these as categorical values; in fact, I
can write my own labels simply by using the values 1, 2, 3 for the
position of the labels as in the example.
Thank you,


# generate data.frames
A = c(70, 22, 4, 21, 29, 35, 24, 20, 9, 21,
  22, 12, 20, 21, 13, 18, 15, 3, 9, 23,
  6, 5, 2, 24, 25, 21, 16, 0, 4, 1)
B = c(17, 21, 70, 6, 23, 10, 8, 5, 22, 5,
  21, 5, 19, 9, 23, 24, 11, 13, 7, 15,
  25, 9, 13, 14, 11, 9, 12, 0, 5, 9)
C = c(17, 8, 30, 22, 11, 32, 33, 8, 160, 11,
  35, 7, 36, 15, 11, 25, 16, 6, 38, 19,
  35, 30, 12, 27, 22, 32, 47, 39, 31, 26)
X = rep(c(1, 3, 5),30*3)
dfA <- data.frame(X, c(A, B, C))
names(dfA) <- c("X", "Y")
par(mfrow=c(2,1))
boxplot(dfA$Y ~ dfA$X,
ylim=c(0, 80),
col="green",
ylab="Y-values",
xlab="X-values",
main="usual X labels"
)
boxplot(dfA$Y ~ dfA$X,
ylim=c(0, 80),
col="green",
ylab="Y-values",
xlab="X-values",
main="custom X labels",
xaxt="n"
)
x.lab = c("A", "B", "C")
x.pos = c(1, 2, 3)
axis(side=1, at=x.pos,
 lab=x.lab, cex.axis=1)

-- 
Best regards,
Luigi

__
R-help@r-project.org 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.


[R] Boxplot: draw outliers in colours

2018-09-28 Thread Luigi Marongiu
Dear all,
I am trying to overlap two series of boxplots on the same graph. In
order to distinguish the outliers from one series to the other, would
be possible to colour the outliers?: instead of the standard black, is
it possible to give a chosen colour?
Thank you

>>>
This is the example. I could not generate not normally distributed
random values (even with runif), so I had to create the values
manually and they are still a bit rough (in the real thing, the two
series are more distant), anyway this should better explain the case.
Note that the three outliers at the bottom right belong to the 'blue'
distribution and the upper outlier on the right belongs to the 'green'
distribution, so making them in blue and green colours would make
clearer their positions.

# generate data.frames
A = c(70, 22, 4, 21, 29, 35, 24, 20, 9, 21,
  22, 12, 20, 21, 13, 18, 15, 3, 9, 23,
  6, 5, 2, 24, 25, 21, 16, 0, 4, 1)
B = c(17, 21, 70, 6, 23, 10, 8, 5, 22, 5,
  21, 5, 19, 9, 23, 24, 11, 13, 7, 15,
  25, 9, 13, 14, 11, 9, 12, 0, 5, 9)
C = c(17, 8, 30, 22, 11, 32, 33, 8, 160, 11,
  35, 7, 36, 15, 11, 25, 16, 6, 38, 19,
  35, 30, 12, 27, 22, 32, 47, 39, 31, 26)
D = c(79, 26, 8, 33, 59, 67, 60, 65, 54, 88,
  78, 105, 59, 40, 109, 81, 28, 26, 94,
  35, 10, 38, 58, 79, 58, 10, 5, 8, 4, 50)
E = c(98, 104, 101, 102, 97, 97, 97,
  100, 97, 102, 100, 103, 104,
  104, 99, 102, 100, 97, 102, 105,
  99, 105, 100, 102, 100, 115,
  112, 113, 111, 115)
G = c(105, 130, 97, 105, 113, 123,
  149, 15, 134, 148, 98, 104,
  113, 108, 209, 145, 138, 119,
  142, 129, 298, 101, 136, 129,
  148, 295, 125, 277, 107, 642)
X = rep(c(1, 3, 5),30*3)
dfA <- data.frame(X, c(A, B, C))
dfB <- data.frame(X, c(D, E, G))
names(dfA) <- c("X", "Y")
names(dfB) <- c("X", "Y")

# plot
boxplot(dfA$Y ~ dfA$X,
ylim=c(0, 200),
col="green",
ylab="Y-values",
xlab="X-values"
)
par(new=TRUE)
boxplot(dfB$Y ~ dfB$X,
ylim=c(0, 200),
col="blue",
ylab="", xlab="",
xaxt="n", yaxt="n"
)


-- 
Best regards,
Luigi

__
R-help@r-project.org 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.


Re: [R] Access function as text from package by name

2018-09-28 Thread Deepayan Sarkar
On Fri, Sep 28, 2018 at 2:16 PM Bert Gunter  wrote:
>
> Do you mean:
> ?get

Doesn't work with :: etc:

> get("graphics::box")
Error in get("graphics::box") : object 'graphics::box' not found

I think parse()+eval() is pretty much unavoidable. After that, it's a
choice between deparse() and print()+capture.output().

-Deepayan


> On Thu, Sep 27, 2018, 11:44 PM Sigbert Klinke 
> wrote:
>
> > Hi,
> >
> > I guess I was not clear enough: the name of the function is stored as
> > string. Solutions which use the object directly do not help unfortunately.
> >
> > Thanks Sigbert
> >
> > Am 27.09.2018 um 12:30 schrieb Sigbert Klinke:
> > > Hi,
> > >
> > > I want to have a function, e.g. graphics::box, as text.
> > > Currently I'am using
> > >
> > > deparse(eval(parse(text='graphics::box')))
> > >
> > > It is important that '::' and ':::' can be used in the name.
> > >
> > > Is there a simpler way?
> > >
> > > Thanks
> > >
> > > Sigbert
> > >
> > >
> > >
> > > __
> > > R-help@r-project.org 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.
> > >
> >
> >
> > --
> > https://hu.berlin/sk
> > https://hu.berlin/mmstat3
> >
> > __
> > R-help@r-project.org 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.
> >
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org 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.

__
R-help@r-project.org 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.


Re: [R] Access function as text from package by name

2018-09-28 Thread Bert Gunter
Do you mean:
?get



On Thu, Sep 27, 2018, 11:44 PM Sigbert Klinke 
wrote:

> Hi,
>
> I guess I was not clear enough: the name of the function is stored as
> string. Solutions which use the object directly do not help unfortunately.
>
> Thanks Sigbert
>
> Am 27.09.2018 um 12:30 schrieb Sigbert Klinke:
> > Hi,
> >
> > I want to have a function, e.g. graphics::box, as text.
> > Currently I'am using
> >
> > deparse(eval(parse(text='graphics::box')))
> >
> > It is important that '::' and ':::' can be used in the name.
> >
> > Is there a simpler way?
> >
> > Thanks
> >
> > Sigbert
> >
> >
> >
> > __
> > R-help@r-project.org 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.
> >
>
>
> --
> https://hu.berlin/sk
> https://hu.berlin/mmstat3
>
> __
> R-help@r-project.org 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] Access function as text from package by name

2018-09-28 Thread Sigbert Klinke

Hi,

I guess I was not clear enough: the name of the function is stored as 
string. Solutions which use the object directly do not help unfortunately.


Thanks Sigbert

Am 27.09.2018 um 12:30 schrieb Sigbert Klinke:

Hi,

I want to have a function, e.g. graphics::box, as text.
Currently I'am using

deparse(eval(parse(text='graphics::box')))

It is important that '::' and ':::' can be used in the name.

Is there a simpler way?

Thanks

Sigbert



__
R-help@r-project.org 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.




--
https://hu.berlin/sk
https://hu.berlin/mmstat3

__
R-help@r-project.org 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.