Respected sir/madam
can you please suggest what is an unexpected symbol in the below code for
running a multinomial logistic regression
model <- multinom(adoption ~ age + education + HH size + landholding +
Farmincome + nonfarmincome + creditaccesibility + LHI, data=newdata)
Hi John,
Only the particular users getting error john. Please help me
On Mon, 10 Aug 2020, 11:43 pm Raj kapoor, wrote:
> Hi John,
>
> I have 10 user in the instance, 9 user is working and access the R studio
> app, but while access the 10th user it's getting stack usage
Hi John,
I have 10 user in the instance, 9 user is working and access the R studio
app, but while access the 10th user it's getting stack usage limit issues,
then we create the new users its working fine.
On Mon, 10 Aug 2020, 10:21 pm John Harrold,
wrote:
> Hello Raj,
>
> I've gotten
Hi Team,
I have one production instance in aws, in CentoOs linux environment, i have
5 user to access the instance for using RStudio, In case R-studio working 4
users running good, while we access 5th users its getting error,
First issue : C stack usage 7970372 is too close to the limit
Second
hello Team R,
i have been using R for statistical analysis of phylogeny and i have
installed the required packages phangorn and phytools but whenever i give
the command "pml.fit" the program stops and it appears thatb r for windows
GUI has stopped etc..
previously i thought it was a fault in my
hello Team R,
i have been using R for statistical analysis of phylogeny and i have
installed the required packages phangorn and phytools but whenever i give
the command "pml.fit" the program stops and it appears thatb r for windows
GUI has stopped etc..
previously i thought it was a fault in my
hello Team R,
i have been using R for statistical analysis of phylogeny and i have
installed the required packages phangorn and phytools but whenever i give
the command "pml.fit" the program stops and it appears thatb r for windows
GUI has stopped etc..
previously i thought it was a fault in my
Hi,
I have a multidimensional data-set( multiple 'x' variables with a target
variable). I want to take it to a higher dimensional space so that I can
apply classification technique with ease . Is there a package in R which
would allow me to take these data points from lower dimensional space to
I want to replace column c3 with values from column c2 whenever values
of column Id are 2. In stata I could use replace c3 = c2 if id ==2.
How could I do that in R?
Thanks
Sample data found below:
dput(df4)
structure(list(c2 = c(42L, 42L, 47L, 47L, 55L, 55L, 36L, 36L,
61L, 61L), c3 = c(68L,
I have a measurement that was taken in 15 minutes or more and want to
aggregate it by hour. How could I do that?
Sample data is found below
date_time concentration
26/11/2013 15:46 529.25
26/11/2013 16:03 1596
26/11/2013 16:23 1027.111
26/11/2013 16:39 1001.9
26/11/2013 16:54 -80.25
26/11/2013
I want to rename columns 1 to 6 in the sample data set as bp_1 to
bp_6. How could I do that in R?
Thanks
dput(dff)
structure(list(one = c(1.00027378507871, 0.982313483915127, 1.1531279945243,
1.07400410677618, 1.22710472279261, 1.19762271047046, 1.10904859685147,
1.32060232717317), two =
Dear R Community,
I wish to create 5 preceding dates from the date variable by ID. How
could I create such dates? The code should consider leap year.
Thanks
Sample data follows:
structure(list(id = 1:12, date = structure(c(9L, 6L, 11L, 8L,
7L, 5L, 4L, 3L, 12L, 1L, 10L, 2L), .Label =
A solution on the link below provides the steps of updating R without
losing packages in Unix.
http://zvfak.blogspot.se/2012/06/updating-r-but-keeping-your-installed.html
How could I do that on windows 7 platform?
Thanks
__
R-help@r-project.org
How can I merge data frame df and tem shown below by filling the
head of tem with missing values?
a- rnorm(1825, 20)
b- rnorm(1825, 30)
date-seq(as.Date(2000/1/1), by = day, length.out = 1825)
df-data.frame(date,a,b)
tem- rpois(1095, lambda=21)
Thanks
I want to sum columns based on their names. As an exampel how could I
sum columns which contain 6574, 7584 and 85 as column names? In
addition, how could I sum those which contain 6574, 7584 and 85 in
ther names and have a prefix f. My data contains several variables
with
I want to sum columns
I want to generate a sequence of date based on a group id(similar IDs
should have same date). The id variable contains unequal observations
and the length of the data set also varies. How could I create a
sequence that starts on specific date (say January 1, 2000 onwards)
and continues until the
Dear R users,
I have a data with month and year columns which are both characters
and wanted to create a new column like Jan-1999
with the following code. The result is all NA for the month part. What
is wrong with the and what is the right way to combine the two?
ddf$MonthDay -
if you could suggest a working solution
Thanks
On 23 September 2014 18:03, Marc Schwartz marc_schwa...@me.com wrote:
On Sep 23, 2014, at 10:41 AM, Kuma Raj pollar...@gmail.com wrote:
Dear R users,
I have a data with month and year columns which are both characters
and wanted to create a new
I have a data frame with some extreme values which I wish to identify
and repeat an analysis without these extreme values. How could I
identify several columns with values which are 5 times higher than the
99th percentile?
Sample data is pasted below.
dput(df)
structure(list(ad1 = c(98, 6.9,
I have several lme objects like the ones shown below and I wish to
combine the coefficients and confidence intervals of fixed effects of
several models. Is there a function that could do that job?
m1 - lme(mark1 ~ pm10 + temp + + age + gender + bmi + statin
+ smoke + dow + season
This post has NOT been accepted by the mailing list yet.
I would like to subset a column based on the contents of a column with
specific character. In the sample data I wish to do the following:
First keep the data based on column prog if prog contains ca, and
secondly to drop if race contains ic
I have asked this question on SO, but it attracted no response, thus I am
cross- posting it here with the hope that someone would help.
I want to estimate the effect of pm10 and o3 on three outcome(death, cvd
and resp). What I want to do is run one model for each of the main
predictors (pm10
') +
Lag(%s,0:6), o, v)
gam(as.formula(f),family=quasipoisson,na.action=na.omit,data=df)
})})
m1 - unlist(m1, recursive = FALSE)
m1
Hope this helps,
Rui Barradas
Em 12-11-2013 09:53, Kuma Raj escreveu:
I have asked this question on SO, but it attracted no response, thus I am
, `[[`, 'p.table')
Hope this helps,
Rui Barradas
Em 12-11-2013 13:28, Kuma Raj escreveu:
Thanks for the script which works perfectly. I am interested to do
model checking and also interested to extract the coefficients for
linear and spline terms. For model checkup I could run this script
which
I have a matrix names test which I want to convert to a data frame. When I
use a command test2-as.data.frame(test) it is executed without a problem.
But when I want to browse the content I receive an error message Error in
data.frame(outcome = c(cardva, respir, cereb, neoplasm, :
duplicate
Hasselman b...@xs4all.nl wrote:
On 08-11-2013, at 10:40, Kuma Raj pollar...@gmail.com wrote:
I have a matrix names test which I want to convert to a data frame. When
I
use a command test2-as.data.frame(test) it is executed without a
problem.
But when I want to browse the content I
I want to estimate the effect of several independent variables on several
dependent
variables. In the example below I wanted to estimate the
effect of three independent variables on ozone and temperature. My aim is
to create a list of dependent and independent variables and automate the
process
Can I atleast get help with what pacakge to use for logistic
regression with all possible models and do prediction. I know i can
use regsubsets but i am not sure if it has any prediction functions to
go with it.
Thanks
On Oct 25, 6:54 pm, RAJ dheerajathr...@gmail.com wrote:
Hello,
I am pretty
Hello,
I am pretty new to R, I have always used SAS and SAS products. My
target variable is binary ('Y' and 'N') and i have about 14 predictor
variables. My goal is to compare different variable selection methods
like Forward, Backward, All possible subsests. I am using
misclassification rate to
Hi Laura and R users,
I would like to know whether we can do siginificance test between Column Yes
and Column No.
Any one tried? I have seen it in Tabulaiton software packages from our
vendors and in SPSS Custom Table.
Thanks,
On Wed, Mar 2, 2011 at 7:43 PM, Laura Clasemann
You're right. It's necessary for xyplot though to prevent grouping.
On Mar 20, 2010 10:43 AM, Dieter Menne dieter.me...@menne-biomed.de
wrote:
Sundar Dorai-Raj-2 wrote:
Or perhaps more clearly,
histogram(~a1 + b1 + c1, data = aa, o...
Why outer=TRUE? Looks same for me without:
Dieter
Or perhaps more clearly,
histogram(~a1 + b1 + c1, data = aa, outer = TRUE)
--sundar
On Fri, Mar 19, 2010 at 3:50 PM, Gabor Grothendieck ggrothendi...@gmail.com
wrote:
Try this:
histogram(~ values | ind, stack(aa))
On Fri, Mar 19, 2010 at 5:44 PM, Santosh santosh2...@gmail.com wrote:
Here it is.
https://svn.r-project.org/R/trunk/src/nmath/pt.c
--sundar
On Tue, Mar 9, 2010 at 4:24 AM, Ravi Kulkarni ravi.k...@gmail.com wrote:
I have tried looking for the source code for the pt() function in
https://svn.r-project.org/R/trunk/src/library/stats/
and am unable to find
Thanks, Berwin. That works just great!
--sundar
On Tue, Mar 2, 2010 at 12:57 AM, Berwin A Turlach
ber...@maths.uwa.edu.auwrote:
G'day Sundar,
On Mon, 1 Mar 2010 23:46:55 -0800
Sundar Dorai-Raj sdorai...@gmail.com wrote:
Thanks for the input, but I don't want try in the Sweave output. I
What I ended up using was:
cat(unclass(tmp))
--sundar
On Tue, Mar 2, 2010 at 8:58 AM, Berwin A Turlach ber...@maths.uwa.edu.auwrote:
G'day Sundar,
On Tue, 2 Mar 2010 01:03:54 -0800
Sundar Dorai-Raj sdorai...@gmail.com wrote:
Thanks, Berwin. That works just great!
You are welcome.
I
Hi,
I'm writing a manual using Sweave and I want to be able to print errors from
bad code. Here's an example:
Function-4a=
MySqrt - function(x) {
if (missing(x)) {
stop('x' is missing with no default)
}
if (!is.numeric(x)) {
stop('x' should only be numeric)
}
if (x 0) {
Thanks for the input, but I don't want try in the Sweave output. I want
the output to look just like it does in the console, as if an uncaptured
error really did occur.
--sundar
On Mon, Mar 1, 2010 at 11:42 PM, Sharpie ch...@sharpsteen.net wrote:
Sundar Dorai-Raj-2 wrote:
Hi,
I'm
Try googling latticeExtra x.same for some examples. Here's one:
http://www.mail-archive.com/r-help@r-project.org/msg39048.html
On Wed, Jan 20, 2010 at 9:44 AM, George Chen glc...@stanford.edu wrote:
Hello,
I would like to juxtapose two lattice graphs with common X axes such that
the X axes
Use a list instead of assign then do.call(rbind, thelist).
import.files - c(a.txt, b.txt, c.txt, d.txt, e.txt)
imp - vector(list, length(import.files))
for (i in 1:length(import.files)) {
imp[[i]] - read.delim(import.files[i], sep = , header = TRUE)
}
combined - do.call(rbind, imp)
HTH,
Is texi2dvi in your PATH? What happens if you open a CMD window and
type texi2dvi at the prompt?
--sundar
On Thu, Nov 26, 2009 at 6:14 AM, Wolfgang Raffelsberger wr...@igbmc.fr wrote:
Dear all,
I can't get texi2dvi working right. Basically I'd like to convert a .lex to
.pdf without having to
It's hard to read your code, so I won't comment on your specific
example. So when all else fails read the documentation for
?summary.aov:
They have columns ‘Df’, ‘Sum Sq’, ‘Mean
Sq’, as well as ‘F value’ and ‘Pr(F)’ if there are non-zero
residual degrees of freedom.
So if you do
ylim = c(0, max(log10(D10$Part.P)))
Make sure you remove any 0s or NAs before computing the max though.
--sundar
On Fri, Nov 20, 2009 at 6:12 AM, helene frigstad
helenefrigs...@hotmail.com wrote:
Hi,
is there any way to set the ylim range from zero to whatever is the max
value in that
Works for me:
x -
read.csv(url(http://dc170.4shared.com/download/153147281/a5c78386/Testvcomp10.csv?tsid=20091116-075223-c3093ab0;))
names(x)
x[2:13] - lapply(x[2:13], factor)
levels(x$P1L55)
[1] 0 1
is.factor(x$P1L96)
[1] TRUE
sessionInfo()
R version 2.10.0 (2009-10-26)
,
because the same thing's worked for me too before but won't do now.
I tried to reinstall it (base), but R says its there already which I
expected it to be anyway.
I don't quite know where the issue is. Very odd.
--On 16 November 2009 04:59 -0800 Sundar Dorai-Raj sdorai...@gmail.com
wrote
Did you make the changes before or after starting the device:
library(lattice)
## before doesn't change the settings on the device:
trellis.par.set(plot.symbol = list(col = red))
trellis.device(pdf, file = tmp.pdf)
xyplot(1 ~ 1)
dev.off()
## after does
trellis.device(pdf, file = tmp.pdf)
you must have missing values in data. Try
tapply(data, group, mean, na.rm = TRUE)
If that's not the case, read the bottom of this email about the posting guide.
HTH,
--sundar
On Tue, Nov 3, 2009 at 5:28 AM, FMH kagba2...@yahoo.com wrote:
Hi,
I tried to use tapply function to find the mean
?%in% says x and table must be vectors. You supplied
data.frames. So %in% is coercing your today.sequence to a vector using
as.character(today.sequence)
Perhaps you should paste the columns together first:
x - do.call(paste, c(sequence, sep = ::))
table - do.call(paste, c(today.sequence, sep =
Based solely on what you told us, this can be done using eval(parse(text=...))
cmd - sprintf(mean(%s), script)
eval(parse(text = cmd))
However, with more context, there may be a better solution. See, for example,
install.packages(fortunes)
library(fortunes)
fortune(parse())
HTH,
--sundar
On
Check to see if you have an old workspace being loaded. You might have an
object called 'family' which you might need to remove.
--sundar
On Oct 11, 2009 12:15 PM, romunov romu...@gmail.com wrote:
Thank you Jorge and Barry for your input.
I've fiddled around a bit and as a result, am even more
Another possibility is a very large .RData file in the directory where
you're starting R. You can try
Rgui --no-restore
(I don't have windows, so I'm not sure if this an option with RGui,
though I know it is with R.)
--sundar
On Fri, Oct 2, 2009 at 8:50 AM, Gabor Grothendieck
Try ?file.exists.
if (file.exists(fxxx)) {
read.table(fxxx)
} else {
cat(\, fxxx, \ is missing\n, sep = )
}
HTH,
--sundar
On Sun, Sep 20, 2009 at 9:28 PM, jiangrm jian...@gmail.com wrote:
Trying to import a bunch of data files named like f001, f002, f999. Some
of the files may be
I think this ought to work for you:
library(lattice)
set.seed(42)
d - data.frame(year = c(rep(2007,12), rep(2008,12)),
treatment = rep(LETTERS[1:3], each = 4, times = 2))
d$cover - rnorm(nrow(d))
d$variable - rnorm(nrow(d))
xyplot(variable ~ cover | year, d,
panel =
A reproducible example would be nice.
Try grid = FALSE for the first question, though I'm unaware which
lattice plot you are using where the default is TRUE. So I can't
guarantee that will even work.
For your second question, add
par.settings = list(strip.background = list(col = white))
to
Hi, Michael,
I think the SPSS answer is wrong. Your starting values are way off.
Look at this plot for verification:
con - textConnection(time bod
11 0.47
22 0.74
33 1.17
44 1.42
55 1.60
67 1.84
79 2.19
8 11 2.17)
mydata - read.table(con, header = TRUE)
close(con)
Another alternative is to use SSlogis which is very similar to the
model you're fitting except with one additional parameter:
Asym - 3
xmid - 0
scal - 10
model - nls(bod ~ SSlogis(time, Asym, xmid, scal), data = mydata)
summary(model)
plot(bod ~ time, mydata)
newdata - data.frame(time = seq(1,
Hi,
This is Raj from ClinAsia and we have a small query with respect to R
Statistical Package.
Our Query:
Actually while opening R console and R commander we see some packages like car
and datasets. In these packages we have default datasets.
For example: Women and Prestige so on. Now we
Try
dots - list(...)
if (length(dots) == 0) {
## do something
}
On Thu, Jul 16, 2009 at 6:46 AM, Thomas Roth (geb.
Kaliwe)hamstersqu...@web.de wrote:
Hi,
I was wondering what would be the best way to check if the three dots
argument contains any arguments (i.e. does ... contain any
Look at show.settings() and str(trellis.par.get()). This will show you
what the default settings are. The group colors are set by the
superpose.* elements (e.g. superpose.line is for group lines). To set
them, I usually create a list and pass it to par.settings. For
example,
my.theme -
You could try:
do.call(rbind, lapply(list.files(path/to/files, full = TRUE), read.csv))
And add more arguments to lapply if the files are not csv, have no header, etc.
--sundar
On Tue, Jun 9, 2009 at 11:18 AM, Erin Hodgesserinm.hodg...@gmail.com wrote:
Dear R People:
I have about 6000 files
use gregexpr and paste
aze - paste(c(a, z, e), collapse = )
sequence - paste(c(a,z,e,r,t,a,z,a,z,e,c), collapse =
)
gregexpr(aze, sequence, fixed = TRUE)
[[1]]
[1] 1 8
attr(,match.length)
[1] 3 3
HTH,
--sundar
On Fri, Jun 5, 2009 at 6:22 AM, Ptit_Bleuptit_b...@yahoo.fr wrote:
Hello,
This error is thrown if the argument to max is either NULL or length zero:
[~] Rscript -e max(NULL)
[1] -Inf
Warning message:
In max(NULL) : no non-missing arguments to max; returning -Inf
[~] Rscript -e max(numeric(0))
[1] -Inf
Warning message:
In max(numeric(0)) : no non-missing arguments to
You're missing a ) off end of the first line. You should consider
using an editor (e.g. ESS/Emacs) that does parentheses matching. I
found this in less than 5 sec (less time than I'm taking to write you
a note) by cut and pasting in Emacs.
--sundar
On Tue, May 19, 2009 at 12:52 PM, deanj2k
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
x=6595137340052185552
obase=16
x
5B86A277DEB9A1D0
You can call this from R.
On Wed, May 6, 2009 at 3:26 PM, Sundar Dorai-Raj sdorai
Hi,
I'm wondering if someone has solved the problem of converting very
large integers to hex. I know about format.hexmode and as.hexmode, but
these rely on integers. The numbers I'm working with are overflowing
and losing precision. Here's an example:
x - 6595137340052185552 # stored as
Set the colors in graph.sets and not auto.key.
graph.sets - list(axis.text = list(cex = 0.65),
par.ylab.text = list(cex = 1.25),
par.xlab.text = list(cex = 1.25),
superpose.polygon = list(col = 3:5))
Then remove the col = 3:5 from auto.key and barchart.
Hi, Ning,
Try: eval(parse(text = expr))
HTH,
--sundar
On Sat, May 2, 2009 at 5:39 AM, Ning Ma pnin...@gmail.com wrote:
Hi,
I am new to R. Can anyone tell me how to evaluate an expression stored
in a string?
such as:
expr - 3*5
I want to get the result 15.
Thanks in advance.
Try (re)reading ?qqnorm. Use datax = TRUE.
--sundar
On Sun, Apr 26, 2009 at 4:37 PM, Chris_d dewhurstch...@gmail.com wrote:
Hi all,
I have just started using R to produce qqnorm plots. I am trying to
switch the x and y axes so that the theoretical values are plotted on the y
axis and
Use ?is.infinite
inf - is.infinite(data)
data[inf] - 0.3 * sign(data[inf])
On Sun, Apr 26, 2009 at 5:44 PM, Nigel Birney na...@cam.ac.uk wrote:
Hello all,
I have to import numeric data from file but found it contains Infinite
values which need to be eliminated. I tried to replace them in
Because you're not calling trellis.par.set correctly. It should be:
trellis.par.set(par.ylab.text = list(cex = 0.65), par.xlab.text =
list(cex = 0.65))
However, I usually do things like this:
my.theme - list(par.ylab.text = list(cex = 0.65), par.xlab.text =
list(cex = 0.65))
barchart(...,
Try:
z - cbind(rep(c(BIC, hist), each = 150), rep(rep(c(5, 10, 30),
each = 50),2))
z - as.data.frame(z)
z - cbind(z, runif(300))
names(z) - c(Method, sigma, Error)
z$sigma - factor(z$sigma, c(5, 10, 30))
library(lattice)
sigma - as.numeric(levels(z$sigma))
sigmaExprList - lapply(sigma,
, ...)
},
layout = c(3,1))
Not sure how to do this with strip.custom.
--sundar
On Thu, Apr 16, 2009 at 1:20 PM, Sundar Dorai-Raj sdorai...@gmail.com wrote:
Try:
z - cbind(rep(c(BIC, hist), each = 150), rep(rep(c(5, 10, 30),
each = 50),2))
z - as.data.frame(z)
z - cbind(z, runif(300
Try:
library(lattice)
histogram( ~ height | voice.part,
data = singer, type = c,
scales = list(y =
list(at = seq(0, 20, 5),
labels = seq(0, 200, 50
HTH,
--sundar
On Fri, Apr 3, 2009 at 2:01 PM, Judith Flores jur...@yahoo.com wrote:
Hello,
Try converting year to a factor
xyplot(min + max + ave ~ month | factor(year), data = rain.stats, ...)
Also, notice the inclusion of the data argument.
HTH,
--sundar
On Tue, Mar 31, 2009 at 6:28 AM, steve_fried...@nps.gov wrote:
I am using windows XP with R 2.8.1
I am generating a
?predict.glm has no interval argument. Perhaps you're thinking of
?predict.lm, which is different.
To get intervals in glm, I've used:
example(predict.glm)
pr - predict(budworm.lg, se.fit = TRUE)
family - family(budworm.lg)
lower - family$linkinv(pr$fit - qnorm(0.95) * pr$se.fit)
upper -
Could be that you have some sort of ad filter in your browser that's
blocking the video? It appears just fine for me in Firefox 3.
On Mon, Mar 30, 2009 at 3:55 PM, Ted Harding
ted.hard...@manchester.ac.uk wrote:
On 30-Mar-09 22:13:04, Jim Porzak wrote:
Next week Wednesday evening, April 8th,
For the first question, add a groups argument. E.g.
barchart(HSI ~ Scenario | Region, Wbirdsm, groups = HydroState)
Also note that using Wbirdsm$HSI makes your call less readable, so I
added the data argument.
For your second question, setting the key does not set the color
theme. You want to
Convert Plot to factor:
xyplot(AbvBioAnnProd ~ Year | Plot, type = c(b, r), pch = 16)
Also note that using the type argument with multiple values prevents
the necessity of a custom panel function.
HTH,
--sundar
On Mon, Mar 16, 2009 at 5:54 AM, AllenL allen.laroc...@gmail.com wrote:
Hello R
Sorry, I should have
xyplot(AbvBioAnnProd ~ Year | factor(Plot), type = c(b, r), pch = 16)
On Mon, Mar 16, 2009 at 6:17 AM, Sundar Dorai-Raj sdorai...@gmail.com wrote:
Convert Plot to factor:
xyplot(AbvBioAnnProd ~ Year | Plot, type = c(b, r), pch = 16)
Also note that using the type
Assuming USER is defined on your system then
Sys.getenv(USER)
ought to work.
--sundar
On Mon, Mar 16, 2009 at 3:04 PM, Etienne Bellemare Racine
etienn...@gmail.com wrote:
I would like to get the name of the user form the system. Is it possible ?
Something like
system.user()
returning
. Is there a
workaround or another solution ?
--
Etienne
Sundar Dorai-Raj a écrit :
Assuming USER is defined on your system then
Sys.getenv(USER)
ought to work.
--sundar
On Mon, Mar 16, 2009 at 3:04 PM, Etienne Bellemare Racine
etienn...@gmail.com wrote:
I would like to get the name
Does this help?
A - matrix(0, 6, 6)
vec - 1:5
A[row(A) == col(A) + 1] - vec
--sundar
On Wed, Mar 11, 2009 at 4:42 PM, Stu Field s...@colostate.edu wrote:
I'm trying to enter a vector into the subdiagonal of a matrix but
cannot find a command in R which corresponds to the MatLab version of
, thanks.
But I guess I was looking for something more similar to MatLab, I'm really
surprised R doesn't have a preset command for this (?)
Thanks again,
Stu
On 11 • Mar • 2009, at 5:49 PM, Sundar Dorai-Raj wrote:
Does this help?
A - matrix(0, 6, 6)
vec - 1:5
A[row(A) == col(A) + 1] - vec
Try this:
xyplot(y ~ x, temp, groups = groups,
par.settings = list(
superpose.symbol = list(
cex = c(1, 3),
pch = 19,
col = c(blue, red
See:
str(trellis.par.get())
for other settings you might want to change.
Also, you should drop the ;
= temp$cex, col = temp$col, pch = 19);
Once I introduce groups, I lose the ability to customize individual
data-points and seem only to be able to customize entire groups.
Paul
-Original Message-
From: Sundar Dorai-Raj [mailto:sdorai...@gmail.com]
Sent: Tuesday, March 10, 2009 5:49
Convert Year to a factor and both problems will be solved.
--sundar
On Tue, Mar 10, 2009 at 3:48 PM, jimdare jamesdar...@gmail.com wrote:
Hi,
I have created the plot below and have a few questions about changes.
1) How do I change the Year title of each plot so it reads from the top
I don't believe Elena's suggestion will work. However, the following will:
xyplot(..., scales = list(y = list(at = seq(5, 25, 5
though you may need to extend the limits a little as well:
xyplot(..., ylim = lattice:::extend.limits(c(0, 30)))
and add the scales argument from the first
Hi,
There are possibly several ways to do this. My approach would be:
dates - strptime(as.character(DATE), %d%b%Y)
year - dates$year + 1900
week - floor(dates$yday/365 * 52)
HTH,
--sundar
On Thu, Mar 5, 2009 at 8:58 AM, Pele drdi...@yahoo.com wrote:
Hi R users,
I have a factor variable
(Sorry for the repeat. Forgot to copy R-help)
Try,
test = data.frame(expand.grid(c(1:10), c(1:10)))
z = test[,1] + test[,2]
test = cbind(test, z)
names(test) = c(x, y, z)
require(lattice)
wireframe(z ~ x*y, data = test,
par.settings = list(axis.line = list(col = transparent)),
par.box = c(col
To reorder the y-labels, simply reorder the factor levels:
df - data.frame(x_label = factor(x_label),
y_label = factor(y_label, rev(y_label)),
values = as.vector(my.data))
Not sure about putting the strips at the bottom. A quick scan of
?xyplot and
The only way I can figure out to do this is to use two calls to
panel.contourplot:
library(lattice)
x - seq(-2, 2, length = 20)
y - seq(-2, 2, length = 20)
grid - expand.grid(x=x, y=y)
grid$z - dnorm(grid$x) * dnorm(grid$y)
contourplot(z ~ x * y, grid,
panel = function(at, lty, col,
This is on the Mac FAQ:
http://cran.cnr.berkeley.edu/bin/macosx/RMacOSX-FAQ.html#How-can-R-for-Mac-OS-X-be-uninstalled_003f
HTH,
--sundar
On Tue, Feb 17, 2009 at 7:17 AM, ANJAN PURKAYASTHA
anjan.purkayas...@gmail.com wrote:
I need to uninstall R 2.7.1 from my Mac. What is the best way to
Try:
coplot(lbxglu~lbxgh|eth, data = reg.dat.5,
panel= function(...) {
panel.smooth(...)
panel.abline(h = 126, col = red)
panel.abline(v = 6.5, col = blue)
},
xlab=ABC, ylab=FBG)
Also note that you removed your with call and give coplot a data argument.
HTH,
--sundar
On
, Sundar Dorai-Raj sdorai...@gmail.com wrote:
Try:
coplot(lbxglu~lbxgh|eth, data = reg.dat.5,
panel= function(...) {
panel.smooth(...)
panel.abline(h = 126, col = red)
panel.abline(v = 6.5, col = blue)
},
xlab=ABC, ylab=FBG)
Also note that you removed your with call and give
!
Dimitri
On Wed, Feb 11, 2009 at 12:46 PM, Sundar Dorai-Raj sdorai...@gmail.com
wrote:
Pass a list to xlab and main for the font sizes:
barchart(..., xlab = list(x-axis, cex = 2), main = list(title, cex = 2))
For value labels and a grid you'll need a custom panel function:
barchart(..., panel
Try
x - diag(n)
x[upper.tri(x)] - 1
On Wed, Feb 11, 2009 at 1:22 PM, Dale Steele dale.w.ste...@gmail.com wrote:
The code below create an nxn upper triangular matrix of one's. I'm
stuck on finding a more efficient vectorized way - Thanks. --Dale
n - 9
data - matrix(data=NA, nrow=n, ncol=n)
I'm not sure what you really want, so perhaps a simple example would
help (i.e. what a sample of the input looks like and what the output
you need looks like). My guess would be
sapply(df, diff)
but again, I'm not sure.
--sundar
On Sun, Feb 8, 2009 at 4:24 PM, glenn
you can try
lapply(lapply(uniques, function(x) subset(df, date == x)), myfun)
or possibly more accurate (subset may be finicky due to scoping):
lapply(lapply(uniques, function(x) df[df$date == x, ]), myfun)
or use ?split
lapply(split(df, df$date), myfun)
HTH,
--sundar
On Sun, Feb 8, 2009
You're missing that R_TSConv is an R object. You can use
stats:::R_TSConv to see the value. Not sure how this helps you though.
On Wed, Feb 4, 2009 at 10:08 AM, rkevinbur...@charter.net wrote:
Let me get more specific. I think it this can be answered then I can
translate the information to
Try this:
dados - data.frame(varsep = factor(rep(1:2,10)),
i = runif(20))
library(lattice)
font.settings - list(
font = 2,
cex = 2,
fontfamily = serif)
my.theme - list(
box.umbrella = list(col = red),
box.rectangle = list(col =
You'll need a custom panel function. It would also help if you
provided a reproducible example:
xyplot (
SnowLineElevation ~ Year | Model,
data = data,
panel = function(x, y, col, ...) {
col - ifelse(panel.number() == 1, red, green)
panel.xyplot(x, y, col = blue, ...)
1 - 100 of 137 matches
Mail list logo