Displaying 20 results from an estimated 2000 matches similar to: "to get the R-Squared value"
2009 Jun 26
2
Indexing a list with a list
Dear list,
I have two lists: one with data and one with TRUE/FALSE values for data
I want to further analyze (see example below). I have been able to use a
for loop to extract the data that I want to keep, but think that there
probably exists a way to do it without a loop. Any ideas?
#sample data
set.seed(100)
example = list(letters[1:10], letters[1:10], letters[1:10])
ind =
2010 Jan 05
2
Fast nested List->data.frame
I have very large data sets given in a format similar to d below. Converting
these to a data frame is a bottleneck in my application. My fastest version
is given below, but it look clumsy to me.
Any ideas?
Dieter
# -----------------------
len = 100000
d = replicate(len, list(pH = 3,marker = TRUE,position = "A"),FALSE)
# Data are given as d
# preallocate vectors
pH =rep(0,len)
marker
2009 Jul 08
2
Simple monovariate classification?
I'm looking for an R function that simply recodes a quantitative
variable into a number of classes according to specified break-points.
Obviously I can do this using nested ifelse() commands, but I want
to write it into a function where I can't pre-specify the number of
classes. Is there an obvious way to do this?
An example to clarify: how to convert c(0,10,5,1,9,6) to
2009 Mar 18
2
multiple barplot
Dear all,
I want to put 9 barplots side by side. My code below only print 5 names from
9 names I gave.
Problem: how to print all of those 9 names? I use cex=0.8 but did not work,
it gave me error message.
d<-matrix(rpois(45,3),5,9)
barplot(d,beside=T,col=rainbow(5),names=c("CRTL","LSB","ONEMKR",
2009 Dec 11
3
Correcting for missing data combinations
I can think of many brute-force ways to do this outside of R, but was
wondering if there was a simple/elegant solution within R instead.
I have a table that looks something like the following:
Factor1 Factor2 Value
A 11/11/2009 5
A 11/12/2009 4
B 11/11/2009 7
B 11/13/2009 8
>From that I need to generate all permutations of Factor1 and Factor2 and
force a 0 for any combination that doesn?t
2011 May 13
1
period in scale parameter of prcomp
Hi all,
Looking at the help file for prcomp and the code in
stats:::prcomp.default, the scale parameter for the default S3 method
has a trailing period: it written as
scale.
I assume there is a reason for it (backwards compatibility with S was
suggested) but I thought I'd ask.
Thanks,
Greg
--
Greg Hirson
ghirson at ucdavis.edu
Graduate Student
Agricultural and Environmental Chemistry
2008 May 14
2
mfrow
Dear members,
I want to create 8 graphs and write it into one page using mfrow=c(4,2).
How to make all graphs (including the titles, legends, line types) to be
scale down (resized proportionally).
As an illustration, below is the code:
pdf("testmfrow.pdf")
par(mfrow=c(4,2))
x<-seq(1:10)
y1<-rnorm(10)
y2<-rnorm(10,mean=2,sd=1)
y3<-rnorm(10,mean=3,sd=1)
2009 Sep 08
1
Plotting two qqnorm plots:
Hi all,
Does anyone know how to plot overlapping qqnorm plots on the same window?
Suppose I have data in the vector x and y:
qqnorm(x)
lines(qqnorm(y))
I though these two lines will do the job... However, lines doesn't seem to
work. Anyways, thanks in advance!
--
View this message in context: http://www.nabble.com/Plotting-two-qqnorm-plots%3A-tp25352893p25352893.html
Sent from the R help
2010 Feb 18
1
Shapiro-Wilk test problem
Hi everybody,
Does anyone know what problem may be with this test.
I am applying 5 different normality tests and use p-values for them, but for
some reason S-W gives me NA, while sample size is 100.
Any ideas?
Thanks a lot!
[[alternative HTML version deleted]]
2011 May 16
1
help: Using hotelling for a confidence region for PCA scores
Hello everyone.
In my last post I did not explained my problem quite well. I made a principal component analysis and took the 2 first principal components. I made a chart of my points based on the score of the 2 PC. I would like to add on this graph a 95% confidence region. To do this I used the ellipse function as follows:
pcsref=PC$score[data[,1]==ref,1:2] #matrix containing the scores
2010 Jan 09
3
string functions
Hi!
Does anybody know a string function that would calculate how many
characters two strings share? I.e. ("Hello World","Hello Peter") would
be 7.
Thanks.
Laetitia
2010 Mar 18
5
can I rotate a matrix
useR's,
I want to be able to rotate a matrix 90 degrees, clockwise. For example,
> mat
[,1] [,2] [,3]
[,1] 1 2 1
[,2] 3 2 6
[,3] 4 5 3
I want to rotate it, so that it looks like this...
[,1] [,2] [,3]
[,1] 4 3 1
[,2] 5 2 2
[,3] 3 6 1
Does anyone know a quick and straightforward way to do this?
Thanks in advance.
--
View
2009 Aug 21
4
help with median for each row
Hi,
I tried looking through google search on whether there's a way to computer
the median for each row of a nxn matrix and return the medians for each row
for further computation.
And also if the number of columns in the matrix are even, how could I
specify which median to use?
Thank you very much!
--
Edward Chen
[[alternative HTML version deleted]]
2009 Sep 28
5
R and REST API's
Hi - Many organizations now make their data available as XML via a
REST web service architecture. Is there any R package or facility to
access this type of data directly (eg, to make the HTTP GET request
and have the downloaded data put into an R data frame)?
I used several R search sites to look for an answer, but came up with
very little. Any help would be appreciated.
Thanks very much.
Gary
2010 Jan 13
3
counting the number of times a string appears
Hi all,
I have a vector of strings and need to count the number of times a string
appears in the vector.
eg:
[1] spp6 spp10 spp6 spp6 spp4 spp2 spp9 spp10 spp5 spp2 spp2 spp3
[13] spp4 spp3 spp6 spp10 spp6 spp4 spp9 spp3 spp6 spp1 spp10 spp8
[25] spp2 spp10 spp9 spp7 spp1 spp3 spp8 spp6 spp3 spp8 spp6 spp5
[37] spp5 spp9 spp3 spp1 spp4 spp5 spp9 spp3
2009 Sep 09
3
Help on percentage of random numbers for different classes
R-list
I am sorry for asking this stupid question, but i have been running in circles. I want to randomly generate a scaling point of between 1 and 10, for say hundred entries, where the first 10% percent is has rates between 2 and 7, the next 15% 3 and 7, 20% between 3 and 9, 20% between 3 and 10, 35% between 5 and 10. The problem is that i can only generate the usual 100 using runif function
2009 Jul 01
3
is there a way to extract fata from web pages through some R function ?
I deal with a huge amount of Biology data stored in different databases.
The databases belongig to Bioconductor organization can be accessed through Bioconductor packages.
Unluckily some useful data is stored in databases like, for instance, miRDB, miRecords, etc ... which offer just an
interactive HTML interface. See for instance
http://mirdb.org/cgi-bin/search.cgi,
2009 Dec 21
2
Reading multiple Input Files
Dear R helpers,
Suppose I am dealing with no of interest rates at a time and the no of interest rates I am selecting for my analysis is random i.e. it can be 2, can be 10 or even higher. The R-code I had written (with the guidance of R helpers obviously and I am really grateful to all of you) as of now is sort of hard coding when it comes to reading interest rates as an input e.g.
## INPUT
2008 May 11
1
superscript text on graph legend
Is that possible to create superscript text on the graph legend, for example
to put "cm2" (centimeter square) on the legend. Please show me how to do it.
Thanks.
--
Agus Susanto
[[alternative HTML version deleted]]
2010 Apr 07
1
combn with factors
Dear list,
I have come across this issue:
combn(letters[1:5], 3)
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] "a" "a" "a" "a" "a" "a" "b" "b" "b" "c"
[2,] "b" "b" "b" "c" "c" "d" "c"