Displaying 20 results from an estimated 100 matches similar to: "how to sort"
2009 Apr 24
1
deleting rows provisionally
I have an object. I think it is a matrix, called 'answer2'
str(answer2)
int [1:1537, 1:2] 1 399 653 2 3 600 4 5 271 870 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:1537] "a4.1" "hirschsprung.399" "peritoneal.653" "abdomen.2"
...
..$ : chr [1:2] "row" "col"
I want to delete rows that have the same entries.
2015 Jun 16
4
Ayuda boxplot ggplot2
Hola a todos
Me gustaría saber si me pueden ayudar con lo siguiente.
Realicé un Boxplot usando ggplot2 para visualizar el comportamiento de dos
variables. Visualmente no se notan las diferencias porque la gráfica de la
derecha (parásitos en el abdomen) llega hasta 20 en el eje y. ¿Cómo puedo
hacer para que las dos gráficas muestren la misma escala en el eje Y, es
decir, que las dos lleguen a 60?
2013 May 12
1
Multinomial-Dirichlet using R
Hi:
I have asked this question on Cross-Validated. So it might be a cross
posting but havent received any responses to it.
I am trying to see which distribution will best fit the data I am working
on. The dataset is as following:
Site Nausea headache Abdominal Distension
1 17 5 10
2 12
2006 Jun 24
1
Parsing XML with REXML problem
Why can it not find my object? What am i missing here? Here is my code:
require ''rexml/document''
include REXML
# classes to represent the objects and relationships in the xml file
class Article
attr_accessor :id, :post, :archive, :ntype, :head, :blurb, :body,
:fblurb, :fimage, :att, :source, :copy, :brand
end
# the base parser
class BaseXMLParser
def initialize(filename)
2009 Feb 08
0
Initial values of the parameters of a garch-Model
Dear all,
I'm using R 2.8.1 under Windows Vista on a dual core 2,4 GhZ with 4 GB
of RAM.
I'm trying to reproduce a result out of "Analysis of Financial Time
Series" by Ruey Tsay.
In R I'm using the fGarch library.
After fitting a ar(3)-garch(1,1)-model
> model<-garchFit(~arma(3,0)+garch(1,1), analyse)
I'm saving the results via
> result<-model
2009 Apr 21
4
search through a matrix
Hi. I have a 925 by 925 correlation matrix corM. I want to identify all
variables that have correlation greater than 0.9. Can anyone suggest an "R
way" of doing this?
Thank you.
--
View this message in context: http://www.nabble.com/search-through-a-matrix-tp23153538p23153538.html
Sent from the R help mailing list archive at Nabble.com.
2009 Apr 05
3
number of zeros in a matrix -row by row
Hi. I have an n x m matrix M some of who's entries are zeros. I want to know
how many zeros there are in each row -perhaps stored in a 1 x n vector
which lists the number of zeros for each row of M.
Before I had a vector V and I was able to get the number of zeros in V by
doing length(V[ V==0]) but when I try something similar for M, like M[ M==0]
it creates a vector not a matrix and so
2009 May 02
2
any suggestions on this error?
Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow =
nr, :
invalid 'ncol' value (too large or NA)
the statement was:
for (i in v) {for (j in m[0,]){if(v[i]==m[0,j]){M[,-j]}}}
where 'v' is a vector, and 'm' and 'M' are both matrices.
--
View this message in context:
2009 Jun 19
2
meaning of glm(value ~ .,
I am trying to build a glm model with many inputs.
I saw the following code in Rattle
crs$glm <- glm(value ~ ., data=crs$dataset[,c(1:59,922)],
family=binomial(link="logit"))
I am not clear about what
value ~ .
means and also, I see
data=crs$dataset[,c(1:59,922)]
I have read that the data argument is optional here
"an optional data frame, list or environment (or object
2009 Mar 14
2
permutations in R
Hi. Does anyone know of a function which will take as input a number n (or a
set of n letters) and will give out, one at a time, the permutations of n
(or of those n letters) as a vector?
So that I can use the permutations one at a time. And such that it will
exhaust all the permutations with no repeats.
For example if n is 3, I would want a function which I could use in a loop
and the first time
2009 May 24
2
accuracy of a neural net
Hi. I started with a file which was a sparse 982x923 matrix and where the
last column was a variable to be predicted. I did principle component
analysis on it and arrived at a new 982x923 matrix.
Then I ran the code below to get a neural network using nnet and then wanted
to get a confusion matrix or at least know how accurate the neural net was.
I used the first 22 principle components only for
2009 Nov 01
4
convert list to Dataframe
Hi. I have a huge list called twitter:
> dim(twitter)
NULL
> str(twitter)
List of 1
$ :Classes 'PlainTextDocument', 'TextDocument', 'character' atomic
[1:35575] 11999;10:47:14;20;10;2009;ObamaLouverture;Trails Mixed Lessons For
Governance From Campaigner-in-chief: President obama jumps campaign 09
tuesday..
2005 Mar 26
1
Trouble with expression() in R-win 2.0.1
Hi.
The following statement works fine in R-win 1.8.0, but yields a syntax
error in R-win 2.0.1 (and possibly in other versions after 1.8.0):
plot(c(1,2),main=expression(a==b==c))
I note that the following workaround executes successfully in both
versions of R...
plot(c(1,2),main=expression(a*"="*b*"="*c))
...but I don't really understand
2009 Apr 22
2
Exporting objects plotted with plot3d() - rgl package
Dear all,
Can anybody tell me how to export a 3d figure made with the plot3d
function? I'm careless about whether it's still interactive or not in
another format, as long I can get it out of R.
Thanks!
Alejandro Gonz?lez
Departamento de Biodiversidad y Conservaci?n
Real Jard?n Bot?nico
Consejo Superior de Investigaciones Cient?ficas
Claudio Moyano, 1
28014 Madrid, Spain
Tel +0034
2009 Apr 20
1
factanal error
Hi. I tried running the following code. I don't understand the error.
mydata <- read.table("C:/dataForR/radiology/wordFrequencies.csv",
header=TRUE, sep=",")
> dim(mydata)
[1] 982 924
mydataN<-mydata[,-923]
> dim(mydataN)
[1] 982 923
cor(mydataN)
factanal(mydataN, factors=3)
Error in solve.default(cv) :
Lapack routine dgesv: system is exactly singular
2009 Apr 03
1
how to do this "the R way"
Hi. I am sure there is a better way in R to do this then using a loop but I
am new to it and not sure what to do. I think it might be something about
using a function as an argument but not sure.
I have a 1 x 2000 vector TS2 which has entries from the set {x: x is in Z
and 0<x<8} (where Z is the set of Integers).
Then I also have a 5050 x 7 matrix called 'perm' whose entries are
2002 Aug 05
3
Formatting POSIXt values in plot axis labels
Hello.
I have an XYY series that I would like to graph with matplot() or some
other single function that will do the trick.
The X in question is a vector of POSIXt values obtained from strptime().
Is it possible to tell matplot() how to handle POSIXt x values?
I have examined the examples at
http://lark.cc.ukans.edu/~pauljohn/R/statsRus.html#5.22 , but would
prefer not have to overlay the
2009 May 08
1
if ((x >.2 || x<(-.2)) && (col(x)!=row(x))) {x=x[,-col(x)]}
Hi. I have a correlation matrix 'x' which is of size 923x923
I need to remove variables that are highly correlated. I don't have a
sophisticated way of selecting which of the two in a highly correlated pair
to remove. I thought I would just go through each entry of the correlation
matrix and if it is greater than 0.6 (or less than -0.6) I will remove that
column and then redo the
2012 Aug 22
1
Error in if (n > 0)
I've searched the Web with Google and do not find what might cause this
particular error from an invocation of cenboxplot:
cenboxplot(cu.t$quant, cu.t$ceneq1, cu.t$era, range=1.5, main='Total
Recoverable Copper', ylab='Concentration (mg/L)', xlab='Time Period')
Error in if (n > 0) (1L:n - a)/(n + 1 - 2 * a) else numeric() :
argument is of length zero
I do
2006 Aug 18
2
4^2 factorial help
To whom it may concern:
I am trying a factorial design a system of mine that has two factors.
Each factor was set at four different levels, with one replication for
each of the combinations. My data is as follows:
A B Response
1 600 2.5 0.0257
2 600 2.5 0.0254
3 600 5