I am working on morphometry of hairs and want to see if selected variables
are giving significantly distinct groups.
I am new to both R and principal coordinate analysis. Scatter plot is
showing distinct groups but i dont know how to refine the analysis and
interprete it.
[[alternative HT
Mmm... sorry, psychic powers not working today.
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---
Jeff NewmillerThe . . Go Live...
DCN:
https://stat.ethz.ch/pipermail/r-help/2012-November/329438.html
>> summary: how to convert a 3D array (as obtained from ncdf4::ncvar_get)
>> to a dataframe suitable for use by lattice::levelplot(), e.g.,
>> levelplot(conc ~ lon * lat | lev, data = data.frame)
much detail omitted ...
>> I'm gues
On Nov 17, 2012, at 5:50 PM, Tania Patiño wrote:
Hello all, could you tell me if there is an example like this one that
appears on the next link:
http://www.inside-r.org/packages/cran/bootstrap/docs/scor
related to the Open/Closed Book Examination Data but in R version
2.15.2 ?
Because I
Hi all,
I'm writing a function that summarizes objects, however, when a Date
variable is present in the objects it doesn't work. How can I handle with
this problem?
D
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEA
Errr... You could reshape to a long format data.frame but an arguably
easier way:
dimnames(array.3d) <- list(lat= 1:7 , long = 1:11 , lev = 1:5) # not needed
just for clarity
levelplot(array.3d)
On Sat, Nov 17, 2012 at 9:36 PM, Tom Roche wrote:
>
> summary: how to convert a 3D array (as obtaine
summary: how to convert a 3D array (as obtained from ncdf4::ncvar_get)
to a dataframe suitable for use by lattice::levelplot(), e.g.,
levelplot(conc ~ lon * lat | lev, data = data.frame)
details:
I have atmospheric data in netCDF files specifying gas concentrations
over a 3D space with dimensio
Matthieu
(regarding the final question, but not the ones before that.)
The short answer is that you seem to have a solution, since hessian in
numDeriv works. The long answer follows.
Outside a constraint area one cannot assume that a function will
evaluate properly. Some constraints are impo
HI,
May be this helps:
set.seed(18)
A<-matrix(sample(1:4000,15*365,replace=TRUE),ncol=15)
set.seed(25)
B<-sample(1:800,1*365,replace=TRUE)
res<-do.call(rbind,lapply(split(A,col(A)),function(x) dist(rbind(x,B
head(res)
# [,1]
#1 37812.43
#2 38258.21
#3 39025.13
#4 37572.35
#5 37885.32
#6
I may not understand correctly, but you have a matrix A with 15 rows
and 365 columns and a second matrix B with 1 row and 365 columns.
You say you want to compute the Euclidean distance between the first
column of A (15 numbers) against B. That won't work since the first
column of B is a single num
Hi R,
I installed wget and tried to download the file from this
http://nseindia.com/content/equities/scripvol/datafiles/16-11-2012-TO-16-11-2012ACCEQN.csv
but it fails.
How to get it using wget?
thanks
veepsirtt
#Define Working Directory, where files would be saved
setwd('G:/NIFTY')
#Define sta
I also had issues installing the rggobi package into R (v 2.14, 32 bit on
Vista 64) .
I believe the problem rests in the install script. It has minor typos. I
did manage to find an install script that did work. Try pasting this into
R.
source("http://www.ggobi.org/downloads/install.r";)
Dear Users,I have two matrices A=15*365 and B=1*365. i want to calculate
"Euclidean Distance" between these matrices in such a way that i should have
euclidean distance of matrix B against all the columns of matrix A. More
precisely, first i want euclidean dist. of column 1 of A against B, then
Hello all, could you tell me if there is an example like this one that
appears on the next link:
http://www.inside-r.org/packages/cran/bootstrap/docs/scor
related to the Open/Closed Book Examination Data but in R version 2.15.2 ?
Because I search the data(scor) on the environment R version 2.15.
On Nov 17, 2012, at 4:05 PM, arun wrote:
HI,
If the order of individuals are changed or if some individuals are
missing, this method may need modification.
ind <- c('1','3','4','8')
fam <- c('1','2','1','2')
dat1 <- data.frame(ind,fam)
combn( row.names(dat1), 2, FUN = function(b){
Thank you Michael and David. I am onto agrep and adist and they look very
useful for what I am wanting to do. My initial results are promising!
Brian
On Nov 17, 2012, at 6:20 PM, R. Michael Weylandt wrote:
> On Sat, Nov 17, 2012 at 11:00 PM, Brian Feeny wrote:
>> I am looking for a library/
On Nov 17, 2012, at 9:55 AM, Vittoria Roncalli wrote:
Hi,
I am really new to edge R and I have used it to calculate gene
expression
with RNASeq data comparing 2 different conditions.
I used a P value of 0.05 and I got a list of DGE contigs up and down
regulated.
WhatI was wondering is how to
HI,
If the order of individuals are changed or if some individuals are missing,
this method may need modification.
ind <- c('1','3','4','8')
fam <- c('1','2','1','2')
dat1 <- data.frame(ind,fam)
combn( row.names(dat1), 2, FUN = function(b){
if (dat1[b[1], "fam" ] != dat1[b
On Nov 17, 2012, at 3:20 PM, R. Michael Weylandt wrote:
> On Sat, Nov 17, 2012 at 11:00 PM, Brian Feeny wrote:
>> I am looking for a library/function in R that can compare two phrases and
>> give me a score, or somehow classify them as correct as possible.
>>
>> The "phrases" are obfuscated/me
On Nov 17, 2012, at 10:07 AM, benjamin_jarrett wrote:
> Hi David,
>
> Thanks for replying. Unfortunately I can't get it to work. Here is some
> (very simplified) data to help illustrate my problem.
>
> ind <- c('1','2','3','4')
> fam <- c('1','2','1','2')
> data <- data.frame(ind,fam)
>
> ind
On Sat, Nov 17, 2012 at 11:00 PM, Brian Feeny wrote:
> I am looking for a library/function in R that can compare two phrases and
> give me a score, or somehow classify them as correct as possible.
>
> The "phrases" are obfuscated/messy. I am not concerned about which is
> "correct" (for example
I am looking for a library/function in R that can compare two phrases and give
me a score, or somehow classify them as correct as possible.
The "phrases" are obfuscated/messy. I am not concerned about which is
"correct" (for example spell checking), I am only concerned in grouping them
so that
Could it be that my data is showing up as factors ?
> class(x)
1] "data.frame"
str(x)
data.frame':284 obs. of 3 variables:
$ Region : Factor w/ 4 levels "AP","EU","LA",..: 1 1 1 1 1 1 1 1 1 1 ...
$ YearMon: int 200701 200702 200703 200704 200705 200706 200707 200708 200709
200710 ...
$ kg
Didn't try the other two methods as I spent a bit of time trying to learn
about reshape2. I was also able to melt the data and that went fine
(although based on your post, melting is not needed).
Any ideas on why reshape2 dcast is giving fits ?
--
View this message in context:
http://r.78969
What am I doing wrong ? Using the method you proposed on SLIGHTLY different
data.
> head(x)
Region YearMon kg
AP 200701 290,311
AP 200702 322,671
AP 200703 216,600
AP 200704 450,711
AP 200705 245,215
AP 200706 212,492
j <-dcast(x,YearMon~Region,value.va
Hi David,
Thanks for replying. Unfortunately I can't get it to work. Here is some
(very simplified) data to help illustrate my problem.
ind <- c('1','2','3','4')
fam <- c('1','2','1','2')
data <- data.frame(ind,fam)
ind is the unique ID for each individual, and fam is which family the
individual
HI,
Just a modification of Rui's function:
fun1<-function(x){
r1<-unlist(strsplit(x,"L\\d+|G|P|S|max|mean|10"))
r1<-r1[r1!=""]
r2<-r1[!grepl("\\_",r1)]
r3<-integer(length(x))
r3[grepl("^L",x)]<-gsub("L(\\d+).*","\\1",x[grep("L\\d+",x)])
r3[grepl("_\\d+$",x)]<-gsub("[\\_]","",r1[grepl("\\_",r1)])
That works! Thanks for the help, but I can't seem to figure out why this
happens with even one contour in the example below:
Disclaimer: using MNI template from FSL (
http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases).
Firefox still has array initialiser too large for this one contour, but
Safari and
Hi,
I am really new to edge R and I have used it to calculate gene expression
with RNASeq data comparing 2 different conditions.
I used a P value of 0.05 and I got a list of DGE contigs up and down
regulated.
WhatI was wondering is how to convert the logFC value that appear in the
output of the exa
Seems like this should be easy but I'm struggling a bit. How do I rearrange a
data frame to go from the first one to the second shown below ?
State Datelbs
TX 200701 400
TX 200702 650
TX 200703 950
TX 200704 1000
FL 200701 200
FL
Thanks very much Arun!
Murray
On 18/11/12 11:07 AM, arun wrote:
HI,
There were some "spaces" inside the quotes that created the problem.
reg <-
structure(c(6L, 6L, 1L, 7L, 1L, 1L, 1L, 5L, 2L, 1L, 6L, 3L, 1L,
1L, 7L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 7L, 6L, 6L, 1L, 1L, 1L, 1L,
6L, 2L, 7L), .Label =
HI,
There were some "spaces" inside the quotes that created the problem.
reg <-
structure(c(6L, 6L, 1L, 7L, 1L, 1L, 1L, 5L, 2L, 1L, 6L, 3L, 1L,
1L, 7L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 7L, 6L, 6L, 1L, 1L, 1L, 1L,
6L, 2L, 7L), .Label = c(" auckland", " christchurch", " hb",
" manawatu", " taranak
On 12-11-17 4:34 PM, Brian Feeny wrote:
On Nov 17, 2012, at 4:27 PM, Duncan Murdoch wrote:
I would suggest reading the help file: read.delim only looks at the
first 5 lines to determine the number of columns if you don't specify
the colClasses.
Duncan Murdoch
Duncan,
I have tried to pas
Duncan,
I believe I follow you now, I have done like so with expected results:
ncol <- max(count.fields("paths.txt", sep = "|"))
test <- read.delim("paths.txt", sep="|", quote=NULL, header=F,
colClasses="character", fill=TRUE, col.names = paste("V", seq_len(ncol), sep =
""))
Thank you for you
On Nov 17, 2012, at 4:27 PM, Duncan Murdoch wrote:
>>
>
> I would suggest reading the help file: read.delim only looks at the first 5
> lines to determine the number of columns if you don't specify the colClasses.
>
> Duncan Murdoch
>
Duncan,
I have tried to pass colClasses but R complains
Greetings from New Zealand.
I hope that my difficulties are clear from the following output. Ideas
gratefully received!
Murray Jorgensen
cc <- scan()
3000 3500 2500 2500 3000 3000 3000 3000 3000 2000
2000 2000 2000 4800 3000 4500 3000 2000 2000 4400
3000 3000 2500 3000 3000 2000 3000 2000 20
On 12-11-17 4:18 PM, Brian Feeny wrote:
I am trying to read in a pipe delimited file that has rows with varying number
of columns, here is my sample data:
A|B|C|D
A|B|C|D|E|F
A|B|C|D|E
A|B|C|D|E|F|G|H|I
A|B|C|D
A|B|C|D|E|F|G|H|I|J
You can see line 6 has 10 columns. Yet, I can't explain why R
On 12-11-17 3:11 PM, Duncan Murdoch wrote:
On 12-11-17 1:51 PM, John Muschelli wrote:
That works! Thanks for the help, but I can't seem to figure out why
this happens with even one contour in the example below:
Disclaimer: using MNI template from FSL
(http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlas
I am trying to read in a pipe delimited file that has rows with varying number
of columns, here is my sample data:
A|B|C|D
A|B|C|D|E|F
A|B|C|D|E
A|B|C|D|E|F|G|H|I
A|B|C|D
A|B|C|D|E|F|G|H|I|J
You can see line 6 has 10 columns. Yet, I can't explain why R does like so:
> test <- read.delim("mypat
David and Rainer,
Thank you both for your responses, you got me on track, I ended up just doing
like so:
trainset <- read.csv('train.csv',head=TRUE)
trainset[,-1] <- binarize(trainset[,-1])
trainset$label <- as.factor(trainset$label)
I appreciate your help
Brian
On Nov 17, 2012, at 11:25 AM
On 17-11-2012, at 19:54, Saptarshi Guha wrote:
> I'm trying to install a package on OS X (Snow Leopard) using the following
> command, but instead of respecting the arch directive it install i386.
1. This belongs on R-SIG-Mac.
And it didn't install the x86_64 architecture?
Are you sure?
Any er
On 12-11-17 1:51 PM, John Muschelli wrote:
That works! Thanks for the help, but I can't seem to figure out why
this happens with even one contour in the example below:
Disclaimer: using MNI template from FSL
(http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases).
Firefox still has array initialiser to
The warning
1: In (ind.c == TRUE) & (ind.sgn == TRUE) :
longer object length is not a multiple of shorter object length
means that ind.c and ind.sgn have different lengths, for whatever reason.
Although R continues the routine, the warning should, in general, not be
ignored.
Try:
1:3 + 1:2
Hello,
Why don't you keep it on the list? I'm Ccing R Help.
If you put print statements just before the any(),
print(ind.c)
print(ind.r)
print(ind.sgn)
you'll see that all values are FALSE. So the problem is _not_ with
any(). You must look somewhere else on the function.
Hope this helps,
Hello,
First of all, that's not an error message, it's a warning.
As for your condition, it's too complicated. You don't need to test a
logical value for equality to TRUE, it's redundant. And any(x, y) is
equivalent to any(x, y, x & y). Try
any(ind.c, ind.r, ind.sgn)
and you'll be fine.
Hope
I'm trying to install a package on OS X (Snow Leopard) using the following
command, but instead of respecting the arch directive it install i386. How
can this be resolved?
R --arch=x86_64 CMD INSTALL
* installing to library
â/Library/Frameworks/R.framework/Versions/2.15/Resources/library
Dear R users,
I have the "any" function of R
any(ind.c, ind.r, ind.sgn)
all are logical factors
it works fine when any of three is true
but when they are combined it doesnt work.
i tried
this
any(ind.c, ind.r, ind.sgn,((ind.c==TRUE) & (ind.r==TRUE)),
((ind.c==TRUE) & (ind.sgn==TRUE)),((ind.
On Nov 17, 2012, at 8:56 AM, FJ M wrote:
attach(attach(dat))
should be
attach(dat)
Is attach() broken? I've been using attach() successfully for
months. I was surprised that header=TRUE did not map the headers to
the data.
???. 'header=TRUE' changes how read.table() and derivatives han
On Sat, Nov 17, 2012 at 4:56 PM, FJ M wrote:
>
> attach(attach(dat))
>
> should be
>
> attach(dat)
>
> Is attach() broken? I've been using attach() successfully for months. I was
> surprised that header=TRUE did not map the headers to the data. But since
> attach() worked, I've never asked for a
attach(attach(dat))
should be
attach(dat)
Is attach() broken? I've been using attach() successfully for months. I was
surprised that header=TRUE did not map the headers to the data. But since
attach() worked, I've never asked for an enhancement to the various read
functions.
Thanks,
F
On Nov 17, 2012, at 7:41 AM, Omphalodes Verna wrote:
Dear list!
I would like to write a function to transform matrix, which is input
argument of a written function. It is easy with new matrix (see
below), but my idea is to transform input argument (matrix) of
function without any additio
Hello,
Your function fun2 (in fact both of them) changes a _copy_ of df1, not
df1 itself. To have a copy of the output of fun2 you need to assign the
value of fun2 outside it.
df2 <- fun2(df1)
Now df2 has what you want. (If I understand it well.)
Hope this helps,
Rui Barradas
Em 17-11-2012 1
On 11/17/2012 4:38 AM, bgnumis wrote:
> Hi all,
>
> I attach a picture, with my output plot.
>
> I put this command to obtain it:
>
> hist(MCT[,2],probability=TRUE,xlab=" ",ylab="Max",main="M distribution")
> lines(density(MCT[,2]), lwd = 2)
>
> The problem is that when I extract the "bell" is too
On Nov 17, 2012, at 4:29 AM, FJ M wrote:
dat=read.csv("c:\\ven.csv",header=TRUE,sep=";");
attach(attach(dat))
It is generally less error prone to avoid attach (even once).
dat
lm.1<-lm(ve~ su)
And instead use:
lm.1<-lm(ve~ su, data=dat)
summary(lm.1)
GL Frank
Date: Fri, 16 Nov 2012 2
On Nov 16, 2012, at 9:39 PM, Brian Feeny wrote:
I have a dataframe that has a header like so:
class value1 value2 value3
class is a factor
the actual values in the columns value1, value2 and value3 are
0-255, I wish to binarize these using biclust.
I can do this like so:
binarize(dat
On 12-11-17 5:38 AM, bgnumis wrote:
Hi all,
I attach a picture, with my output plot.
I put this command to obtain it:
hist(MCT[,2],probability=TRUE,xlab=" ",ylab="Max",main="M distribution")
lines(density(MCT[,2]), lwd = 2)
The problem is that when I extract the "bell" is too high? And the hi
On Nov 16, 2012, at 6:05 PM, Georges Dupret wrote:
This works ok:
cox = coxph(surv ~ bucket*(today + accor + both) + activity, data =
data)
fit = survfit(cox, newdata=data[1:100,])
but using strata leads to problems:
cox.s = coxph(surv ~ bucket*(today + accor + both) +
strata(activity
On Wed, Nov 14, 2012 at 8:23 PM, Sam Asin wrote:
> Hello,
>
> I am fairly new with R and am having trouble finding an optimal group. I
> checked the help functions for the various optimize commands and it was a
> little over my head.
>
> I have a dataset with 4 columns, name, type, value, and cos
HI,
Try this:
ke$b<-ave(ke$a,ke$patid,FUN=max)
ke
# patid a b
#1 1 1 2
#2 1 2 2
#3 1 2 2
#4 2 1 1
#5 3 1 2
#6 3 2 2
A.K.
- Original Message -
From: Kemi Racheal
To: R-help@r-project.org
Cc:
Sent: Saturday, November 17, 2012 3:56 AM
Subject: [R] manipulating
Dear list member,
I have the following data example
ke <- data.frame(patid=c(1,1,1,2,3,3),a=c(1,2,2,1,1,2))
I want to add another variable b, such that the max of 'a' by id is returned
i.e data ke becomes
ke <- data.frame(patid=c(1,1,1,2,3,3),a=c(1,2,2,1,1,2),b=c(2,2,2,1,2,2))
Any help will be a
I'm afraid I don't really understand what you're searching for, but
note that your functions can be written without assignment/return:
fun3 <- function(x) invisible(cbind(xy[,1], xy[,2], xy[,1] + xy[,2]))
Cheers,
Michael
On Sat, Nov 17, 2012 at 3:41 PM, Omphalodes Verna
wrote:
> Dear list!
>
>
Dear list!
I would like to write a function to transform matrix, which is input argument
of a written function. It is easy with new matrix (see below), but my idea is
to transform input argument (matrix) of function without any additional
matrixes. Here is an example:
fun1 <- function(xy) {
x
Hello,
I don't know if this is general purpose but try
x <- scan(what = "character", text="
L1o3maxG10
L1o3P10
L2o3G10
noxP10
pm25S_01
comeanS_03
noxP_04")
fun <- function(x){
r1 <- unlist(strsplit(x, "L[[:digit:]]+|G|P|S"))
r1 <- r1[nchar(r1) != 0]
r1 <- r1[rep(c(TRUE, FALSE), len
If I understand your goal (still fuzzy) -- why don't you factor out
the bits you want to calculate repeatedly into their own little
utility function? That's just basic stuctured programming.
On Thu, Nov 8, 2012 at 5:25 PM, frespider wrote:
> Hi,
>
> I edit my post, Can you please help with this m
On Thu, Nov 15, 2012 at 7:49 PM, Sam Asin wrote:
> Hey,
>
> It's actually not homework, what gave you that impression?
Real data sets don't usually have people named A,B,C with wages 3,4,5. ;-)
To your question at hand, it's close to a classic problem in
combinatorial optimization known as the k
If you read the posting guide mentioned at the bottom of every list message, it
indicates that this is not really a forum for statistics theory discussions.
Once you understand the theory well enough to know which algorithms you want to
use (and the assumptions that go along with them), there a
See
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
Michael
On Sat, Nov 17, 2012 at 12:56 PM, Gonçalo Ferraz wrote:
> I just found a problem that may be causing an error in a computation with
> very small numbers:
>
> I tell R that
>
> thetaP <
On Sat, Nov 17, 2012 at 12:29 PM, FJ M wrote:
>
> dat=read.csv("c:\\ven.csv",header=TRUE,sep=";");
> attach(attach(dat))
Ahh! Two at once! Why -- for the love of god, why!
:-P
M
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listin
I just found a problem that may be causing an error in a computation with very
small numbers:
I tell R that
thetaP <- 5.531003
and when I ask R to show me thetaP with more precision, it gives me
thetaP
[1] 5.5310030114
and even more surprising, if I write
thetaP <- 5.5310030
dat=read.csv("c:\\ven.csv",header=TRUE,sep=";");
attach(attach(dat))
dat
lm.1<-lm(ve~ su)
summary(lm.1)
GL Frank
> Date: Fri, 16 Nov 2012 20:42:39 +0100
> From: soniaam...@gmail.com
> To: r-help@r-project.org
> Subject: [R] about lm
>
> Dear friends,
> I have a csv file entitled ven.csv locat
Dear All
I am a stats newbie and have a basic stats question;
i have y as dependent variable and x1 to x5 as dependent variable.
I need to know which variables x1 to x5 are actually affecting y. How
do I find out?
can an example be given which makes things clear (if possible)?
Thanks
Parth
___
Dear Laura,
John is correct. The error is produced by the sem() function in the
lavaan package. The reason is that you did not use proper names for the
function arguments. The correct call should be:
sem.cdu= sem(cdu, sample.cov=hetcor, sampl.nobs=1861,
meanstructure=F,fixed.x=F)
But more
Le 17/11/12 03:32, Tania Patiño a écrit :
Hello all, could you explain to me how to create
a tree in R, and if you can explain every line of code that will be great.
Which are the libraries that are needed and where I can find more examples.
Thank you!
Tania
We expect that you give more pre
73 matches
Mail list logo