Displaying 20 results from an estimated 300 matches similar to: "Simple monovariate classification?"
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 Sep 07
1
How to reduce memory demands in a function?
I've written a function that regularly throws the "cannot allocate vector of size X Kb" error, since it contains a loop that creates large numbers of big distance matrices. I'd be very grateful for any simple advice on how to reduce the memory demands of my function. Besides increasing memory.size to the maximum available, I've tried reducing my "dist" objects to 3
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
2009 Jul 10
2
to get the R-Squared value
Dear all,
I know there are 'coef', 'predict', 'fit' to get the corresponding
outputs. Is that possible to get the value of R-squared from a 'lm'
output?
Many thanks.
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
2007 Jun 04
1
R-squared in mixed-effects models
Hello,
I'm fitting general linear models using the function lme() from the package
nlme. My variables include a number of covariates and a single random factor,
because the experiment was laid out in blocks. I'd like to have a statistic to
measure the "proportion of explained variance" from my models. With ordinary
multiple regression I'd use R-squared, but I can't
2008 Aug 02
3
Restoring from backup, preserving uids
Hi, I use rsync to back up my Linux system to hard drive. I use the -av
option, and it preserves uids. However if I reinstall Linux, and try to
restore from the backup hard drive, the owner permissions get all mixed
up, I assume since the numeric uids don't match up with the equivalent
usernames any more. For example, user nobody might have had uid 123 in
my old system, but now in the new
2012 Jul 25
2
old weird error message
Dear users,
I have a weird questions. A friend of mine, some years ago, supposedly
trying to access help files without Internet connection, got something
like this error message:
"The Pythia is not available, please go to Delphi"
When I've heard about it, I found it very funny and I'd like to be able
to get it. Does anyone of you know how to get this error message again?