Displaying 20 results from an estimated 4000 matches similar to: "Question about Factors"
2009 Aug 31
3
Two way joining vs heatmap
Hi
STATISTICA has a function called "Two-way joining" (see
http://www.statsoft.com/TEXTBOOK/stcluan.html#twotwo) and the
reference material states that this is based on the method as
published by Hartigan (found this paper:
http://www.jstor.org/pss/2284710 through wikipedia).
What is the relationship (if any) between the "heatmap" function in R
and this technique? Is there an
2007 Feb 13
2
Computing stats on common parts of multiple dataframes
Folks,
I have three dataframes storing some information about
two currency pairs, as follows:
R> a
EUR-USD NOK-SEK
1.23 1.33
1.22 1.43
1.26 1.42
1.24 1.50
1.21 1.36
1.26 1.60
1.29 1.44
1.25 1.36
1.27 1.39
1.23 1.48
1.22 1.26
1.24 1.29
1.27 1.57
1.21 1.55
1.23 1.35
1.25 1.41
1.25 1.30
1.23 1.11
1.28 1.37
1.27 1.23
R> b
EUR-USD NOK-SEK
1.23 1.22
1.21 1.36
1.28 1.61
1.23 1.34
1.21 1.22
2008 Dec 06
1
Morlet wavelet not supportd by wavCWTPeaks
aa <- (structure(list(X.0.85 = c(-1.02, -1.17, -1.29, -1.39, -1.46,
-1.5, -1.52, -1.5, -1.46, -1.39, -1.3, -1.19, -1.07, -0.93, -0.79,
-0.65, -0.5, -0.36, -0.22, -0.08, 0.05, 0.18, 0.3, 0.41, 0.52,
0.62, 0.72, 0.81, 0.89, 0.98, 1.05, 1.13, 1.19, 1.25, 1.29, 1.31,
1.31, 1.29, 1.24, 1.16, 1.06, 0.93, 0.77, 0.58, 0.38, 0.16, -0.07,
-0.31, -0.89, -1.05, -1.19, -1.31, -1.41, -1.47, -1.51, -1.51,
2013 Feb 13
3
date and matrices
Hi Elisa,
Try this:
date1<-format(seq.Date(as.Date("1991.1.1",format="%Y.%m.%d"),as.Date("1996.12.31",format="%Y.%m.%d"),by="day"),"%Y.%m.%d")
?length(date1)
#[1] 2192
mat1<-matrix(c(.314,.314,.273,.273,.236,.236,.236,.236,.273,.314,.403,.314),ncol=1)
res1<-
2005 Apr 22
2
Hoaglin Outlier Method
I am a new user of R so please bear with me. I have reviewed some R books,
FAQs and such but the volume of material is great. I am in the process of
porting my current SAS and SVS Script code to Lotus Approach, R and
WordPerfect.
My question is, can you help me determine the best R method to implement
the Hoaglin Outlier Method? It is used in the Appendix A and B of the fo
llowing link.
2008 Jun 25
2
Is this sapply behaviour normal?
Hi, I'm trying to use sapply to compute the min of several variables, each
of them stored in data.frames, grouped as a list:
Is it normal that mean() and min() produce different objects dimensions?
> str(dats)
List of 5
$ log20:'data.frame': 83 obs. of 5 variables:
..$ DATE : int [1:83] 2001081500 2001081512 2001081600 2001081612
2001081700 2001081712
2008 Dec 05
2
Help with wavCWTPeaks
I cannot understand the following error printed out when I try to get the extrema of my time series.
I would appreciate some suggestion as I really cannot interpret the error. I might not be using a proper
set of parameters in calling such functions. I am learning by doing ...
> aa.peak <- wavCWTPeaks (aa.tree)
Error in `row.names<-.data.frame`(`*tmp*`, value = c("1",
2012 Dec 31
3
cut ()
Hello List,
My goal is to create a 5 category variable (p1_st_data$ob_mrj_cat), based on the p1_st_data$obt_mrj_p variable, using the following code for 50 States and District of Columbia (N=51).
p1_st_data$ob_mrj_cat <- cut (p1_st_data$obt_mrj_p, quantile (p1_st_data$obt_mrj_p, (0:5/5), include.lowest=TRUE))
The issue is that, for Utah, I am getting an <NA> instead of (42,48.7] in
2008 Jun 18
4
inverse cumsum
I've a matrix like this:
1985 1.38 1.27 1.84 2.10 0.59 3.47
1986 1.05 1.13 1.21 1.54 0.21 2.14
1987 1.33 1.21 1.77 1.44 0.27 2.85
1988 1.86 1.06 2.33 2.14 0.55 1.40
1989 2.10 0.65 2.74 2.43 1.19 1.45
1990 1.55 0.00 1.59 1.94 0.99 2.14
1991 0.92
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my
df. When I want to create the plot I have this problem: Error in
xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ.
I try this code:
library(dplR)
df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL)
write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2010 Feb 17
2
extract the data that match
Hi r-users,
I would like to extract the data that match. Attached is my data:
I'm interested in matchind the value in column 'intg' with value in column 'rand_no'
> cbind(z=z,intg=dd,rand_no = rr)
z intg rand_no
[1,] 0.00 0.000 0.001
[2,] 0.01 0.000 0.002
[3,] 0.02 0.000 0.002
[4,] 0.03 0.000 0.003
[5,] 0.04 0.000 0.003
[6,]
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis
i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values
> dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2009 Sep 09
1
Combining simulated data
R helpers
Please help me combine the simulated data to a form of table where: Hypermarket have 10 rows, supermarket have 15 rows,......., spazashops with 35 rows.
Hypermarket <- rnorm(10, mean=20000, sd=7000)
Supermarket <- rnorm(15, mean=12000, sd=4000)
Minimarket <- rnorm(20, mean=10000, sd=4000)
Cornershop <- rnorm(20, mean= 8000, sd=3000)
Spazashop <- rnorm(35, mean=
2009 Sep 13
2
(no subject)
How would I make a histogram using R from a table in excel that has 4
variables, but I only want to use 2 of the columns to make the histogram?
[[alternative HTML version deleted]]
2009 Sep 15
1
comma as decimal separator in xtable
Hello,
How can I make xtable print a comma as decimal separator? Setting
the option OutDec isn't enough for xtable:
library(xtable)
options(OutDec = ",")
x <- c(1.1, 1.2, 1.3)
y <- c(2.3, 2.2, 2.1)
d <- data.frame(x, y)
d
print(xtable(d))
Thanks!
Jakson Aquino
2009 Sep 16
1
list of symbols to substitution
Hi,
I'm trying to use a list of symbols as one of the values to be
substituted in a substitute expression, but I can't figure out how to
write the correct expression for my problem. Let me illustrate a
simple example of what I'm trying to do. The following code snippet
will evaluate to '5':
symname <- 'foo'
foo <- 5
expr <- substitute(c(expr), list(expr =
2009 Sep 17
1
How to extract data.frame columns using regex?
Hi,
data.frame(x1=1:11,x2=2:12,x3=3:13,y=4:14)
I want to extract all the columns that with the name 'x?'. Is there a
general way to do this in R?
Regards,
Peng
2009 Sep 19
1
random selection from dataset and creating and graphing multiple means
I was wondering if anyone could help me with a problem. I need to randomly
select, say 500 subjects from the 5000 cases I have and then need to run a
test to create 500 sample means and graph the means in a histogram. Does
anyone know how to do this. I'm not that familiar with R so please be
patient with me.
Thanks a lot!
Mike Hollingsworth
--
View this message in context:
2009 Sep 19
1
plotting least-squares residuals against x-axis
Hi,
I want to plot the residuals of a least-squares regression.
plot(lm(y~x), which=1)
does this, but it plots the y-axis of my data on the x-axis of the
residuals plot. That is, it plots the residual for each y-value in the
data. Can I instead use the x-axis of my data as the x-axis of the
residuals plot, showing the residual for a given x?
Thanks!
Jason Priem
University of North
2009 Sep 23
1
set choose.files directory?
Hi,
I've been trying to set the directory for choose.files as follows:
[R2.9.0 running on XP]
setwd("C:/Documents and Settings/2/Data")
getwd()
infile2 = choose.files(filters = Filters[c("txt","All"),], caption =
"Choose ECD datafile")
#<...do a bunch of stuff...>
It appears the working directory isn't updated until after choose.files()