On Wed, 22 Apr 2009 11:18:17 -0400 Dimitri Liakhovitski
wrote:
DL> You don't have to uninstall the old version. Just install the new
DL> version. What I do then - I manually copy (in Windows Explorer) all
DL> the packages from the folder library that is under your old R
DL> version into the folde
Hi Milton,
you're right that most of the functions in the package "drc" are suited for
sigmoidal/s-shaped curves defined on the positive axis.
However, there is one exception: the logistic model:
library(drc)
sp.coredep.attr.m1 <- drm(preference~dst, data=sp.coredep.attr, fct=L.4())
plot(sp.co
Consider the following situation:
we have quantified algal concentrations for
a variety of species using many samples at each
of three years. It seems to make sense to generate
a line plot (matplot-like), with each species plotted
as a separate line, with the points connected to emphasize
th
Dear Relper,
I still need some help with this issue.
I am very thanks for the suggestions.
Bests
milton
On Tue, Apr 21, 2009 at 11:51 AM, milton ruser wrote:
> Dear all,
>
> I need to adjust a decaing function between "preference" as function
> of "distance" (dst). As you can see below, the X
J Dougherty wrote:
>
> If you need an open source arbitrary precision calculator, you might want
> to
> look at Octave which is OS and works similarly to Mathematica - up to a
> point
> books for Mathematica will be a significant help with Octave.
>
> JDougherty
>
>
??? octave is a Ma
Hi Thomas,
Here's a simple example of adding a KDE line to a plotted histogram:
set.seed(222)
x <- rnorm(100)
hist(x, freq=FALSE)
lines(density(x), lty=2, col=2, lwd=2)
Note the need to set the freq to FALSE -- otherwise hist will
calculate counts within bins rather than probability densities.
Thank you very much, do.call is, of course, much more elegant!
Dimitri
On Wed, Apr 22, 2009 at 9:58 PM, jim holtman wrote:
> 'do.call' is your friend::
>
>> a<-data.frame(a=1,b=2,c=3)
>> b<-data.frame(a=c(4,7),b=c(5,8),c=c(6,9))
>> c<-data.frame(a=c(10,13,16),b=c(11,14,17),c=c(12,15,18))
>> X<-li
Replying to my own post. I found the following solution:
full.frame<-as.data.frame(matrix(nrow=0,ncol=3))
names(full.frame)<-c("a","b","c")
for(j in 1:length(X)) {full.frame<-rbind(full.frame,X[[j]])}
(full.frame)
Is there a more elegant solution?
Thank you!
Dimitri
On Wed, Apr 22, 2009 at 9:36
'do.call' is your friend::
> a<-data.frame(a=1,b=2,c=3)
> b<-data.frame(a=c(4,7),b=c(5,8),c=c(6,9))
> c<-data.frame(a=c(10,13,16),b=c(11,14,17),c=c(12,15,18))
> X<-list()
> X[[1]]<-a
> X[[2]]<-b
> X[[3]]<-c
> do.call(rbind, X)
a b c
1 1 2 3
2 4 5 6
3 7 8 9
4 10 11 12
5 13 14 15
6 16
?do.call
... as in do.call(rbind,X)
(A very useful and powerful feature os the S language: Computing on the
language. See V&R's "S Programming" for an informative discussion (there may
well be others, of course).
-- Bert
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-h
On Apr 22, 2009, at 8:36 PM, Dimitri Liakhovitski wrote:
Hello everyone!
I have a list X with 3 elements, each of which is a data frame, for
example:
a<-data.frame(a=1,b=2,c=3)
b<-data.frame(a=c(4,7),b=c(5,8),c=c(6,9))
c<-data.frame(a=c(10,13,16),b=c(11,14,17),c=c(12,15,18))
X<-list()
X[[1
Hello everyone!
I have a list X with 3 elements, each of which is a data frame, for example:
a<-data.frame(a=1,b=2,c=3)
b<-data.frame(a=c(4,7),b=c(5,8),c=c(6,9))
c<-data.frame(a=c(10,13,16),b=c(11,14,17),c=c(12,15,18))
X<-list()
X[[1]]<-a
X[[2]]<-b
X[[3]]<-c
(X)
How can I most effectively transf
On Wednesday 22 April 2009 12:21:41 pm molinar wrote:
> I am working on a project that requires me to do very large factorial
> evaluations. On R the built in factorial function and the one I created
> both are not able to do factorials over 170. The first gives an error and
> mine return Inf.
>
Hi,
I'm trying to use Information Gain for feature selection.
There is a InfoGain implementation in Weka:
*weka.attributeSelection.InfoGainAttributeEval*
Is it possible to use this function with RWeka? If yes how?
list_Weka_interfaces doesn't show it and there is no make function for
AttributeE
Hi,
I'm trying to use Information Gain for feature selection.
There is a InfoGain implementation in Weka:
*weka.attributeSelection.InfoGainAttributeEval*
Is it possible to use this function with RWeka? If yes how?
list_Weka_interfaces doesn't show it and there is no make function for
AttributeE
For variables named my.x and my.y try:
> plot( my.x, my.y, xlim=range(my.x,my.y), ylim=range(my.x,my.y) )
If all you want is to have the same range of values on both the x and y axes.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.81
Dear list,
I'd like to use multiple imputations to try and save a somewhat badly
mangled dataset (lousy data collection, worse than lousy monitoring, you
know that drill... especially when I am consulted for the first time
about one year *after* data collection).
My dataset has 231 observations o
Daren,
what are you trying to achieve?
Why don't you want any negative numbers?
Anyway, if you only need positive values, why not:
set.seed(999)
v<-rnorm(20,mean=2,sd=0.5)
(v)
(sd(v))
Dimitri
On Wed, Apr 22, 2009 at 1:26 AM, Daren Tan wrote:
>> set.seed(999)
>> abs(rnorm(20))
> [1] 0.28174016 1
if you really really need to have it done from within r, you may want to
use an external facility such as bc, the 'basic calculator' [1,2]. for
example, use the (experimental!) r-bc:
source('http://r-bc.googlecode.com/svn/trunk/R/bc.R')
(you can also download the zipped package which will in
> First, the regular R 1.9. It takes 2 minutes and 6 seconds, CPU usage
> 50%
>
> Next, REvolution's R. It takes 2 minutes and 10 seconds, CPU usage 100%.
>
> In other words, REvolution's R consumes double the CPU with slightly
> less speed.
The fact that it is the same time with only the 50%/10
The box referred to is probably the little blue box on the left hand
side of the Package Manager that the Mac GUI offers for loading
packages. One possible cause for that behavior in my experience is
working with a 64 bit GUI when the package was installed from binary.
This occurs because m
Ali Mahani wrote:
>
> I'm trying to estimate a two-tier model with varying intercepts and slopes
> across 20 groups, with each group having about 50 observations and with no
> group predictor. I use the command lmer(y~x+(1+x | group)). But the result
> is a constant intercept (zero standard dev
You don't say what the error was, for the R factorial function,
but it is probably irrelevant for your question.
Factorials get to be big numbers rather quickly and unless you
are using a program that does arbitrary precission arithmetic
you will quickly exceed the precission limits, for storing
Hi dre968.
Take a look at this:
> strings <- c('ABC','DFC','AWS','','ABC','POK','MKL')
> strings
[1] "ABC" "DFC" "AWS" """ABC" "POK" "MKL"
> strings=='ABC'
[1] TRUE FALSE FALSE FALSE TRUE FALSE FALSE
> sapply(strings, function(x) x=='ABC')
ABC DFC AWS ABC POK MKL
TRUE FA
David Winsemius wrote:
On Apr 22, 2009, at 3:42 PM, Bronagh Grimes wrote:
Hi there,
I am interested in converting SAS code to R & I wondered if anyone had
any quick R code/tips for the following piece of test SAS code?
Any feedback greatly appreciated.
data A1;
set A1;
count + 1;
by subj
Well, I personally have no idea what "the box" might be, but I've sent this
back to the list (you sent it just to me), and maybe someone else will
know.
On Wed, Apr 22, 2009 at 4:56 PM, Slusher, Nicole
wrote:
> When I tried to load the package by checking on the box, the box wouldn't
> check and
Please read the posting guide at http://www.R-project.org/posting-guide.html
and repost your question.
You have not provided the information need to properly address your
difficulties.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
You might be better off asking on the Bioconductor list.
But in general, we need to know _what_ went wrong. What did you do,
what happened, what error messages did you get? Those messages are
given for a reason, you know...
Sarah
On Wed, Apr 22, 2009 at 3:48 PM, Slusher, Nicole
wrote:
> Hello,
I'm trying to estimate a two-tier model with varying intercepts and slopes
across 20 groups, with each group having about 50 observations and with no
group predictor. I use the command lmer(y~x+(1+x | group)). But the result
is a constant intercept (zero standard deviation, all 20 intercept values
Mark, thanks for the suggestions. Unfortunately that did not fix the problem.
I have experimented (with no success) with placing braces in different
locations around the if/else statements and removing them all together.
Thanks again,
Aaron
Date: Wed, 22 Apr 2009
Hello,
I am trying to run R on my Mac (OS10.5.6) and am having trouble installing
and running packages (genefilter in particular in Bioconductor)
I've tried re-installing R and it hasn't solved the issue.
Thanks,
~Nicole Slusher
__
R-help@r-project.
On Apr 22, 2009, at 2:37 PM, Sarah Foster wrote:
Hello,
I can not get the function plot.logistic.fit.fnc() workingit
returns "Error: could not find function "plot.logistic.fit.fnc"".
Do I need to upload as specific package first?
Yes:
http://search.r-project.org/cgi-bin/namazu.cgi?query
Dear R users,
Version 1.1 of the EVER package is on CRAN.
EVER (the acronym stands for Estimation of Variance by Efficient Replication)
is mainly intended for calculating estimates and standard errors from complex
surveys.
Variance estimation is based on the extended Delete-A-group Jackknife te
On Apr 22, 2009, at 3:42 PM, Bronagh Grimes wrote:
Hi there,
I am interested in converting SAS code to R & I wondered if anyone had
any quick R code/tips for the following piece of test SAS code?
Any feedback greatly appreciated.
data A1;
set A1;
count + 1;
by subject_id;
if first.subjec
Hello Stephen,
I can confirm that I get the same behavior in my Windows machine. Here
is a summary:
> memory.limit()
[1] 2046
> memory.limit(2092)
Error in trunc(.Internal(memory.size(size))) :
Non-numeric argument to mathematical function
> memory.limit()
[1] 2092
As you described, the fu
What you can do is to name the file outside the write.csv statement
file <- as.character(paste("file", i, ".csv", sep=""))
write.csv(tempo, file)
Gabriel
Ing. Agr. Gabriel R. Rodriguez
Inst. de Clima y Agua - CNIA
INTA Castelar
Las Cabañas y Los Reseros SN
(1686) Hurlingham - Argentina
Hello all, turns out i'm having a bad R week. I am at my wits end with a
function that I am trying to write. When I run the lines of code outside of a
function, I get the desired output. When I wrap the lines of code into a
function it doesn't work as expected. Not sure what is going on her
I read in a CSV file with Data <-
read.csv(file="FileName.csv",head=TRUE,sep=",")
the file containts strings in the 2nd and 3rd columns and each has about
1000 rows. I need to either loop through the strings there looking for
strings that would trigger other logic or remove those rows and put th
Petra, try either running update.packages() or installing R 2.9.0.
Thanks Mark, I got it now.
Thanks,
Petra
Petra Buzkova, PhD
Department of Biostatistics
University of Washington
206-897-1962 (phone)
206-616-4075 (fax)
Marc Schwartz wrote:
On Apr 2
Dear R users,
The TraMineR package for mining, describing and visualizing sequences of
states or events, and more generally discrete sequential data has been
updated to version 1.2. Its primary aim is the analysis of biographical
longitudinal data in the social sciences, such as data describin
I need to generate output files as .csv file in a loop:
let's say, I want to generate a sequence of files according to the loop number
"i".
the first file genearted should be file1.csv
the second should be file2.csv
I use:
write.csv(temp, "file$i$.csv") in the loop but it did not work.
can
I am working on a project that requires me to do very large factorial
evaluations. On R the built in factorial function and the one I created
both are not able to do factorials over 170. The first gives an error and
mine return Inf.
Is there a way to have R do these larger calculations (the c
Hello,
I can not get the function plot.logistic.fit.fnc() workingit
returns "Error: could not find function "plot.logistic.fit.fnc"".
Do I need to upload as specific package first? I am trying to check
the fit of a mixed logistic model.
Also, any advice for checking the assumption of inde
Hi Benno et al.
I have had some code for reading RDA files via R functions
and binary connections. It is available from
http://www.omegahat.org/RDA
or
install.packages("RDA", repos = "http://www.omegahat.org/R";,
dep = TRUE)
It could be made faster if there is inte
Hi there,
I am interested in converting SAS code to R & I wondered if anyone had
any quick R code/tips for the following piece of test SAS code?
Any feedback greatly appreciated.
data A1;
set A1;
count + 1;
by subject_id;
if first.subject_id then count = 1;
run;
Correction:
> University of Oregon
> http://www.fsl.orst.edu/R_users - (unknown if currently active)
> Kenneth B. Pierce Jr.
> ken.pierce oregonstate edu
That's not University of Oregon, it's Oregon State University. U of O is
in Eugene.
They don't seem to be recently active in any cas
Duncan Murdoch wrote:
On 4/22/2009 12:59 PM, Benno Pütz wrote:
Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski:
Why do you use save()?
Can't you write out data frame(s) with your variables in a .txt or a
.csv file and then read in just the variable names?
I could, but ...
As save()
Marc Schwartz wrote:
The cut() function will do what you want in a vectorized fashion. See ?cut
However, that being said, I would strongly advise that you read Frank's
page on the categorizing of continuous variables:
http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/CatContinuous
befo
The cut() function will do what you want in a vectorized fashion. See ?
cut
However, that being said, I would strongly advise that you read
Frank's page on the categorizing of continuous variables:
http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/CatContinuous
before you proceed.
HTH
Hi Alan,
You can avoid the if() else() you're using in your function by replacing it
with the recode() function in the car package. I'm pretty sure it will speed
up your function.
See ?recode after loading the car package:
require(car)
?recode
HTH,
Jorge
On Wed, Apr 22, 2009 at 2:56 PM, Alan
I'm not sure, but I think that using the "cut" function would solve your
problem?
?cut
On Wed, 22 Apr 2009 14:56:10 -0400, "Alan Cohen"
wrote:
> Hi R users,
>
> I am trying to assign ages to age classes for a large data set (123,000
> records), and using a for-loop was too slow, so I wrote a fu
Hi R folks,
I'd like to announce several new R users groups here in SF, LA, NYC,
and Ottawa - as well as their next scheduled event. The goal of these
user groups, besides gently explaining 'drop=TRUE' to the uninitiated,
is to exchange knowledge, promote best practices, and spur the
adoption of
Hi R users,
I am trying to assign ages to age classes for a large data set (123,000
records), and using a for-loop was too slow, so I wrote a function and used
apply. However, the function does not properly assign the first two classes
(the rest are fine). It appears that when age is one digi
In particular,
library(zoo)
z <- zoo(x$alloc_gb, x$month)
plot(z)
See the three zoo vignettes
vignette(package = zoo) # to list them
vignette("zoo") # to show first one
and the help files
library(help = zoo)
?zoo
On Wed, Apr 22, 2009 at 1:07 PM, stephen sefick wrote:
> look at the zoo packag
If I have an R script that I am executing from a command line in linux,
do you know how I can return the value of the variable in my R script to
the linux environment without writing it to a file in my R script and
then reading the file through cat?
For example, if I had a simple one line R
Hi,
Crosby, Jacy R wrote:
>
> i.e. I'd like to have aov(Phen1~L1) use only Pat1-Pat4,and Pat 10.
> Similarly, aov(Phen1~L2) should use Pat1, 6, and 10.
> Etc.
>
> Is this something I can do in the aov function, or do I need to modify my
> dataset before running aov? In either case, I
On 4/22/2009 12:59 PM, Benno Pütz wrote:
Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski:
Why do you use save()?
Can't you write out data frame(s) with your variables in a .txt or a
.csv file and then read in just the variable names?
I could, but ...
As save() writes a binary (and b
look at the zoo package where there are quite a few functions to help with this.
Stephen Sefick
On Wed, Apr 22, 2009 at 11:09 AM, Lane, Jim wrote:
> Hi, All
>
> I have a data frame like this.
>
>> names(x)
> [1] "month" "alloc_gb"
>
> One of the columns contains the dates I want to use:
>
>>
Am 22.Apr.2009 um 17:21 schrieb Dimitri Liakhovitski:
Why do you use save()?
Can't you write out data frame(s) with your variables in a .txt or a
.csv file and then read in just the variable names?
I could, but ...
As save() writes a binary (and by default compressed) format that
is no
Here is another approach using an augmented penalty lagragian method.
The same example:
fr <- function(x) { ## Rosenbrock Banana function
x1 <- x[1]
x2 <- x[2]
100 * (x2 - x1 * x1)^2 + (1 - x1)^2
}
fr.pen <- function(x, k=1e05) {
fr(x) + k * ( 1 - sum(x))^2
}
require(BB)
spg(par=c(0,
Hello Martin,
Thanks for looking in to the problem. My mistake, I pasted the code for
sparse matrix for the graph that was created by
test.g <- simplify(ba.game(1000,m=2))
What I was intending to show was I have a graph object "g" created by
IGRPAH. Please find the link that has the graph objec
I'm hoping there's an easier way to do this...
I have a large matrix which looks like this (data=REG, rownames are the Pat1,
Pat2,...):
L1 L2 L3 Phen1 Phen2 Phen3
Pat1AA TT A? 143 143 143
Pat2AT ?A AT 256 256 NA
Pat
On 4/22/2009 12:18 PM, Alejandro González wrote:
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.
snapshot3d() gets a bitmap in .png format.
rgl.po
Pretty sure this question has been asked in the recent past and the
answer was movie3d.
--
David Winsemius
On Apr 22, 2009, at 12:18 PM, Alejandro González wrote:
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 int
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
On 4/22/09, Sebastien Bihorel wrote:
> Thanks to all the people who answer my question. It is know clear to know
> how to produce a square shape graph... but I guess there is no easy way to
> force the x and the y axis to have the same limits.
If you mean the general case where you don't want to
On Wed, Apr 22, 2009 at 3:48 PM, Bierbryer, Andrew
wrote:
> For example, if I had a simple one line R script that just did
>
> string <- 'TEST',
>
>
>
> when I call
>
> /usr/local/bin/R -no-save < MY_R_FILE,
>
>
>
> how can I put the value TEST into a shell variable?
You can use back
... or ?polygon in base graphics
-- Bert Gunter
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Dieter Menne
Sent: Wednesday, April 22, 2009 8:23 AM
To: r-h...@stat.math.ethz.ch
Subject: Re: [R] plot confidence intervals as shaded
try littler:
warmstr...@linuxsvr2:/tmp$ export MYVALUE=`r -e 'cat(10)'`
warmstr...@linuxsvr2:/tmp$ env|grep MYVALUE
MYVALUE=10
warmstr...@linuxsvr2:/tmp$
On Wed, Apr 22, 2009 at 10:48 AM, Bierbryer, Andrew
wrote:
> If I have an R script that I am executing from a command line in linux,
> do y
I realized after looking again that you asked for plotting. Since you
only have two points per row, it would be more honest statistically to
plot the values rather than mean and sem.
> dm <-read.table(textConnection(" repeat1repeat2
+ 13034
+ 212
Hi,
Here is an example, with a correction to my previous email.
fr <- function(x) { ## Rosenbrock Banana function
x1 <- x[1]
x2 <- x[2]
100 * (x2 - x1 * x1)^2 + (1 - x1)^2
}
require(BB)
proj <- function(x, lower, upper) x / sum(x) # note: you need to specify
"lower" and "upper" as argu
BARRES-DE-ALMEIDA U. durham.ac.uk> writes:
> does anyone know how do I plot confidence intervals as a shaded band around a
curve, rather than as errors bars?
>
http://had.co.nz/ggplot2/geom_smooth.html
Dieter
__
R-help@r-project.org mailing list
htt
Why do you use save()?
Can't you write out data frame(s) with your variables in a .txt or a
.csv file and then read in just the variable names?
On Wed, Apr 22, 2009 at 5:12 AM, Benno Pütz wrote:
>
> Am 21.Apr.2009 um 19:16 schrieb Dimitri Liakhovitski:
>
> Can't you just read in the very first li
You don't have to uninstall the old version. Just install the new version.
What I do then - I manually copy (in Windows Explorer) all the
packages from the folder library that is under your old R version into
the folder library under the new R version. And then I open the new R
version and run upda
Assume the object in question is a dataframe named "dm":
apply(dm, 1, mean)
It worries me that you are asking for the sem's of two element
objects, but if you really want it, the obvious modification to the
above should work.
On Apr 22, 2009, at 10:26 AM, ANJAN PURKAYASTHA wrote:
I have
Hi, All
I have a data frame like this.
> names(x)
[1] "month""alloc_gb"
One of the columns contains the dates I want to use:
> data.class(x$month)
[1] "yearmon"
I would like to make a time series object out of this. However the ts
function seems to require me to spell out the starting date
You can try defining a "projection" function as follows:
project <- function(x) x / sum(x)
This should work fine.
Let me know if you have any trouble.
Ravi.
---
Ravi Varadhan, Ph.D.
Assistant Professo
Hi all,
Presently I have R-2.6 version installed on my system. Because of
this I am unable to install certain packages.Will an "updatepackages()"
command help or would I have to uninstall the older version of R and then
install the newer versions ? Can anyone help me out ? Thanks in adva
I have a data matrix:
repeat1repeat2
13034
21223
3 50 13
4 5698
.
.
.
I would like to plot for the mean and standard error of mean of repeat 1 and
repeat2 for each row.
Any pointers on how to do this in R?
T
To whom it may concern,
I have a problem with the garchOxFit function I use. I run it and I
want to know if the Hessian matrix is computed. I attach a file with
the output.
Best regards,
Vasileios Ismyrlis
__
R-help@r-project.org mailing list
https://stat
Hi,
does anyone know how do I plot confidence intervals as a shaded band around a
curve, rather than as errors bars?
many thanks,
ulisses.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/
Thanks to all the people who answer my question. It is know clear to
know how to produce a square shape graph... but I guess there is no easy
way to force the x and the y axis to have the same limits.
*Sebastien*
Rodrigo Aluizio wrote:
Hi Sebastien, take a look at the par(pty='s') argument.
i'm trying to use the BB package to minimize the sum of the squared
deviations for 2 vectors. The only thing am having trouble with is defining
the project constraint. I got the upper and lower bounds to work but i am
not sure how to create a constraint that the sum of x must be 1. Any help
wou
Oups, I sent the email by error, as I was still writing my replyâ¦
Spencer,
Le 22-avr.-09 à 03:33, spencerg a écrit :
>Is your first model a special case of the second with eta1 = 0?
> If yes, what about using 2*log(likelihood ratio) being approximately
> chi-square?
Yes, the firs
Spencer,
Le 22-avr.-09 à 03:33, spencerg a écrit :
Is your first model a special case of the second with eta1 = 0?
If yes, what about using 2*log(likelihood ratio) being approximately
chi-square?
Yes, the first model is a special case of the second with eta1=0…
Could you give me more e
Or just take every 10th point.
On Wed, Apr 22, 2009 at 10:15 AM, Gabor Grothendieck
wrote:
> Try playing with the h= argument of breakpoints. Another possibility
> is to average each non-overlapping set of 10 points to reduce the
> problem size to 80 and run breakpoints on that. Might not be 1
You need to convert to a matrix and remove names:
> x <- read.table(textConnection("M1 M2 M3 M4 M5 M6 M7 M8 M9 M10
+ 1 9 11 14 15 18 20 20 20 20 20
+ 2 3 4 8 9 11 12 14 15 15 15
+ 3 4 5 8 8 9 9 9 9 9 9
+ 4 4 5 7 8 8 8 8 8 8 9"), header=TRUE)
> closeAllConnections()
> y
Maybe each dataframe you are adding during the loop include the column name.
I would add
write.csv(mydata, file= âdata.csvâ=F, append=T,col.names=F)
Hope that help
Carlos
To: r-help@r-project.org
Sent: Monday, April 20, 2009 4:39:48 PM
Subject: [R] Append
Try playing with the h= argument of breakpoints. Another possibility
is to average each non-overlapping set of 10 points to reduce the
problem size to 80 and run breakpoints on that. Might not be 1 sec
but would likely be much faster.
On Wed, Apr 22, 2009 at 9:45 AM, Hans-Henning Gabriel
wrote:
Really, this depends on what you are trying to do. What's the underlying
problem you are solving? You can save a data frame to a file without
the names, if that's the real question, but I can't think of any reason to
not want names within R.
A matrix does not have to have row and column names, but
Try this:
unname(as.matrix(read.table('your_file.txt')))
On Wed, Apr 22, 2009 at 11:00 AM, tsunhin wong wrote:
> Hello all,
>
> Probably my concepts about the data.frame and matrix and array in R
> are not clear, I need some clarification to help me understand them
> better.
>
> >M <- read.tabl
Hello all,
Probably my concepts about the data.frame and matrix and array in R
are not clear, I need some clarification to help me understand them
better.
>M <- read.table("test1.csv",sep=",",row.names=NULL,header=T)
gives me: M as
M1 M2 M3 M4 M5 M6 M7 M8 M9 M10
1 9 11 14 15 18 20 20 20 20
Gabor, initially this looked like the perfect solution, exactly what I
need.
Unfortunately it is too expensive/costly. I have vectors of length 800
and more, my machine needs > 5 minutes (I aborted) to compute the
breakpoints. Required is computation time < 1 sec. :)
Any other suggestions
Hi,
How about this:
> SNP5 <- merge(SNP4, SNP1[,2:3], all.x=TRUE)
> SNP5
MarkerAnimal Y x
1 P1001 194073197 0.021088 2
2 P1002 194073197 0.021088 1
3 P1004 194073197 0.021088 2
4 P1005 194073197 0.021088 0
5 P1006 194073197 0.021088 2
6 P1007 194073197 0.021088 0
Thi
check out ggplot2 there is an entire website devoted to the package
(and a book also). The R graph gallery has graphs and the code to
produce the graphs.
hope this helps
Stephen Sefick
On Wed, Apr 22, 2009 at 9:01 AM, Christof Winter
wrote:
> Bala subramanian wrote, On 04/21/09 17:07:
>>
>> Fri
Bala subramanian wrote, On 04/21/09 17:07:
Friends,
i) I am new to R. Kindly suggest some resources that has examples of
plotting with R.
I really like:
http://zoonek2.free.fr/UNIX/48_R/03.html
Cheers,
Christof
--
Christof Winter
Bioinformatics Group
Biotechnologisches Zentrum
Technische Uni
Please excuse my nit-picking: In physicists the third and fourth derivative
of position are jerk (or jolt) and jounce, respectively. Impulse is the
integral of force with respect to time.
Charles Annis, P.E.
charles.an...@statisticalengineering.com
phone: 561-352-9699
eFax: 614-455-3265
http:/
Try this:
> a <- c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46);
> ix <- seq_along(a)
> library(strucchange)
> bp <- breakpoints(a ~ ix, h = 4)
> bp
Optimal 3-segment partition:
Call:
breakpoints.formula(formula = a ~ ix, h = 4)
Breakpoints at observation number:
7 11
Correspon
On Apr 22, 2009, at 8:06 AM, Hans-Henning Gabriel wrote:
Hans-Henning Gabriel wrote:
Hi,
suppose I have a simple sorted vector like this:
a <- c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46);
Is there a function in R, I can use to discover that from index 8
to index 11 the values ar
Hans-Henning Gabriel wrote:
Hi,
suppose I have a simple sorted vector like this:
a <- c(2,3,3,5,6,8,8,9,15, 25, 34,36,36,38,41,43,44,44,46);
Is there a function in R, I can use to discover that from index 8
to index 11 the values are changing significantly?
The function should return a value
1 - 100 of 133 matches
Mail list logo