Displaying 20 results from an estimated 30000 matches similar to: "indexing into a list"
2003 Jun 12
1
indexing into a list 2
I didn't explain myself well.
You are right about not needing a list on the right hand side of the equation
below. What I end up with is a list of arrays. Now what i would like to do
is to access the individual elements in the arrays in the list. For example,
when I type, y[[1]], I just get the whole first array. How do I get the
first element in the first array for instance? Is
2003 May 23
3
calling files of commands in R
Please excuse me if this is a very basic question and I am just
misunderstanding the basic structure of R.
Right now, I am writing everything in a buffer (emacs) and then copying it
into R when it is correct. Is there a way to save a file of commands and
then just type the file name or something in R and have the commands executed
within R?
Anna
2003 Jul 01
3
lines and legend
When I am trying to put a legend on a plot where I am using "lines", R just
ignores it. I can do it with boxplot or plot, but just not with lines. Am I
doing something wrong? Maybe I am just making a mistake?
Anna
2003 Aug 13
1
anova and tukeyHSD
I would like to do a one way anova and then a tukeyHSD. I have three vectors
A,B and C. In a previous help message, I was told to do the following for
the anova:
y = c(A,B,C)
group = factor(rep(a:3,c(7,9,13))) #provided there a 7 elements in A,9 in B
and 13 in C
and then
anova(lm(y~group))
Looking at the tukeyHSD method it looks like it wants the aov method which I
don't understand.
2003 Aug 12
1
Post Hoc methods for anova in R
Does anyone know of some methods already programmed up ( ie freeware : ) ) in
R for the post hoc methods in anova. Particularly Scheffe's method or
Tukey's?
Anna
2003 Oct 23
6
repeating colors in graph 2
I've tried looking at ?colors and ?palette and if I'm understanding it
correctly, I'm supposed to type in (for example) palette(rainbow(13)) before
I type in my plot (of 13 lines) if I want 13 different colors. But this does
not work. Other things that i have tried besides rainbow give me errors.
Am I just doing something completely wrong?
Anna
2003 Jun 05
2
Fwd: Re: legend() with option adj=1
Is there a simpler way then the solution to the one that was posted here? I'm
not very proficient with legend, and I don't understand this solution. All
I have is two or more lines on one plot that I want to put a legend on and I
can't figure out how to do it from the examples. Can you give a very simple
example? It does not have to be fancy!! I have never worked with a
2003 May 19
0
FW: modulus operator?
try "%%" as the modulus operator and "%/%" for integer division
eg 5%%2 equals 1
John Marsland
> > -----Original Message-----
> > From: Anna H. Pryor [mailto:anna at ptolemy.arc.nasa.gov]
> > Sent: 19 May 2003 16:56
> > To: R Help
> > Subject: [R] modulus operator?
> >
> >
> >
> > Is there a modulus operator in R?
2003 May 07
2
plot vertical labels along x axis
I know how to print my own labels along the x axis:
plot(1:10,xlab = "My label", axes = FALSE)
axis(1,at=seq(1,10,by=2),labels=c("first","second","third","fourth","fifth"))
Is there a way to make the labels print vertically along the axis rather than
horizontally? (I'm not sure if this is even going to look all right, but I
2003 Jul 31
2
anova
I am totally confused as to how to use anova. I have three vectors and would
like to use anova on them but I don't understand how lm or glm comes into
play. In matlab, you just give the three vectors. Why isn't it the same in
R?
Any help would be greatly appreciated.
Anna
2003 Oct 23
2
repeating colors in graph
I have a plot with 13 lines and R repeats colors. Is there any way to make R
not repeat colors, or is this just a fundamental limitation on R's part to
say have only 8 colors that it can use?
Anna
2003 Apr 29
2
plots
I have two separate questions.
The first is when I use xlab, the labels on my tic marks disappear. Is there
a way to make them reappear? Also, is there a way to make my own labels for
the tick marks?
My second question is, after I have spent a lot of time getting my plot to
look just right, I want to save it to a file, but the only way I seem to know
how to do it is to first use
2003 Sep 19
1
What is wrong with m?
I've been programming in one directory and recently switched to another
directory. It appears that in doing so I've uncovered a problem. My
environment was saving something so that my code would work and now I don't
know how to fix it. I have the following bit of code:
for(i in 1:index){
indexList = lst[i]
for(j in 2:jobs-1){
indexList =
2003 Apr 29
2
labels
I don't know how to retain my row labels. I read in a table with row labels,
ie:
Price Floor Area Rooms
52. 111. 830 5
54. 128. 710 5
47.4 101 1000 4
...
but then I need to transform the data
raggedRidzeros <- function(x){
y = list(ridzeros(x[[1]]))
for(i in 2:length(x)){
y = c(y,list(ridzeros(x[[i]])))
}
y
}
(where ridzeros is a function
2010 Sep 22
2
efficient list indexing
Hello everyone,
I need some help with lists inside lists (a good way to emulate a struct)\
Assume that there is a small list called fred:
fred <- list(happy = 1:10, name = "squash")
and a big list called bigfred that includes fred list 5 times
bigfred <- rep(fred,5)
Is it possible somehow to index all these sublists(fred) inside bigfred with a
more direct way like this:
2013 Mar 07
3
ggpliot2: reordering of factors in facets facet.grid(). Reordering of factor on x-axis no problem.
Hi everyone (again),
before you all start screaming that the reordering of factors has been
discusse on several threads and is not particular to ggplot2, hear me out.
I can easily reorder my x-axis factor in facet.grid() in ggplot2. What I
cannot reorder are the factors represented on the strips. I can see that the
graphs are changing, so I am afraid of what it is I am doing. Why is ggplot2
2010 Feb 10
3
saslauthd attack
I'm seeing a lot of activity over the last two days with what looks to
be a kiddie script. Mostly trying to access several of our servers with
the username anna. All failed... in fact I don't think we have a user
anna on any of our servers. Meanwhile...
I'm running Sendmail. This pertains to Centos 4 and 5 servers. I'm also
running fail2ban on some and Ossec on others. So far,
2010 Mar 11
2
Can't convert list to matrix properly
Hi guys, here is a list of names that I have:
MyList:
> myList<-list("A", "B","C","D")
> myList
[[1]]
[1] "A"
[[2]]
[1] "B"
[[3]]
[1] "C"
[[4]]
[1] "D"
I want to turn this list into a matrix of 1 row and 4 columns with those
four components (A, B, C, D) so here is what I do:
myDataFrame <-
2010 Mar 26
3
Using lapply with two lists
Hello guys,
I have a list L1 of matrix. I have another list L2 with the same number of
elements representing the row of the L matrix that I want to delete
(L1[[i]][-L2[[i]],]) but I can't do this with lapply as it iterates through
L1 (first argument) and not L2. Any idea?
-----
Anna Lippel
--
View this message in context: