hi
thank you all for the great replies, very useful indeed even if some of them
a bit too aggressive (which is never, ever a good approach in my very humble
opinion... but that's a matter of taste and style I do not want to discuss
here); sorry again for bothering someone with such a trivial and
i
sorry but honestly I do not get your point
I need to shift to left by one position (i.e. one column) the entire rows
2,4,5 of "df_start" so that to obtain as final result the structure
indicated in "df_end"
I know in advance the rows that I need to shift
hope it clears a bit, now
--
View thi
Hi
thank you for your reply: it's a neat solution but unfortunately not
applicable to my specific case;
in fact as I specified in my first post (I may have been not enough clear,
sorry for that!) I can not rely on any search method grep-like because the
value "xxx" in the rows of "df_start" can b
this is my reproducible example
setwd(".")
dir.create("./my dir with space")
dir.create("./my dir with space/my sub dir with space")
file.create("./my dir with space/my dir file with space.txt")
file.create("./my dir with space/my sub dir with space/my sub dir file with
space.txt")
now I need to
I must say I'm pretty new to Linux Debian and R so I might miss here
reporting some relevant information (just in case, sorry for that!); I've
been looking around the web and also onto this mailing list - and indeed
this topic has been already covered-, but still I can't find any useful
solution to
thanks david
very humbly I'm asking you and all r-help users to forgive me about
violating the rules of this great mailing list, I didn't meant to do that: I
simply slipped into that, sorry again!
...and what about the case of many variables to be changed at the same time?
seriously, I do not wan
Thanks it's the same thread I've been looking at
But it's not answering to my questions…
--
View this message in context:
http://r.789695.n4.nabble.com/decimal-separator-from-comma-to-dot-tp4673414p4673433.html
Sent from the R help mailing list archive at Nabble.com.
_
This is my reproducible example
df<-structure(list(IDANT = c(37837L, 37838L, 37839L, 37840L, 37841L,
37842L, 37843L, 40720L, 40721L, 40722L), N_TX = c(6L, 6L, 6L,
4L, 1L, 1L, 1L, 2L, 2L, 1L), TILT = c(0L, 0L, 0L, 0L, 6L, 6L,
6L, 0L, 0L, 0L), DIREZIONE = c(50L, 220L, 110L, 50L, 220L, 110L,
50L,
hi duncan, thanks a lot for your help!
yes, your solution is working fine with a little tweaking of the vector
"poscec" : but on the other hand it's just affecting the relative
position of labels around respective points;
to get more flexibility would be probably better to supply (even if I
do
This is my reproducible example
tv.ms<-structure(list(inq = structure(4:17, .Label = c("D4", "D5", "D6a",
"D6b", "D6c", "D7", "D8", "F4", "F5a", "F5b", "F6a", "F6b", "F6c",
"F6d", "F7a", "F7b", "F8"), class = "factor"), tv.km.median.iteq =
c(0.324,
0.238, 0.24000
sorry again, there is something more to consider...
in case I need to plot x axis in logarithmic scale the above solution is not
working:
so now my further question is how to do that when I set
scales=list(x=list(log=TRUE))
I've been trying to simplify my original example to the bare bone (for s
sorry, I've managed to find a (partial) solution to my problem (even not much
elegant);
now what is left out is the proper tweaking of labels...
any better solutions?
dotplot(variety ~ yield | site, data = barley,
layout = c(1,6),
index.cond= function(x,y){median(x)},
pan
By considering this reproducible example
#start code
library(lattice)
dotplot(variety ~ yield | site, data = barley,
layout = c(1,6),
index.cond= function(x,y){median(x)},
panel = function(x,y,...) {
panel.dotplot(x,y,...)
median.values <- median(x)
Given this example
library(plotrix)
a<-c(34,10,70)
b<-c(33,10,20)
c<-c(33,80,10)
test<-data.frame(A=a,B=b,C=c)
triax.plot(test,
main ="title",
at=seq(0.25,0.75,by=0.25),
tick.labels=list(l=seq(0.25,0.75,by=0.25),
r=seq(0.25,0.75,by=0.
thank you all for the great help, in particular to dennis murphy
in order to close the thread I'm posting here the final solution to my
question
new.ex<-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.007,
0.21, 0.077, 0.01, 0.033, 0.05, 0.014),
Given my reproducible example:
new.ex<-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.007,
0.21, 0.077, 0.01, 0.033, 0.05, 0.014), LR = c(FALSE, FALSE,
TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE
), group = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
2L, 2
Ok, this is my finally (hopefully) clean session
my.ex<-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.0072), LR =
c(FALSE, FALSE, TRUE, FALSE, TRUE, FALSE)), .Names = c("TEC","LR"),
row.names = c(NA, -6L), class = "data.frame")
library("NADA")
xx<-with(my.ex,
cenfit(TEC,LR)
sorry sarah
you are right, my fault, this is the correct reproducible example
(a misinterpretation of LR type occurred in previous reproducible example)
my.ex<-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.0072
), LR = c(FALSE, FALSE, TRUE, FALSE, TRUE, FALSE)), .Names = c("TEC",
"LR
I want to get access to the code of an S4 method in order to possibly modify
a function to accomplish my particular needs: in my case the function in is
cenfit() from the package NADA
Now, given my reproducible example:
my.ex<-structure(list(TEC = c(0.21, 0.077, 0.06, 0.033, 0.014, 0.0072), LR =
sorry for my slow reply, this is what I worked out so far…
my reproducible example and the code
test<-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L,
3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L
my reproducible example
test<-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L,
3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L), .Label = c("A",
"B",
here it is, I think (I hope) I'm getting a little closer with this, but
still there is something to sort out...
error using packet 1
unused argument(s) (coef =1.5, do.out=TRUE)
by reading the help for panel.bwplot at the argument "stats" it says: "the
function must accept arguments coef and d
Given my reproducible example
test<-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L,
3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L), .Label = c("A",
given this example
library(corrgram)
corrgram(mtcars[2:6], order=TRUE, upper.panel=panel.conf,
lower.panel=panel.pie,
diag.panel=panel.minmax,
text.panel=panel.txt)
how can I change the variable names in main diagonal?
(so that I can put more informative names
thanks a lot deepayan,
I will study carefully your code!
thanks
max
--
View this message in context:
http://r.789695.n4.nabble.com/Reordering-levels-of-a-factor-within-a-lattice-dotplot-tp4634201p4634277.html
Sent from the R help mailing list archive at Nabble.com.
__
thanks for your reply but I don't think your solution can accomplish to what
I need...
(I can't see any ordering of the variable "sample" with reference to the
variable "obs")
please keep in mind that for a numer of reasons that I do not mention here
for the sake of conciseness in my case the vari
Given my reproducible example
myexample<-structure(list(site = structure(c(4L, 2L, 2L, 4L, 2L, 4L, 4L,
3L, 1L, 3L, 1L, 1L, 3L, 4L, 5L, 2L), .Label = c("A", "B", "C",
"D", "E"), class = "factor"), obs = c(0.302, 0.956, 0.72, 1.21,
0.887, 0.728, 1.294, 20.493, 0.902, 0.031, 0.468, 2.318, 4.795,
Thanks a lot, Deepayan!
What a great honour hearing from you inside this thread!
Now, at last, I understand where MY problem was
(but please, don’t laugh – too loudly at least – and, first of all, sorry
for that!)
this was my “poor” wrong attempt (but I did not post this)
means<-mean(exp(x))
p
sorry but I can't close this thread with a viable solution other than the
following one
(i.e. by defining an user function to add line);
I understand that the problem is related to the fact that:
mean(log(.)) != log(mean(.)) is
but for some reason I can't put all that in practice inside the
pan
thanks david,
yes, you are right PART of the confusion is because of what you mentioned
(sorry for that) but going back to my own data this is JUST PART of the
problem…
...see my reproducible example
teq<-structure(list(site = structure(c(4L, 2L, 2L, 4L, 2L, 4L, 4L,
3L, 1L, 3L, 1L, 1L, 3L, 4L, 5
a new session of R with the following sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Italian_Italy.1252 LC_CTYPE=Italian_Italy.1252
[3] LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C
[5] LC_TIME=Italian_Italy.1252
thanks kimmo
I managed to get the desired result by first plotting the medians and then
adding the means through the user defind function posted in thread you
mentioned (here it is
http://r.789695.n4.nabble.com/Adding-mean-line-to-a-lattice-density-plot-td4455770.html#a4456502)
# start
dotplot(v
...and what if I need to plot another vertical line for showing also the
means for each panel?
by simply adding another call to panel.abline () seems not producing a
correct result for each panel
# medians and means for each panel:
dotplot(variety ~ yield | site, data = barley,
scales=list(
thanks ilai
sorry, I mixed up a little: I was thinking to medians of each panel but
instead I was trying to plot medians for each variety (what an awful chart,
indeed!)
thanks for your solution (medians for each panel), it works perfectly, as
usual...
cheers
max
--
View this message in context
by considering this example from barley dataset
#code start
dotplot(variety ~ yield | site, data = barley,
scales=list(x=list(log=TRUE)),
layout = c(1,6),
panel = function(...) {
panel.dotplot(...)
#median.values <- tapply(x, y, median)# medians
//www.jstor.org/discover/10.2307/2685616?uid=3738296&uid=2129&uid=2&uid=70&uid=4&sid=47699045750617
Any of you have faced the same type of issues? Or am I completely wrong?
maxbre
--
View this message in context:
http://r.789695.n4.nabble.com/Wilcoxon-Mann-Whitney-U-value-out
011)
> http://www.jstatsoft.org/v39/i11
>
> R's ks functions are a port of Marsaglia et al. to the .C interface.
>
> Rui Barradas
>
> maxbre wrote
> thanks rui
>
> that's what I was looking for
>
> I have another related question:
> -
ation that depends on the range of x values not necessarly coincident
in the two different approaches
...any thought about this?
maxbre
--
View this message in context:
http://r.789695.n4.nabble.com/Kolmogorov-Smirnov-test-and-the-plot-of-max-distance-between-two-ecdf-curves-tp4631437p4631564
Hi all,
given this example
#start
a<-c(0,70,50,100,70,650,1300,6900,1780,4930,1120,700,190,940,
760,100,300,36270,5610,249680,1760,4040,164890,17230,75140,1870,22380,5890,2430)
length(a)
b<-c(0,0,10,30,50,440,1000,140,70,90,60,60,20,90,180,30,90,
3220,490,20790,290,740,5350,940,
Given this example
a<-c(0,70,50,100,70,650,1300,6900,1780,4930,1120,700,190,940,
760,100,300,36270,5610,249680,1760,4040,164890,17230,75140,1870,22380,5890,2430)
b<-c(0,0,10,30,50,440,1000,140,70,90,60,60,20,90,180,30,90,
3220,490,20790,290,740,5350,940,3910,0,640,850,260)
out<-ks.tes
thank you all for the high level contributions and the very helpful
feedback;
I think I have now enogh material to study for months: what a good lesson
learned!
cheers
max
--
View this message in context:
http://r.789695.n4.nabble.com/Dotchart-showing-mean-and-median-by-group-tp4619597p46235
hi all
I have another question reated to the dotchart: is it possible by means of
par() to set a logaritmic scale?
If yes, how ? and if not, any alternative solution?
thanks
--
View this message in context:
http://r.789695.n4.nabble.com/Dotchart-showing-mean-and-median-by-group-tp4619597p46226
Given this example
mean.values<-colMeans(VADeaths)
mean.values<-apply(VADeaths, 2, mean)
median.values<-apply(VADeaths, 2, median)
dotchart(VADeaths, gdata=mean.values)
dotchart(VADeaths, gdata=median.values)
is it possible to “combine” a single dotchart showing both the mean and the
median for
thanks ilai
that's exactly what I was looking for!
in fact, I've been in trouble with:
- the assignment of mean values to each factor (which is correctly sorted
out by mean.values[x] as your example clearly show up)
- and also with the position of mean values along x axis (because that "x +
(gro
Given the following example
library(lattice)
attach(barley)
After a long meandering around the web I managed to get a side by side
boxplots through:
bwplot(yield ~ site, data = barley, groups=year,
pch = "|", box.width = 1/3,
auto.key = list(points = FALSE, rectangles = TRUE, spac
ok this is these are the final results: by relation free vs sliced vs scale
component function
relation free
http://r.789695.n4.nabble.com/file/n4551068/relation_free.png
relation sliced
http://r.789695.n4.nabble.com/file/n4551068/relation_sliced.png
scale component function
http://r.789695.n4
Oh yes, I see now the problem...
thank you
max
--
View this message in context:
http://r.789695.n4.nabble.com/xyplot-lattice-fine-control-of-axes-limits-and-thick-marks-with-log-scale-tp4511897p4549180.html
Sent from the R help mailing list archive at Nabble.com.
___
hi, I just realised I want to go a little further in the control of the chart
appearance and I would like to have the same number of ticks displayed in
both axes of all panels
given this code
xyplot(tv ~ ms | sub_family, data=tm,
#as.table=TRUE,
aspect="xy",
xlab = expres
yes elai, that's what I want!
thank you for support
maxbre
--
View this message in context:
http://r.789695.n4.nabble.com/xyplot-lattice-fine-control-of-axes-limits-and-thick-marks-with-log-scale-tp4511897p4518205.html
Sent from the R help mailing list archive at Nabbl
Elai
Ok, this is my reproducible example
tm<-structure(list(name_short = structure(1:29, .Label = c("D4",
"D5", "D6a", "D6b", "D6c", "D7", "D8", "F4", "F5a", "F5b", "F6a",
"F6b", "F6c", "F6d", "F7a", "F7b", "F8", "P105", "P114", "P118",
"P123", "P126", "P156", "P157", "P167", "P169", "P189", "
After a long and winding road (sorry but I'm a novice) I get to a final
result which is quite close to what I need;
nevertheless I would like to tweak a little further the xyplot so that I can
get ***for each single panel defined by variable z*** a finer control over:
-the x and y the limits: I wo
Given the following chart: i.e. a boxplot with a grid
boxplot(x~y)
grid(nx=NA,ny=NULL)
my question: how to avoid the overlapping of boxes (and whiskers) by grid
lines?
thank you for any help pointing me in the right direction
max
--
View this message in context:
http://r.789695.n4.nabble.c
thank you for your reply
I'll study and test your code (which is a bit obscure to me up to now);
by the way do you think that "merge_all" is a wrong way to hit?
thanks again
m
--
View this message in context:
http://r.789695.n4.nabble.com/merge-multiple-data-frames-tp4331089p4331830.html
Sent fr
This is my reproducible example (three data frames: a, b, c)
a<-structure(list(date = structure(1:6, .Label = c("2012-01-03",
"2012-01-04", "2012-01-05", "2012-01-06", "2012-01-07", "2012-01-08",
"2012-01-09", "2012-01-10", "2012-01-11", "2012-01-12", "2012-01-13",
"2012-01-14", "2012-01-15", "
here is an alternative long and winded solution to the problem sticking on
the julian function of chron package
test$year <- as.integer(as.character(test$date, "%Y"))
test$month <- as.integer(as.character(test$date, "%m"))
test$day <- as.integer(as.character(test$date, "%d"))
test$hour <- as.integ
sorry, I managed to find the solution at last
(by reading the help but sometime is really difficult!)
Class "POSIXlt" is a named list of vectors representing
yday
0–365: day of the year.
another lesson learned
bye
--
View this message in context:
http://r.789695.n4.nabble.com/julian-day-for
yes, you are perfectly right, sorry for that but for me was not so clear the
error message!
and the third code example I posted (not working either) should be of
length one (if I'm not wrong again)
but most of all what is not included in my reproducible example and get a
bit confused my ques
hello all,
this is my reproducible example data frame
test<-structure(list(date = structure(c(1262300400, 1262304000, 1262304000,
1262307600, 1262307600, 1262311200, 1262311200, 1262314800, 1262314800,
1262318400, 1262318400, 1262322000, 1262322000, 1262325600, 1262325600,
1262329200, 12623292
thank you to both you, this is exactly the solution I was looking for
max
--
View this message in context:
http://r.789695.n4.nabble.com/reshape-data-from-long-to-wide-format-tp3801381p3803759.html
Sent from the R help mailing list archive at Nabble.com.
This is my reproducible example:
example<-structure(list(SENSOR = structure(1:6, .Label = c("A", "B", "C",
"D", "E", "F"), class = "factor"), VALUE = c(270, 292.5, 0, 45,
247.5, 315), DATE = structure(1:6, .Label = c(" 01/01/2010 1",
" 01/01/2010 2", " 01/01/2010 3", " 01/01/2010 4", " 01/01/20
there is another big problem I did not realised earlier;
the labelling of point is not correct: the labels appears to be recycled the
same for all panels, why?
and this time I'm quite sure I've been reading the hlp file (as much as I
understand)
thanks
--
View this message in context:
http://r.7
ok thanks again for your reply: this is what I worked out so far
#start code
xyplot(ped.avg ~ tv.avg | family,
data=mydata,
strip=strip.custom(bg='white'), col.line=1, main="title",
xlab = expression(paste('tv [ fg/', m^3, ' ]', sep = '')),
r of
points); I think this could be accomplished by "arrows" but the following
line is giving me an error
panel.arrows(x=tv.avg-tv.erst, y=ped.avg-ped.erst, x1=tv.avg+tv.erst,
y1=ped.avg+ped.erst, angle=90, code=3)
thanks again for your great help in bootstrapping me to the lattice features
m
)
obviously there is something wrong in the resulting chart and therefore
these are my questions:
1- how to draw a diagonal lines in each of the panels without “deleting”
points? (in my example the use of panel.abline is somehow getting rid of the
points)
2- how to lab
64 matches
Mail list logo