Displaying 20 results from an estimated 50000 matches similar to: "Unique lists from a list"
2003 Jul 25
5
R won't connect to the internet on SUSE Linux 8.1
Hi
Thanks once again for your help, I do appreciate it..... however....
Here is what I get with your test.... (under tcsh - i normally use bash, but I will keep everything the same)
users/mwatson> env http_proxy=http://wwwcache.bbsrc.ac.uk:8080/ R
>options(internet.info=0)
>update.packages()
trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
unable to connect to
2005 Feb 03
5
How to convert a list to a matrix
Hi
Sorry to ask such a basic question. I have a list, each element of
which is a vector of two values. What I actually want is a matrix with
two columns, and one row per element of the list. Obviously I have
tried as.matrix(), and as.vector() but I didn't expect the latter to
work.
I feel so lame asking this. Any suggestions?
Mick
2004 May 19
7
Help with hclust() and plot()
Hi
When I use plot(hclust(dist..)...)...) etc to create a dendrogram of a
hierarchial cluster analysis, I end up with a vertical tree. What do I
need to do to get a horizontal tree?
Also, my users are used to seeing trees who's leaves all "end" at the
same place (eg. Like in minitab). Is this possible in R?
Thanks
Mick
Michael Watson
Head of Informatics
Institute for Animal
2005 Feb 17
6
Converting a list to a matrix - I still don't think I have it right
Hi
We have touched on this before, but I don't think I quite got it right.
So I have a list, each element of which is a a vector of 2 numbers:
> l2
$cat000_a01
[1] 0.3429944 4.5138244
$cat000_a02
[1] 0.1929336 4.3064944
$cat000_a03
[1] -0.2607796 4.1551591
What I actually want to convert this into is a matrix with the names
(cat000_a01 etc) as row names, the first element of each of
2003 Jul 24
3
R won't connect to the internet on Linux!
OK, I really am struggling with this one! Forgive me if I am being stupid....
I am running R 1.7.1 on Suse Linux 8.1. I connect to the internet through a proxy so I have:
IAHC-LINUX03:~ # echo $http_proxy
wwwcache.bbsrc.ac.uk:8080
IAHC-LINUX03:~ # echo $HTTP_PROXY
wwwcache.bbsrc.ac.uk:8080
just in case ;-)
SO, i go into R and I get:
>
2004 Nov 16
3
Simple plot() question
Hi
First a simple question to do with plot(). How do I change the x-axis
labels on a plot?
For example, I am plotting each row of a matrix, and I want each row to
be a line on my graph. Simple really. Eg:
plot(sg[1,], type="l")
When I do this, the x-axis is labelled 1:38, as I have 38 columns in my
matrix. When I do:
plot(sg[1,order(sg[1,])], type="l")
Ideally I would
2003 Jul 18
4
R won't connect to the internet
Hi
I can't get R to connect to the internet. I am running R 1.7.1 on Windows XP and whenever I try to download packages etc from within R using the internet, it fails.
OK so I am behind a firewall and use a proxy server....
SO, if I go to my MS-DOS prompt and type:
RGui.exe --internet2
everything works....
BUT i can't set up a shortcut for this as Windows (I hate Windows) complains
2004 Aug 26
5
Problems with par() and labels with boxplot
Quite a simple one really!
When I run boxplot(), the labels on the X axis are horizontal, and I
want them vertical. So I did:
par(las=3)
boxplot(...)
And my labels just aren't there anymore....
Any help???
2006 Mar 06
4
Averaging over columns
Hi
I've been reading the help for by and aggregate but can't get my head
round how to do this.
I have a data frame - the first three columns are replicate
measurements, then the next 3 are replicates etc up to 36 (so 12
variables with 3 replicate measurements each). I want to compute the
mean for each of the 12 variables, so that, for each row, I have 12
means.
A grouping variable
2004 Nov 16
5
Difference between two correlation matrices
Hi
Now a more theoretical question. I have two correlation matrices - one
of a set of variables under a particular condition, the other of the
same set of variables under a different condition. Is there a
statistical test I can use to see if these correlation matrices are
"different"?
Thanks
Mick
2005 Feb 17
3
A vector or array of data frames
Hi
A simple question again, but I can't find it by google-ing R-help.
Quite simply, I want to read in the contents of a number of files, using
read.table, and assign the results to elements of a
vector/array/list/whatever.
I want it so that, if my vector/array/whatever is "pos", that pos[1]
will give me the first data frame, pos[2] will give me the second etc...
Kind of basic
2003 Jun 13
4
Using jpeg() function over cgi
Hi
I have seen a few posts to this list regarding problems accessing the x11() device over cgi - namely, when trying to create a graphic using the jpeg() function, everything is fine from the command line but it won't work over cgi, producing the error:
"Unable to open connection to X11 display"
Has anyone actually solved this particular problem satisfactorily?
Please reply
2005 Feb 10
3
Using a number as a name to access a list
Hi
Dumb question time again, for which I apologise.
I have a variable that contains the following numerical text "04010".
This is the name to access a list:
> as.list(KEGGPATHID2NAME)$"04010"
[1] "MAPK signaling pathway"
Marvellous! Except I want to do that when "04010" is assigned to a
variable called path and I can't figure out how to do it!
2005 Jan 14
5
Replacing NAs in a data frame using is.na() fails if there are no NAs
Hi
This is a difference between the way matrices and data frames work I
guess. I want to replace the NA values in a data frame by 0, and the
code works as long as the data frame in question actually includes an NA
value. If it doesn't, there is an error:
df <- data.frame(c1=c(1,1,1),c2=c(2,2,NA))
df[is.na(df)] <- 0
df
df <- data.frame(c1=c(1,1,1),c2=c(2,2,2))
df[is.na(df)] <-
2005 Jan 25
2
Rd problems when converting DVI version
Hi
Running R v2.0 on SuSe linux 8.2.
I'm trying to build a package (which built perfectly on Windows...) on
Linux, and I ran:
R CMD check mypackage
I got:
* checking mypackage-maual.tex ... ERROR
LaTeX errors when creating DVI version
This typically indicates Rd problems
OK, there are no problems with my Rd - I got 3 warnings but they were
all expected, and the whole package builds find
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
2003 Jul 03
4
Generating a vector for breaks in a histogram
Hi
I have two lots of numbers which I would like to histogram using the hist() function. For comparative reasons, I want them to be on the same scale, which I can use the xlim and ylim options to achieve.
However, having them on the same scale is meaningless unless they have the same "breaks". Consulting the documentation, there are 4 ways of defining the number of breaks, only one
2005 Apr 05
5
Help with three-way anova
Hi
I have data from 12 subjects. The measurement is log(expression) of a
particular gene and can be assumed to be normally distributed. The 12
subjects are divided into the following groups:
Infected, Vaccinated, Lesions - 3 measurements
Infected, Vaccintaed, No Lesions - 2 measurements
Infected, Not Vaccinated, Lesions - 4 measurements
Uninfected, Not Vaccinated, No Lesions - 3 measurements
2006 Mar 10
2
lapply and list attributes
Hi
I have a list that has attributes:
attributes(lis[2])
$names
[1] "150096_at"
I want to use those attributes in a function and then use lapply to
apply that function to every element of the list, eg for simplicity's
sake:
my.fun <- function(x) {
attributes(x)
}
Then
l2 <- lapply(lis, my.fun)
It seems that "attributes(x)" within the function is not the
2006 Feb 23
4
Changing the x-axis labels in plot()
Hi
Hopefully this one isn't in the manual or I am about to get shot :-S
One of my colleagues wants a slightly strange graph. We basically have
a data matrix, and she wants to plot, for each row, the values in the
row as points on the graph. The following code draws the graph just
fine:
plot(row(d)[,3:9],d[,3:9])
So as there are 12 rows in my matrix, there are 12 columns of points,
which