Hi!
I am currently clustering data that is read out of a csv file. The code is:
file <- read.table("/tmp/cluster_input.tmp")
cluster.data <- as.matrix(file[,2:39040])
cluster.dist <- dist(cluster.data)
cluster.hclust <- hclust(cluster.dist)
cluster.hcut <- cutree(cluster.hclust,10) # 10 == number
rusers.sh wrote:
Hi,
I have installed the necessary tools for making a R package under windows
and am sure these tool have been correctly configured. I am very new to try
writing a package, so the error may be very obvious for you. Forgive me if
it is too easy.
My package name is *stam*, and
Hi Maithili,
This is probably easiest if you think in terms of functions. Just
apply 'runif' along the right vectors
## gives you one data frame with the min and max
limits <- read.table(textConnection("name min max
A111.05 1.30
A121.30 1.60
A131.60 1.99"), header = TRUE)
d <- me
On Wed, Dec 16, 2009 at 10:13 PM, Peng Yu wrote:
>
> Currently, I load the RData file then ls() and str(). But loading the file
> takes too long if the file is big. Most of the time, I only interested what
> the variables are in the the file and the attributes of the variables (like
> if it is a d
Hello,
I have the following problem when trying to use rm:
In a top level script file I have a loop iterating over some index. The loop
is not contained within a function, so the scope of variables declared in
the loop is global. Within this loop I generate several variables which
should be remov
In an effort to select the most appropriate number of clusters in a
mixture analysis I am comparing the expected and actual membership of
individuals in various clusters using the Fisher?s exact test. I aim
for the model with the lowest possible p-value, but I frequently get
p-values below 2.2e-16
Søren Faurby biology.au.dk> writes:
>
> In an effort to select the most appropriate number of clusters in a
> mixture analysis I am comparing the expected and actual membership of
> individuals in various clusters using the Fisher?s exact test. I aim
> for the model with the lowest possible p-v
The list argument of rm is supposed to be a character vector, as
indicated in ?rm. not a list.
You can do something like this:
rm( list = Filter( exists, c("rv1","rv2", "rv3", "rv4") ) )
or, considering rm only warns when you attempt to remove objects, you
could:
suppressWarnings( rm( list
On 17/12/2009 5:33 AM, Cormac Long wrote:
Hello,
I have the following problem when trying to use rm:
In a top level script file I have a loop iterating over some index. The loop
is not contained within a function, so the scope of variables declared in
the loop is global. Within this loop I gene
The aylmer package has some functionality in this regard
which you may find useful.
In particular, you can use good() to get a feel for the
number of tableaux that are consistent with the
specified marginal totals:
> good(dat2)
[1] 42285210
> good(dat3)
[1] 2.756286e+12
>
HTH
rksh
Søren
Hi all,
Hi this is kiran
I am facing a problem to split a dataframe
that is..
i have a string like:"a,b,c|1,2,3|4,5,6|7,8,8"
first I have to split with respect to "|"
I did it with command
unlist(strsplit("a,b,c|1,2,3|4,5,6|7,8,8", "\\,"))
after getting that set i made it as a datafram
Søren Faurby wrote:
> In an effort to select the most appropriate number of clusters in a
> mixture analysis I am comparing the expected and actual membership of
> individuals in various clusters using the Fisher?s exact test. I aim
> for the model with the lowest possible p-value, but I frequently
I know that you didn't ask for this but to me this seems to be a very
dodgy method to select a "best number of clusters" with no proper basis at
all. All of these tests are data dependent, so the p-values cannot be
interpreted in the usual way. It is actually not clear how they can be
interpret
Hello,
Sorry to be a bit longwinded, but I've struggled quite a bit with the following
over the last few days. I've read all entries related to spatial
autocorrelation in R help and haven't found what I'm after. If it's okay, I'm
going to first describe my general understanding of the proces
Hi all,
I'm have a matrix (X) with observations as rows and parameters as columns. I'm
trying to exchange all missing values in a column by the column mean using the
code below, but so far, nothing happens with the NAs... Can anyone see where
the problem is?
N<-nrow(X) # Calculate numbe
2009/12/17 Joel Fürstenberg-Hägg :
>
> Hi all,
>
>
>
> I'm have a matrix (X) with observations as rows and parameters as columns.
> I'm trying to exchange all missing values in a column by the column mean
> using the code below, but so far, nothing happens with the NAs... Can anyone
> see where
On 12/17/2009 9:31 AM, Joel Fürstenberg-Hägg wrote:
> Hi all,
>
>
>
> I'm have a matrix (X) with observations as rows and parameters as columns.
> I'm trying to exchange all missing values in a column by the column mean
> using the code below, but so far, nothing happens with the NAs... Can a
Barry Rowlingson wrote:
2009/12/17 Joel Fürstenberg-Hägg :
Hi all,
I'm have a matrix (X) with observations as rows and parameters as columns. I'm
trying to exchange all missing values in a column by the column mean using the
code below, but so far, nothing happens with the NAs... Can any
Hi,
I installed JGR as decribed on website along with all supporting packages. But
when i start R-software JGR doesnt start. if i type "library(JGR)" in front r
prompt, the following error is displayed.
> library(JGR)
Loading required package: iplots
Error in .jinit() : unable to find the basic
On Thu, Dec 17, 2009 at 5:33 AM, Gustaf Rydevik
wrote:
> On Wed, Dec 16, 2009 at 10:13 PM, Peng Yu wrote:
>>
>> Currently, I load the RData file then ls() and str(). But loading the file
>> takes too long if the file is big. Most of the time, I only interested what
>> the variables are in the the
On Dec 17, 2009, at 8:11 AM, venkata kirankumar wrote:
Hi all,
Hi this is kiran
I am facing a problem to split a dataframe
that is..
i have a string like:"a,b,c|1,2,3|4,5,6|7,8,8"
first I have to split with respect to "|"
I did it with command
unlist(strsplit("a,b,c|1,2,3|4,5,6|7,8,8"
Hello -- I am trying to create a dataframe whose rows are the cross product of
rows in two other dataframes. Here's an example:
A = data.frame(F1=c('1','2','3','2'))
B = data.frame(F2=c('4','5'))
C = data.frame()
for (x in unique(A[,'F1'])) {
C = rbind(C, cbind(F1=x,B))
}
How can I achieve t
Hello Everyone,
Â
Iâm a SAS user who has recently become interested in sequential clinical
trials designs. Iâve discovered that the SASÂ based approaches for these
designs are either too costly or are âexperimental.â So now Iâm looking
for alternative software. Two programs that seem
On Dec 17, 2009, at 9:47 AM, Chuck White wrote:
Hello -- I am trying to create a dataframe whose rows are the cross
product of rows in two other dataframes. Here's an example:
A = data.frame(F1=c('1','2','3','2'))
B = data.frame(F2=c('4','5'))
C = data.frame()
for (x in unique(A[,'F1'])) {
Hello,
Does anybody know if (and how) it is possible to obtain standard errors of
estimated variances from StructTS? (R 2.10.0).
Thank you in advance,
Giovanni
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE d
Dear Duncan,
I just followed an example to try making a package. The problem is really
on the useDynLib. It works after i delete it.
Thanks a lot.
2009/12/17 Duncan Murdoch
> rusers.sh wrote:
>
>> Hi,
>> I have installed the necessary tools for making a R package under windows
>> and am sure
Hi,
I am using R and I want to know how data can be transferred from Excel
Spread sheet to R for analyzing. I have done like this
mydata<-read.table("C:\Documents and Settings\admin\Desktop\data.txt");
but its not working how can i do it
You'll probably want to take a look at the CRAN Task View,
http://cran.r-project.org/web/views/ClinicalTrials.html
david freedman
Paul Miller wrote:
>
> Hello Everyone,
> Â
> Iâm a SAS user who has recently become interested in sequential clinical
> trials designs. Iâve discovered that th
Well, first of all it doesn't look like you're trying to read an excel file as
the file you are trying you specify is "data.txt" not "data.xls".
Try:
library(gdata)
?read.xls
HTH,
Patrick
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Hey,
If you want to read it in as a text file, make sure to have Excel save it as
a text file first. For instance, a tab delimited text file. Then you could
read it in with
mydata <- read.table("myfile.txt", sep="\t")
HTH,
Josh
On Thu, Dec 17, 2009 at 9:24 AM, wrote:
> Hi,
> I am using R
Hi All,
I was wondering if anybody had experience running R on amazon's ec2
"cloud"? More specifically, has anybody created an "amazon machine
image" (AMI) for use with it? I was wondering if there was a quantian
type image available as an amazon machine image, maybe running debian
or ubuntu?
Hi Sarath, try
"C:\\Documents and Settings\\admin\\Desktop\\data.txt"
or
"C:/Documents and Settings/admin/Desktop/data.txt"
or yet
setwd("your path")
mydata<-read.table("data.txt")
cheers
miltinho
On Thu, Dec 17, 2009 at 12:24 PM, wrote:
> Hi,
> I am using R and I want to know how data can
Go to:
http://biocep-distrib.r-forge.r-project.org/
Choose "documentation", scroll own you will see a section called:
"Biocep-R on Amazon's Cloud"
-roy M.
On Dec 17, 2009, at 9:55 AM, Blair Christian wrote:
> Hi All,
>
> I was wondering if anybody had experience running R on amazon's ec2
>
On 17 December 2009 at 12:55, Blair Christian wrote:
| Hi All,
|
| I was wondering if anybody had experience running R on amazon's ec2
| "cloud"? More specifically, has anybody created an "amazon machine
| image" (AMI) for use with it? I was wondering if there was a quantian
| type image availa
On Dec 17, 2009, at 11:24 AM, sta_2...@spectrum.net.in wrote:
Hi,
I am using R and I want to know how data can be transferred from
Excel
Spread sheet to R for analyzing. I have done like this
mydata<-read.table("C:\Documents and Settings\admin\Desktop
\data.txt");
but its not working
On Dec 17, 2009, at 9:58 AM, Paul Miller wrote:
Hello Everyone,
I’m a SAS user who has recently become interested in sequential
clinical trials designs. I’ve discovered that the SAS based
approaches for these designs are either too costly or are
“experimental.” So now I’m looking for alte
--- begin original message ---
I am trying to write my own split function for rpart. The aim is to do,
instead of anova, a linear regression to determine the split (minimize
some criterion like sum of rss left and right of the split). The
regression (lm) should simply use the dependent and independ
Check out these notes:
http://wiki.r-project.org/rwiki/doku.php?id=tips:data-io:ms_windows
and note that within quotes you must double each backslash so one
writes "c:\\mydirectory\\abc.xls" for example.
On Thu, Dec 17, 2009 at 12:24 PM, wrote:
> Hi,
> I am using R and I want to know how dat
Thanks Gray,
This helps, I'd completely forgotten about the subset command. However, it
doesn't quite get me where I need. Perhaps an example will help. I will
simplify my dataframe to the three important variables:
ESR_ref ESR_ref_editLoaded
1.1 1.1 Y
1.1.1
I have some data that i ran a regression on and got the usual r output, with
the a intercept and b coefficient for my independent variable.
i want to forecast the number of future events using these parameters.
What function / packages in R would you recommend to be used in good effect
for the
?predict
HTH
Stephan
DispersionMap schrieb:
I have some data that i ran a regression on and got the usual r output, with
the a intercept and b coefficient for my independent variable.
i want to forecast the number of future events using these parameters.
What function / packages in R would
On Thu, Dec 17, 2009 at 9:24 AM, wrote:
>
> Hi,
> I am using R and I want to know how data can be transferred from Excel
> Spread sheet to R for analyzing. I have done like this
>
> mydata<-read.table("C:\Documents and Settings\admin\Desktop\data.txt");
>
>
> but its not working how can i do it
Dear R-specialists,
I am trying to create a Makefile that will first convert all my .Rnw
files into .tex files and then, that will run the LaTeX compiler to
produce a pdf document. This issue has been discussed before. Hence,
I've basically adapted a Makefile I found at
http://n4.nabble.com/R
Is it possible to read fortran binaries with R? I tried unsucessfully and my
understanding is that fortran write binaries with leading and trailing
bytes. I get numbers but not the right ones.
Thanks
ps: the binary I'm interested in reading is a MODFLOW output with a mix of
character, double and i
On 17/12/2009 3:48 PM, kapo coulibaly wrote:
Is it possible to read fortran binaries with R? I tried unsucessfully and my
understanding is that fortran write binaries with leading and trailing
bytes. I get numbers but not the right ones.
Thanks
ps: the binary I'm interested in reading is a MODFL
On 17/12/2009 3:48 PM, kapo coulibaly wrote:
Is it possible to read fortran binaries with R? I tried unsucessfully and my
understanding is that fortran write binaries with leading and trailing
bytes. I get numbers but not the right ones.
Thanks
ps: the binary I'm interested in reading is a MODFL
Dear All,
Does anybody know whether the package ROracle_0.5-9 does compile and run
on Windows Vista?
(Since I do not have Oracle I am not able to test this myself.)
I have tried to contact the maintainer of ROracle but it seems that the
email address is no longer valid.
Best regards
Christi
Or copy a rectangle of data in Excel, then grab it from the clipboard in R as
follows:
my.data <- read.table("clipboard",head=TRUE,sep='\t')
cheers,
Steve
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https:
Hi Luc,
I haven't been actively participating in this list for that long, so
I may be wrong here... but I suspect that debugging makefiles is a bit
off topic. Two quick points that might help: You probably want to use
"R CMD texi2dvi" on your tex files instead of pdflatex; and you'll
probably h
Hi
I am really struggling jsut putting the labels on the leaves of my dendrogram.
I have a dendrogram that i create using the hclust/as.dendrogram commands.
I then plot it...but i want to feed a file/list that contains all the labels of
the leaves of a dendrogram and others
that way if R finds
The structure of the file is clear (see below) the first line is made of
integers and doubles with the fifth being a text string followed by arrays
of double precision number.:
int1 int2 double1 double2 text int3 int4 int5
(array of double)
here is an example of file:
1 1 1.0 1.0 "HEAD" 160 224 3
Duncan,
I couldn't find clear details about the way fortran writes the binaries. I
was hoping someone here has done it before. But the hexView package seems
like a great idea i'll give it a shot.
Thanks a bunch
On Thu, Dec 17, 2009 at 4:02 PM, Duncan Murdoch wrote:
> On 17/12/2009 3:48 PM, kapo
Hi all,
I'm trying to find a way to get a log-rank and Wilcoxon p-value of two
single groups in a survfit() of coxph model (2 strata covariates). Is there
a quick way to this information? survdiff() does not work with coxph model.
--
Regards,
Anh Tran
[[alternative HTML version deleted]
On 17/12/2009 3:19 PM, Luc Villandré wrote:
Dear R-specialists,
I am trying to create a Makefile that will first convert all my .Rnw
files into .tex files and then, that will run the LaTeX compiler to
produce a pdf document. This issue has been discussed before. Hence,
I've basically adapted
On 17/12/2009 4:30 PM, kapo coulibaly wrote:
The structure of the file is clear (see below) the first line is made of
integers and doubles with the fifth being a text string followed by arrays
of double precision number.:
int1 int2 double1 double2 text int3 int4 int5
(array of double)
here is an
How can I get the result of, e.g., poly(1:3. degree=2) to give me the
unnormalized integer coefficients
usually used to explain orthogonal polynomial contrasts, e.g,
-1 1
0 -2
1 1
As I understand things, the columns of x^{1:degree} are first centered
and then
are normalized by 1/sqrt(col
Does this do what you want.
> x <- "a,b,c|1,2,3|4,5,6|7,8,8"
> x.1 <- strsplit(x, "[|]")
> x.1
[[1]]
[1] "a,b,c" "1,2,3" "4,5,6" "7,8,8"
> x.2 <- lapply(x.1, strsplit, ',')
> x.2
[[1]]
[[1]][[1]]
[1] "a" "b" "c"
[[1]][[2]]
[1] "1" "2" "3"
[[1]][[3]]
[1] "4" "5" "6"
[[1]][[4]]
[1] "7" "8" "8"
> do
Dear R family
I have an arbitrary column vector.
1
2
4
0
7
5
0
0
0
9
11
12
When I attempt to take natural logarithm of the series, as you guess
there is an error message. To overcome this problem, my idea is to
replace a zero or zeros in a row with appropriate numbers.
In order to implement it, I
Does this do what you want:
> x
[1] 1 2 4 0 7 5 0 0 0 9 11 12
> # create a matrix with the first column being a sequence number
> x.mat <- cbind(seq(length(x)), x)
> # remove zeros in second column
> x.mat <- x.mat[x.mat[,2] != 0,]
> x.mat
x
[1,] 1 1
[2,] 2 2
[3,] 3 4
[4,
The easiest thing might be to just sort on the Loaded column:
start of example
d <- read.table(textConnection("ESR_ref ESR_ref_editLoaded
1.1 1.1 Y
1.1.11.1 NC
1.1.21.1 Y
2.1 2.1 N
2.1.
Hi R Users,
Is there a equivalent function for the following R code in Lattice package.
I want to plot a grouped box plots (grouped by two factors).
g <- rep.int(c("A", "B", "C", "D"), 125)
t <- rnorm(5000)
a <- sample(t, 500, replace=TRUE)
b <- sample(t, 500, replace=TRUE)
dta <- data.frame(val
Try this:
bwplot(val ~ g | G2, dta)
On Thu, Dec 17, 2009 at 9:34 PM, Gary Miller wrote:
> Hi R Users,
>
> Is there a equivalent function for the following R code in Lattice package.
> I want to plot a grouped box plots (grouped by two factors).
>
> g <- rep.int(c("A", "B", "C", "D"), 125)
> t <
@ Gabor: Thanks, it worked.
@ All: Which options I should explore to change the appearance of boxes.
Like,
1. Color change.
2. Fill-in boxes with colors.
3. Change dot to line (used to represent median)
4. No gaps between boxplots in each category.
# R Code:
g <- rep.int(c("A", "B", "C", "D"), 1
Look at ?panel.bwplot specifically 'fill', 'pch', and 'box.width'.
2009/12/18 Gary Miller :
> @ Gabor: Thanks, it worked.
>
> @ All: Which options I should explore to change the appearance of boxes.
> Like,
>
> 1. Color change.
> 2. Fill-in boxes with colors.
> 3. Change dot to line (used to rep
I'm writing a package, and would appreciate advice on controlling the
help documentation cross-references for a redefined generic.
I wanted to define a cbind equivalent for an object that mostly behaves
like a data frame. base::cbind dispatches to a data frame method if
_any_ parameter is a data f
Hi Michael,
If I remember right, this question has been asked several times on
this mailing list in the past. The reference listed in the help page
for poly explain how to get the un-orthogonalized coefficients, but
those coefficients aren't needed for prediction. For more details,
though, sear
Hello,
We are using frailty models to estimate risk of one year death. Is there a
way to generate survival curves adjusted for covariates and also include
frailty term?
Any help will be much appreciated!
Thanks!
LV
[[alternative HTML version deleted]]
___
Hi All,
is there a way to download data from metastock to R-software. most of my data
is in date,OHLC format downloaded from reuters to metastock software in my
local pc.
many thanks for the help.,
krishna
[[alternative HTML version deleted]]
On Dec 17, 2009, at 11:47 PM, Lakshmi Venkitachalam wrote:
Hello,
We are using frailty models to estimate risk of one year death. Is
there a
way to generate survival curves adjusted for covariates and also
include
frailty term?
Is there really only _one_ way to generate such estimates?
I wanted to do a simple plot: Death Rate vs Clinical Site, and then draw a
confidence interval of Death Rate at each clinical site, which is a factor
variable with 100 levels. I used the following code:
plot(Site, Rate, col="red", type="o")
However, the graph was a short line at each site instea
Hello,
I'm trying to test for the joint equality of coefficients of the same model
across different subsets of the data (ie, is it necessary to estimate the same
model on these different populations, or can I just estimate the model once on
the whole dataset?).
My plan is to use the F-test on
I have been trying to get the Ryacas package to work without any
success. I do not seem to be able to the "Sym" function work, for
example:
> library(XML)
> library(Ryacas)
> a=Sym("a")
> a
Error in summary.connection(x) : invalid connection
I am windows XP with R 2.10
Thanks for you help
g
Hi R users,
I have a statistical question. If I have two repeated measures models such
as,
m1, y=u+a+time+a:time+e
m2, y=u+b+time+b:time+e
How can I compare these two models (such as which one is the better
predictor, a or b)?
Many Thanks In Advance.
Chunhao
--
View this message in context:
htt
Dear all,
Here is my code which am using to combine 5th column from different data
sets.
Here is the function to do my job
genesymbol.append.file <-NULL
gene.column <- NULL
readGeneSymbol <- function(files,genesymbol.column=5){
for(i in fnames){
temp <- read.table(fnames,header=T,sep="\t",str
I am running multiple GAMs using the step.gam function and am receiving an
error. I have copied my code and bolded the error at the bottom. Any help is
greatly appreciated.
trout.gam2<-gam(cpue~s(lat,7)+as.factor(gear)+as.factor(bottom)+s(depth,7)+s(do,7)+s(sal,7)+s(temp,7),family=quasipoisson,
Hi All,
I am a windows user and I would like to run several R scripts one after the
other, I was wondering if that is possible to do on windows instead of
clicking on each script to run it.
Thanks
--
View this message in context:
http://n4.nabble.com/How-to-run-several-scripts-tp972862p97286
Dear R users,
I am having a problem performing the mantel test (both with functions mantel
{vegan} and mantel.test {ape}) due to I believe the presence of NAs on my
distance matrices, which look like e.g.:
NA
12
12 3
NA 4 5 6
and
1
1 2
2 3 4
5 6 7 8
Would any of you
Hi, all. I'm using hist() to obtain a vector of break values in an interval.
I then want to be able to identify which cell any value from another vector
falls in.
E.g. applying
> breaks
[1] -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0
to
> x
[1] -3.74519666 -0.38183630 -1.2288
Hi All,
I always have a problem with write.csv when I want the column names to be
ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc.
for example I tried
write.csv(mydata, file="data.csv", quote=FALSE, row.names=F, col.names=F)
Warning message:
In write.csv(mydata, file = "
Write a new script as the following
source("path/1.R")
source("path/2.R")
R will execute these scripts in sequence.
Guo-Hao Huang
--
From: "kayj"
Sent: Friday, December 18, 2009 3:01 AM
To:
Sub
?write.table
On Thu, Dec 17, 2009 at 6:52 PM, kayj wrote:
>
> Hi All,
>
> I always have a problem with write.csv when I want the column names to be
> ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc.
>
> for example I tried
>
> write.csv(mydata, file="data.csv", quote=FALSE
On 12/18/2009 06:35 AM, Doug Hill wrote:
Hi, all. I'm using hist() to obtain a vector of break values in an interval.
I then want to be able to identify which cell any value from another vector
falls in.
E.g. applying
breaks
[1] -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1
82 matches
Mail list logo