Displaying 20 results from an estimated 20000 matches similar to: "plot in for loop with "i" indexed variables does not work"
2005 May 19
2
plot question
hi all:
xlim and ylim are used to define the interval limits of a plot. I'm interested in the scale of values between this limits.
suppose xlim=c(0,10)
we can have e.g.
0 5 10
0 2 4 6 8 10
0 1 2 3 4 5 6 7 8 9 10
which is the parameter that allows me to modify this?
thanks in advance
alexandre
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to
do this weekend to understand every bit but your code will prove very
useful.
Cheers,
Aziz
-----Original Message-----
From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be]
Sent: May 12, 2006 4:35 PM
To: Chaouch, Aziz
Subject: RE: [R] Maximum likelihood estimate of bivariate
2008 Mar 10
1
ltm package question
Hello All,
I was wondering how I can get the overall Pearson chi^2 test of model fit
with its df and p value in the LTM package for the 2PL models.
Thanks,
--
Davood Tofighi
Department of Psychology
Arizona State University
[[alternative HTML version deleted]]
2005 Apr 06
2
par(mfcol=2, mfrow=3) equivalent for trellis
Dear friends of lattice,
I know how to position trellis plots with print(...,split,more=T) or
(...position).
Sometimes I wish I had something like the old "par(mfcol=2, mfrow=3)"
mechanism, where the next free viewport is automatically chosen. I tried
fiddling with grid-viewports, but could not find an easy solution.
Did I miss something?
Dieter Menne
2005 Sep 23
2
multifigure question
I would like to put three figures next to each other in
a figure. I have been reading the introduction to R,
section 12 several times now, and I still can't make heads
or tails out of it.
Lets say that I have three dataframes a, b, c, and I want
to plot a$V1, b$V1 and c$V1 in separate plots simply using
plot(), how do I put them next to each other?
I am sorry if this is a FAQ, but I cannot
2006 Jan 27
5
How to convert decimals to fractions
Dear all,
Are there any functions to convert decimals to fractions in R?
I have the result:
> summary(as.factor(complete.ID))
0 0.0133333333333333 0.04
2256 488 230
0.0666666666666667 0.0933333333333333 0.106666666666667
2342 310 726
0.133333333333333
2005 Feb 28
2
How to plot
Hello,
I would like to know if R provides the similar function to produce
the 4-in-1 graph ("Normal Plot of Residuals", "I Chart of Residuals",
"Histogram of Residuals" & "Residuals vs Fits") as MiniTab. If do not
have, could anyone please tell me how to produce above-mentioned
individual chart?
Your help is greatly appreciated.
2005 Mar 18
4
passing arguments to FUN in lapply
Suppose I have a nx2 matrix of data, X, the following code generate
density estimation for each column and plot them
denlist <- apply(X, 2, density)
par(mfrow=c(1,2))
lapply(denlist, plot)
Does anyone know how to change the main title of each density plot
to "var 1", "var 2" by passing optional argument "main"? I've tried
lapply(denlist, plot,
2005 Jan 11
4
Matrix to "indexed" vector
I have a matrix that I want to turn into a transformed matrix that
includes the indices from the original matrix and the value. The
matrix is simply real-valued and is square (and large (8k x 8k)). I
want something that looks like (for the 3x3 case):
i j value
1 1 1.0
1 2 0.783432
1 3 -0.123482
2 1 0.783432
2 2 1.0
2 3 0.928374
and so on....
I can do this with for loops, but there is
2004 Sep 28
4
An index of all possible combinations of variables in a data fram e
Hello list
Does anybody know of any way to create an index of all the possible
combinations of variables (factors) in a data frame? ie for 3 factors A, B &
C we have
A
B
C
AB
AC
BC
ABC
which equates to columns 1, 2, 3, 1:2, (1,3), 2:3 and 1:3.
I realise that a function like model.matrix does this, but how to get the
seqence of the index?
Any help would be greatly appreciated.
2005 Mar 29
5
pairewise plots
Dear R users,
I have a data generated as the following,
dat <- data.frame(matrix(sample(24), nrow=4))
dimnames(dat) <-list(rownames=c('g1','g2','g3','g4'), colnames=c("A_CH1","A_CH2","B_CH1","B_CH2","C_CH3","C_CH3"))
ยป dat
A_CH1 A_CH2 B_CH1 B_CH2 C_CH3 C_CH3
g1 16 24 7 9 14
2008 Mar 11
1
How to generate column names for pairwise comparison
Hi,
Given names <- c("a", "b", "c", "d"). I would like to generate "a vs. b", "a
vs. c", "a vs. d", "b vs. c", "b vs. d", "c vs. d"
Thanks
[[alternative HTML version deleted]]
2007 Jan 16
3
plot portion of a line
Dear HelpeRs,
Given:
x <- rnorm(50)
y <- rnorm(50)
plot(x,y)
abline(lm(x ~ y))
Is there a way to plot just a portion of the line? Say for values of x
> 2.0 or x > -2.0 and x < 4.0. (Still fitting all the points.)
Thank you,
jab
--
John Bollinger, CFA, CMT
www.BollingerBands.com
If you advance far enough, you arrive at the beginning.
2006 Nov 28
2
Sorting a data frame when you don't know the columns
Hi
Sorry to ask such a well oiled question, but even with multiple google hits I don't think this has been answered very well.
It's all well and good doing a sort of a data frame on multiple columns when you know in advance which columns you want to sort on, but what about when the names of the columns you wish to sort on are in a vector?
At the minute I'm messing about with
2008 Apr 09
4
apply lm() for all the columns of a matrix
Hi all,
My question is not really urgent. I can write a loop and solve the
problem. But I know that I'll be in a similar situation many more times so
it would be useful to find out the answer
Is there a fast way to perform linear fit to all the columns of a matrix?
(or in the one dimension of a multi-dimensional array.) I'm talking about
many single linear fits, not about a multiple fit.
2006 Mar 02
2
'...' passed to both plot() and legend()
Dear R-devels,
I'd like to create a plot method for a class of objects that passes
the '...' argument to both plot() and legend(), e.g.,
x <- list(data = rnorm(1000))
class(x) <- "foo"
plot.foo <- function(x, legend = FALSE, cx = "topright", cy = NULL,
...){
dx <- sort(x$data)
plot(dx, dnorm(dx), type = "l", ...)
if (legend)
2006 Jun 16
3
Vector Manipulation
I have a vector that has 1,974 elements and each element is one of the
following (B, F, N, Y). How do I recreate that vector accept in the
place of N put 0 and in the place of B, F or Y put a 1?
Thanks,
Jacob
[[alternative HTML version deleted]]
2005 Sep 25
2
getting variable length numerical gradient
Hi all.
I have a numerical function f(x), with x being a vector of generic
size (say k=4), and I wanna take the numerically computed gradient,
using deriv or numericDeriv (or something else).
My difficulties here are that in deriv and numericDeric the function
is passed as an expression, and one have to pass the list of variables
involved as a char vector... So, it's a pure R programming
2007 May 20
2
Number of NA's in every second column
Hi R-users,
How do I calculate a number of NA's in a row of every second column in my
data frame?
As a starting point:
dfr <- data.frame(sapply(x, function(x) sample(0:x, 6, replace = TRUE)))
dfr[dfr==0] <- NA
So, I would like to count the number of NA in row one, two, three etc. of
columns X1, X3, X5 etc.
Thanks in advance
Lauri
[[alternative HTML version deleted]]
2007 Jan 21
5
Integration + Normal Distribution + Directory Browsing Processing Questions
Hi everyone,
I am new to R, but it's really great and helped me a lot!
But now I have 2 questions. It would be great, if someone can help me:
1. I want to integrate a normal distribution, given a median and sd.
The integrate function works great BUT the first argument has to be a
function
so I do integrate(dnorm,0,1) and it works with standard m. and sd.
But I have the m and sd given.