On Fri, Oct 8, 2010 at 3:52 PM, array chip wrote:
> Hi, is there a way to retrieve the extremes of the user coordinates of the
> plotting region, like what par("usr") does in general graphics? I'd like to
> use
> them to print additional texts at certain place inside each panel. Thanks
?current.
On Fri, Oct 8, 2010 at 5:19 PM, array chip wrote:
> Hi, how can I make the point characters thicker (NOT larger) in xyplot when
> groups= argument is used?
>
> dat<-data.frame(x=1:100,y=1:100,group=rep(LETTERS[1:5],each=20))
>
> ### lwd=2 doesn't work here
> xyplot(y~x,groups=group,data=dat,col
On Fri, Oct 8, 2010 at 6:19 AM, Sebastian Gibb wrote:
> Hello Duncan,
>
> thank for your advice, but it doesn't work like expected:
>
> setClass(Class="A", representation=representation(slotA="numeric",
> slotB="numeric"));
> setMethod("$", "A", function(x, name) {return(slot(x, name));})
> setGen
Thank you very much Josh. Yes, I notice that there is indeed some NAs going
into the as.brob function that I was using. I think I have to resolve that
before invoking the as.brob function.
Thanks again.
Chow
--
View this message in context:
http://r.789695.n4.nabble.com/Error-message-in-as-brob
On Oct 8, 2010, at 9:19 PM, Mike Marchywka wrote:
From: dwinsem...@comcast.net
To: lorenzo.ise...@gmail.com
Date: Fri, 8 Oct 2010 19:30:45 -0400
CC: r-help@r-project.org
Subject: Re: [R] Memory management in R
On Oct 8, 2010, at 6:42 PM, Lorenzo Isella
> From: dwinsem...@comcast.net
> To: lorenzo.ise...@gmail.com
> Date: Fri, 8 Oct 2010 19:30:45 -0400
> CC: r-help@r-project.org
> Subject: Re: [R] Memory management in R
>
>
> On Oct 8, 2010, at 6:42 PM, Lorenzo Isella wrote:
>
> > Please find below
My locale information is as follows:
> sessionInfo()
R version 2.11.1 (2010-05-31)
i386-pc-mingw32
locale:
[1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936
[2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=Chinese (Simplified)_People's Republ
That’s what I was wanting was nice output, I suppose I framed my query wrong,
but this is what I wanted! Thank you.
Joe King
206-913-2912
j...@joepking.com
"Never throughout history has a man who lived a life of ease left a name worth
remembering." --Theodore Roosevelt
-Original Message--
Hi Joe,
There is an important distinction between working with data and
presenting data. You do not want to change or get rid of the missing
values in the actual data. Believe it or not, this buys you something
important. Since appearance only matters for presentation, you can
fudge what the da
I did what you said and it worked perfectly, but I have tried to save some of
my objects using paste because I want to limit the number of significant digits
and one matrix has some empty spaces I use NA in, and I want those left blank,
but when I paste into an object it doesn’t hold that format
Hi All,
I am trying to install ncdf package on a Linux 64-bit machine.
I successfully installed netcdf using this command,
./configure --prefix=/home/challar/netcdf/ --disable-netcdf4
I then tried to install ncdf package in R
R CMD INSTALL
--configure-args="-with-netcdf_incdir=/home/challar/ne
Hi,
I am conducting an association analysis of genotype and a phenotype such as
cholesterol level as an outcome and the genotype as a regressor using
multiple linear regression. There are 3 possibilities for the genotype AA,
AG, GG. There are 5 people with the AA genotype, 100 with the AG genoty
Hi all,
I have updated the exact2x2 package. The update corrects an error that can
sometimes occur in the confidence intervals when the number of counts are large
and tsmethod="minlike". In addition to fixing the bug, the correction gives a
much faster method for calculating the confidence inte
On Oct 8, 2010, at 6:42 PM, Lorenzo Isella wrote:
Thanks for lending a helping hand.
I put together a self-contained example. Basically, it all relies on
a couple of functions, where one function simply iterates the
application of the other function.
I am trying to implement the so-called L
Hello,
I am using regsubsets function in leaps package. And I did some experiments
with the parameter nvmax( max size of subsets to examine) and got some
weird observations.
What I did is:
I used around 100 or about 600 variables and called function
regsubsets(data, nvmax=1...), I got a mat
Hi, how can I make the point characters thicker (NOT larger) in xyplot when
groups= argument is used?
dat<-data.frame(x=1:100,y=1:100,group=rep(LETTERS[1:5],each=20))
### lwd=2 doesn't work here
xyplot(y~x,groups=group,data=dat,col=1:4,pch=1:4,lwd=2)
### lwd=2 works with panel.points(),
Hi,
I am trying to use rect (R2.11) to plot a set of data as following
Company
Pt
Pri
Pub
A
W200
4/5/2009
3/11/2010
B
W293
2/30/2003
3/24/2005
A
W258
2/8/2008
8/17/2010
C
W248
5/13/2009
1/2/2010
%y <- seq(0,0.5*(length(company)-1),0.5)
%h <- 0.1
%rect(pri, y-h, pub, y+h, col=
Hi, is there a way to retrieve the extremes of the user coordinates of the
plotting region, like what par("usr") does in general graphics? I'd like to use
them to print additional texts at certain place inside each panel. Thanks
John
[[alternative HTML version deleted]]
__
Thanks for lending a helping hand.
I put together a self-contained example. Basically, it all relies on a
couple of functions, where one function simply iterates the application
of the other function.
I am trying to implement the so-called Lempel-Ziv entropy estimator. The
idea is to choose a p
On Fri, Oct 8, 2010 at 12:47 PM, Gabor Grothendieck
wrote:
> On Fri, Oct 8, 2010 at 11:35 AM, epowell wrote:
>>
>> My data looks like this:
>>
>>> data
>> name G_hat_0_0 G_hat_1_0 G_hat_2_0 G_0 G_hat_0_1 G_hat_1_1 G_hat_2_1 G_1
>> 1 rs0 0.488000 0.448625 0.063375 1 0.480875 0.454500 0.0
Hi. Marc,
Thanks so much for your reply.
Have a nice weekend!
Tim
-- Original Message --
From: "Marc Schwartz-3 [via R]"
To: noclue_
Subject: Re: Linux 64-bit R installation problem - "Failed dependencies"
Date: Thu, 7 Oct 2010 05:31:26 -0700 (PDT)
On Oct 7, 2010, at 3:50 AM
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Chagaris, Dave
> Sent: Friday, October 08, 2010 12:04 PM
> To: r-help@r-project.org
> Subject: [R] incorrect number of levels
>
> I have a data set 382 rows and 63 columns. On
Does anyone have experience using RJDBC library to write to Sybase
datatable? The jdbc driver I am using is jConnect 6.0. I can
successfully write into a new datatable, but have problem appending rows
to existing one. It either complains "Table *** already exists" or
simply overwrite the existing o
Hi,
> Sys.setenv(TZ="PRC")
> Sys.setlocale("LC_TIME", "Chinese")
[1] "Chinese (Simplified)_People's Republic of China.936"
> as.POSIXct("2009/03/26 01:00:00 上午" , format="%Y/%m/%d %I:%M:%S %p")
[1] "2009-03-26 01:00:00 CST"
> as.POSIXct("2009/03/26 01:00:00 下午" , format="%Y/%m/%d %I:%M:%S %p")
[1]
On Oct 8, 2010, at 4:37 PM, David Winsemius wrote:
On Oct 8, 2010, at 3:04 PM, Chagaris, Dave wrote:
I have a data set 382 rows and 63 columns. One of the columns is
bay, and there are 6 bays. But, the number of levels for this
factor is 7 when it should be six because there is some 'b
On Oct 8, 2010, at 3:04 PM, Chagaris, Dave wrote:
I have a data set 382 rows and 63 columns. One of the columns is
bay, and there are 6 bays. But, the number of levels for this
factor is 7 when it should be six because there is some 'blank'
level "". When I subset for the blank level "
Dear Xin,
You really provided great information! You can use the function,
names(). Here is an example:
# mimic your data
a <- c("ae21" = 1.863869)
a
names(a)
# the result should be
> names(a)
[1] "ae21"
Hope that helps, and thanks for making it easy to answer,
Josh
On Fri, Oct 8, 2010 at 11
On Fri, Oct 8, 2010 at 4:05 PM, Eli Holmes wrote:
> I'm still trying to sort out if I can tell the function not to use
> values in the user workspace if they don't exist locally in a
> function, i.e. a "use local variables only" option when defining a
> function. Obviously, I could go to a style o
names(a)
On Fri, Oct 8, 2010 at 3:07 PM, Xgong wrote:
>
> Hi,
>
> I have a question about vector access. sorry if it is too basic.
>
> > a
> ae21
>1.863869
>
> My question is how to retrieve "ae21" from vector "a". here is some other
> information you might need.
>
> > str(a)
> Named num 1.
I have a data set 382 rows and 63 columns. One of the columns is bay, and
there are 6 bays. But, the number of levels for this factor is 7 when it
should be six because there is some 'blank' level "". When I subset for the
blank level "", I get 0 rows. What in my data could be causing this?
> Date: Fri, 8 Oct 2010 13:30:59 -0400
> From: jholt...@gmail.com
> To: lorenzo.ise...@gmail.com
> CC: r-help@r-project.org
> Subject: Re: [R] Memory management in R
>
> More specificity: how long is the string, what is the pattern you are
> matching a
Hi,
I have a question about vector access. sorry if it is too basic.
> a
ae21
1.863869
My question is how to retrieve "ae21" from vector "a". here is some other
information you might need.
> str(a)
Named num 1.86
- attr(*, "names")= chr"ae21"
> class(a)
[1] "numeric"
> is.vector(a)
[1
On Oct 8, 2010, at 3:43 PM, rivercode wrote:
Losing time offset from GMT:
sTime = as.POSIXct(paste("2008-03-03","09:30:01"),
origin="1970-01-01")
sTime
[1] "2008-03-03 09:30:01 EST" < 9.31am EST
sTime
[1] 1204554601
t = as.numeric(sTime)
as.POSIXct(t, origin="1970-01-01")
[1
Thanks for the help. After looking over the answers, I've come up
with some revised code:
# To simply test if an argument was passed in, missing() can be used
# However, if arg defined later, missing() will return TRUE instead of false
a=1 #put a in global environment
tst <- function(a,b=1) {
if
Losing time offset from GMT:
> sTime = as.POSIXct(paste("2008-03-03","09:30:01"), origin="1970-01-01")
> sTime
[1] "2008-03-03 09:30:01 EST" < 9.31am EST
> sTime
[1] 1204554601
> t = as.numeric(sTime)
> as.POSIXct(t, origin="1970-01-01")
[1] "2008-03-03 14:30:01 EST" <- no tz option
I appreciate your honesty, but this is not a forum for getting your homework
done. There is a reason why your professor assigns homework, which is for
you to learn. By getting us to solve your homework problems, you are
defeating that purpose, and more importantly, you are wasting your time,
your
Is there a way to communicate with a running R daemon from perl. I
tried RSPerl but the functions there initiate an R instance first. I
would like to keep an R instance running in the background and
communicate with it using Perl.
The problem is due to a large object that we need which has to be
lo
On 08/10/2010 2:45 PM, Levy, Roger wrote:
I'm writing a book using Sweave which includes Unicode characters which R's
postscript and pdf graphics devices don't handle properly. The cairo graphics
device does handle these characters properly. Thus I'd like to be able to
instruct Sweave to us
Petr and Bill,
Thanks for your replies.
I have gone with Petr use of na.locf(), but expect I can use Bill's full
function in the near future.
Chris
--
View this message in context:
http://r.789695.n4.nabble.com/Vector-replace-0-elements-without-using-a-loop-tp2966191p2968909.html
Sent from th
I'm writing a book using Sweave which includes Unicode characters which R's
postscript and pdf graphics devices don't handle properly. The cairo graphics
device does handle these characters properly. Thus I'd like to be able to
instruct Sweave to use cairo (either sometimes or always) to produ
On Oct 8, 11:32 am, Prof Brian Ripley wrote:
> (1) Package development is an R-devel topic -- please see the posting
> guide.
I'll repost there, thanks.
-Ken
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE d
Thank you, well I have a table I am wanting to print, yet I want it in a matrix
but it has different number of columns, so if I had a table of
1 1 1
2 2
Is there a way to get that table to print out as an object without having to
put an NA or 0 in the last cell?
Joe King
206-913-2912
j...@joe
On Oct 8, 2010, at 12:33 PM, Martin Hughes wrote:
Hello Everyone
I have an R script (and a source file which I keep my functions)
that I need to run on 70 data sets (each consisting of a pair of
files).
I wish to run these data sets in a computer cluster that is run by
my uni (HOWEVER
Dear R Users,
I've never used R before and my professor has asked us to do some
pretty intense programming (or it's intense to me at least). Here is
the question: Modify the function myquadrature inside the script so
that it returns the quadrature of descrete data using the trapezoidal
rule
Try this:
replace(have, mapply(seq, which(have), which(have) + 3), TRUE)
On Fri, Oct 8, 2010 at 2:07 PM, andrewjt wrote:
>
> Hello,
> I need help getting from data$HAVE to data$NEED (see below). This requires
> replacing every TRUE in data$HAVE with 4 TRUE(s) in data$NEED.
>
> Any ideas? It see
This is better suited for R-help than R-devel, so I'm copying to the R-help
list:
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On
> Behalf Of Martin Kerr
> Sent: October-08-10 3:09 AM
> To: r-de...@r-project.org
> Subject: [Rd] Selecti
Hello,
I need help getting from data$HAVE to data$NEED (see below). This requires
replacing every TRUE in data$HAVE with 4 TRUE(s) in data$NEED.
Any ideas? It seems straight forward but I can't figure it out!
Thanks in advance
HAVE NEED
1 FALSE FALSE
2 FALSE
More specificity: how long is the string, what is the pattern you are
matching against? It sounds like you might have a complex pattern
that in trying to match the string might be doing a lot of back
tracking and such. There is an O'Reilly book on Mastering Regular
Expression that might help you
Hello Everyone
I have an R script (and a source file which I keep my functions) that
I need to run on 70 data sets (each consisting of a pair of files).
I wish to run these data sets in a computer cluster that is run by my
uni (HOWEVER they cannot help me with this problem but say it is
Hi
I made heatmap of QTL based on Lod score. Where I have traits in columns and
marker data (rows). I can not cluster both column and rows as I need the
right order for marker data.
Can someone suggest me better way of generating heatmaps especially the
colour key I want to select to visualize th
These questions are OS-specific. Please provide sessionInfo() or other details
as needed
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Lorenzo Isella
Sent: Friday, October 08, 2010 1:12 PM
To: r-help
Subject: [R] Memory managemen
On 10/08/2010 07:25 PM, Doran, Harold wrote:
These questions are OS-specific. Please provide sessionInfo() or other details
as needed
I see. I am running R on a 64 bit machine running Ubuntu 10.04
> sessionInfo()
R version 2.11.1 (2010-05-31)
x86_64-pc-linux-gnu
locale:
[1] LC_CTYPE=en_US
On Oct 8, 2010, at 1:17 PM, Alison Callahan wrote:
Hi again
On Fri, Oct 8, 2010 at 1:13 PM, David Winsemius > wrote:
On Oct 8, 2010, at 1:09 PM, Alison Callahan wrote:
See below.
On Fri, Oct 8, 2010 at 1:01 PM, David Winsemius >
wrote:
On Oct 8, 2010, at 12:46 PM, Alison Callahan wrote
On Oct 8, 2010, at 1:09 PM, Alison Callahan wrote:
See below.
On Fri, Oct 8, 2010 at 1:01 PM, David Winsemius > wrote:
On Oct 8, 2010, at 12:46 PM, Alison Callahan wrote:
Hello all,
I am trying to perform an ANOVA on some data in a data frame, but
when
I try to use lm(), I get the foll
Dear All,
I am experiencing some problems with a script of mine.
It crashes with this message
Error in grepl(fut_string, past_string) :
invalid regular expression
'12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12653a6#12
Hi again
On Fri, Oct 8, 2010 at 1:13 PM, David Winsemius wrote:
>
> On Oct 8, 2010, at 1:09 PM, Alison Callahan wrote:
>
>> See below.
>>
>> On Fri, Oct 8, 2010 at 1:01 PM, David Winsemius
>> wrote:
>>>
>>> On Oct 8, 2010, at 12:46 PM, Alison Callahan wrote:
>>>
Hello all,
I am tr
See below.
On Fri, Oct 8, 2010 at 1:01 PM, David Winsemius wrote:
>
> On Oct 8, 2010, at 12:46 PM, Alison Callahan wrote:
>
>> Hello all,
>>
>> I am trying to perform an ANOVA on some data in a data frame, but when
>> I try to use lm(), I get the following error:
>>
>> Error in storage.mode(y) <-
Try this:
aggregate(cbind(val, val2) ~ grp, cbind(grp, !is.na(dta[-1])), sum)
On Fri, Oct 8, 2010 at 12:13 PM, Marcus Drescher wrote:
> I am sorry for the typo, it is about counting two columns an skipping the
> NAs.
>
> How would I have to set the formula if I would have two columns to count
On Oct 8, 2010, at 12:46 PM, Alison Callahan wrote:
Hello all,
I am trying to perform an ANOVA on some data in a data frame, but when
I try to use lm(), I get the following error:
Error in storage.mode(y) <- "double" :
invalid to change the storage mode of a factor
In addition: Warning messa
On Fri, Oct 8, 2010 at 11:35 AM, epowell wrote:
>
> My data looks like this:
>
>> data
> name G_hat_0_0 G_hat_1_0 G_hat_2_0 G_0 G_hat_0_1 G_hat_1_1 G_hat_2_1 G_1
> 1 rs0 0.488000 0.448625 0.063375 1 0.480875 0.454500 0.064625 1
> 2 rs1 0.002375 0.955375 0.042250 1 0.00 0.06
Hello all,
I am trying to perform an ANOVA on some data in a data frame, but when
I try to use lm(), I get the following error:
Error in storage.mode(y) <- "double" :
invalid to change the storage mode of a factor
In addition: Warning message:
In model.response(mf, "numeric") :
using type="nu
It's a problem much bigger.
I use a matrix to store the results of a bigger problem.
I loop through several variables and store the results of a computation on
that matrix.
At the beginning of the problem I initialize the matrix to zeros and I
calculate its size from some input.
And that seems no
On Fri, 8 Oct 2010, Ken Williams wrote:
I'm developing an R package, and when I recompile (using Roxygen),
detach, and re-load the package, I can't seem to look at some of its
documented functions. When I try '?function.name', I get the
following error:
Error in tools:::fetchRdDB(RdDB, basena
You are loosing a lot of time by repeatedly calculating character
indices with paste() in every iteration. Two options:
-- 1) calculate these once outside the loop and then refer to them by
index
idx.names <- vector(mode="character", length=nind)
for (i in (0:(nind-1))) {idx[i+1] <-# ne
> Do you also know more references about variables? Unfortunately this was a
> little bit short so I do not feel 100% sure I completely got it.
Try here:
http://github.com/hadley/devtools/wiki/Scoping
It's a work in progress.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Departm
Hi:
An alternative approach with a few less keystrokes, using the plyr package:
library(plyr)
# Create some example data files, populate them and write them out using
write.csv:
fnames <- c(paste('file0', 1:9, '.csv', sep = ''))
for(i in seq_along(fnames)) {
d <- data.frame(x = rnorm(3), y
Dear Jan,
It depends what you are looking to do. For the studies that have
given you means and standard deviations, if you want a d effect size,
you should already be set (Mean1 - Mean2)/control standard deviation
or the pooled standard deviation if you prefer. For the studies where
you just hav
Here's another method without using any external regular expression libraries:
dat <- read.table(tc <- textConnection(
'0,1 1,3 40,10 0,0
20,5 4,2 10,40 10,0
0,11 1,2 120,10 0,0'), sep="")
mat <- apply(dat, c(1,2), function(x){
temp <- as.numeric(unlist(strsplit(x, ',')))
min(temp
A free book is available at: http://www.burns-stat.com/pages/spoetry.html
Or the book S Programming by Venables and Ripley is another great source of
information on programming in S/R.
There are additional books listed at:
http://www.r-project.org/doc/bib/R-books.html as well as much free
docu
I'm developing an R package, and when I recompile (using Roxygen),
detach, and re-load the package, I can't seem to look at some of its
documented functions. When I try '?function.name', I get the
following error:
Error in tools:::fetchRdDB(RdDB, basename(file)) :
cannot allocate memory blo
Hi July,
You might want to check out the "moments" package. It has a couple
functions, "all.moments()" and "moment()" that will compute these for
you.
By the way, "RSeek.org" is a great place to find packages like this; I
searched for "sample moments" and clicked on the "functions" tab to
find th
Here is an option:
grp = c(1,1,1, 1,2, 2,2)
val = c(2,1,5,NA,3,NA,1)
dta = data.frame(grp=grp, val=val)
ddply(dta,"grp",summarise,count=length(na.omit(val)))
Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish & Wildlife Service
California, USA
- Original
To make it "work", use "round" to take care of the issues in FAQ 7.31
resul <- matrix(rep(0,round(ncota*nslope*4)),round(ncota*nslope),4)
On Fri, Oct 8, 2010 at 11:27 AM, skan wrote:
>
> Hello
>
> Why this works:
> ncota <- 1
> nslope <- 29
> resul <- matrix(rep(0,ncota*nslope*4),ncota*nslope,
Hi to all members of this list,
i'm trying to parse an XML file and it seems that it's not very
straightforward. I managed to get to the node that has a lot of sub nodes
with similar format, i.e. :
$Purchase
-2000.1
29510.27
$Purchase
-2000
29507.26
I was wondering what is the way to p
My data looks like this:
> data
name G_hat_0_0 G_hat_1_0 G_hat_2_0 G_0 G_hat_0_1 G_hat_1_1 G_hat_2_1 G_1
1 rs0 0.488000 0.448625 0.063375 1 0.480875 0.454500 0.064625 1
2 rs1 0.002375 0.955375 0.042250 1 0.00 0.062875 0.937125 2
3 rs2 0.050375 0.835875 0.113750
Hi Xinli,
You will probable have to tweak this some for it to work for you, but
it at least gives you an idea.
First put all your files in one directory, then you use the
list.files() function to read into R the names of every file in that
directory (this is easier than typing all 100 something n
FAQ 7.31
On Fri, Oct 8, 2010 at 11:27 AM, skan wrote:
>
> Hello
>
> Why this works:
> ncota <- 1
> nslope <- 29
> resul <- matrix(rep(0,ncota*nslope*4),ncota*nslope,4)
>
>
>
> But this doesn't?
> ncota <- 1
> sini <- 0.1; sfin <- 1.5; spaso <- 0.05; nslope <- 1+((sfin-sini)/spaso)
> resul <- matr
It seems that was the problem. My apologies as I was unaware of the
difference between a .c file & a .C file.
Thanks again for your help,
Steve
On 9/10/2010 1:37 AM, Prof Brian Ripley wrote:
Is the file .c or .C? You said .c, but then you said a .C file worked
(which it should not have), a
Hello
Why this works:
ncota <- 1
nslope <- 29
resul <- matrix(rep(0,ncota*nslope*4),ncota*nslope,4)
But this doesn't?
ncota <- 1
sini <- 0.1; sfin <- 1.5; spaso <- 0.05; nslope <- 1+((sfin-sini)/spaso)
resul <- matrix(rep(0,ncota*nslope*4),ncota*nslope,4)
I guess the problem is that the divi
Have a look at table
table(na.omit(dta)$grp)
Untested!
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium
Research Institute for Natur
Dear all,
I am trying to do meta-analysis of continuous outcome data. Twelve studies are
selected but for six of them, i have only p-values and the six other means and
standard deviation for the two groups (Experimental and Control). How can I do
with R to take into account p-values and/or mean
I am sorry for the typo, it is about counting two columns an skipping the NAs.
How would I have to set the formula if I would have two columns to count (val1
and val2)?
Betreff: Re: [R] Count values in a dataframe with respect to groups
Try this:
aggregate(val ~ grp, dta, length)
On Fri, Oct
Is the file .c or .C? You said .c, but then you said a .C file
worked (which it should not have), and I wonder if you have this
backwards.
A .c file is C, a .C file is C++ (in R 2.11.1 but not R 2.12.0).
extern "C" would be required if this were a C++ source, but we were
told otherwise.
On
Thanks! It works great.
One more question: how would I have to set the formula if I would have the
columns to count (val1 and val2)?
Betreff: Re: [R] Count values in a dataframe with respect to groups
Try this:
aggregate(val ~ grp, dta, length)
On Fri, Oct 8, 2010 at 11:28 AM, Marcus Dresche
> Date: Sat, 9 Oct 2010 01:21:47 +1030
> From: stephen.peder...@adelaide.edu.au
> To: rip...@stats.ox.ac.uk
> CC: r-help@r-project.org
> Subject: Re: [R] R CMD SHLIB changes function name when compiling
>
> I think I should also add that I have comp
I think I should also add that I have compiled R from source so am
pretty confident that I have the correct set of Rtools.
On 8/10/2010 8:06 PM, Prof Brian Ripley wrote:
On Fri, 8 Oct 2010, Steve Pederson wrote:
Hi,
I'm trying to write a function in C for implementation with .Call.
When com
Hi Prof Ripley,
Thanks for the response & the use of the correct terminology. I've
checked the environment variables & there is none set called CC.
The .dll was definitely compiled using R CMD SHLIB. I'm not quite sure
what output you're referring to but at the command prompt when I enter:
On Fri, Oct 8, 2010 at 10:18 AM, Gabor Grothendieck
wrote:
> On Fri, Oct 8, 2010 at 1:19 AM, burgundy wrote:
>>
>> Hello,
>>
>> I have a dataframe (tab separated file) which looks like the example below -
>> two values separated by a comma, and tab separation between each of these.
>>
>> [,1]
Try this:
aggregate(val ~ grp, dta, length)
On Fri, Oct 8, 2010 at 11:28 AM, Marcus Drescher wrote:
> Dear all,
>
> I am looking for a function to count values belonging to a class within a
> dataframe (and ignore NAs).
>
> grp = c(1,1,1, 1,2, 2,2)
> val = c(2,1,5,NA,3,NA,1)
>
> dta = data.fra
Thanks so much Peter,
If doing linear regression with a similar goal - to determine a
relationship corrected for age, is there a similar procedure? I have
been using:
>lm(Y~X+age)
However, I am guessing from the previous response that this was simply
including both X and age as independent varia
Dear all,
I am looking for a function to count values belonging to a class within a
dataframe (and ignore NAs).
grp = c(1,1,1, 1,2, 2,2)
val = c(2,1,5,NA,3,NA,1)
dta = data.frame(grp=grp, val=val)
The result should look like:
grp count
13
22
At the moment, I am trying to find a fun
On Fri, Oct 8, 2010 at 1:19 AM, burgundy wrote:
>
> Hello,
>
> I have a dataframe (tab separated file) which looks like the example below -
> two values separated by a comma, and tab separation between each of these.
>
> [,1] [,2] [,3] [ ,4]
> [1,] 0,1 1,3 40,10 0,0
> [2,] 20,5 4,2 10
Josh,
How about the direct approach: grep or otherwise search the source? If you can
guess the form of a printf()-like statement, then it might be easy to find.
More likely, one would have to overlay results of a few different searches.
Maybe someone who is actively working on the code will
July gmail.com> writes:
> (1) How can I write R code to compute the moments around zero of order one
> to four?
>
> (2) How can I write R code to compute the moments around the mean of order
> one to four?
Just checking: is this homework? Why do you need to do this?
What is your input: a li
Gregory Ryslik wrote:
Hi,
Thank you for the help! Would this imply then that if my "answers" and
"predicted" are both matrices, I need to first make them into factors? I was
hoping to avoid that step...
Why are they matrices? What is the additional dimension? And: what should become
of the addi
On Fri, 8 Oct 2010, David Winsemius wrote:
On Oct 8, 2010, at 5:54 AM, Ted Zeng (曾振兴) wrote:
Dear All,
I encounted in a problem with as.POSIXct() function.
as.POSIXct("2009/03/26 01:00:00 AM" , format="%Y/%m/%d %I:%M:%S %p")
[1] NA
as.POSIXct("2009/03/26 02:00:00 PM" , format="%Y/%m/%d
Dear Greg,
If it is only the NA that worries you: function table can deal with that.
? table
and:
example (table)
If you want to make a confusion matrix that works also with fractional answers
(e.g. 50% A, 50% B, a.k.a soft classification) then you can contact me and
become test user of a pack
On Fri, Oct 8, 2010 at 5:54 AM, Ted Zeng (曾振兴) wrote:
>
> Dear All,
>
> I encounted in a problem with as.POSIXct() function.
>
>> as.POSIXct("2009/03/26 01:00:00 AM" , format="%Y/%m/%d %I:%M:%S %p")
> [1] NA
>> as.POSIXct("2009/03/26 02:00:00 PM" , format="%Y/%m/%d %I:%M:%S %p")
> [1] NA
>
> I hav
>I use R for a year now and am dealing with geometric morphometrics of deer
>skulls. Yes, I am a biologist and my math skills are just beginning to brush
>up. To cut to the chase...
>
>I have two groups in my data (males and females) and my data is in a simple
>vector form. Now I need a bootstra
On 08-Oct-10 12:44:12, Kari Ruohonen wrote:
> Hi,
> I wonder if this is something on my machine locally or R in general.
>
> When I do the following:
>> plot(c(0,1),c(0,1),main=expression(paste(symbol("D"),"D",sep="")))
>
> I get a plot with a title having uppercase delta followed by "D". But
> i
1 - 100 of 124 matches
Mail list logo