Hi (sorry, I don´t got your name)
May be this help you.
trap$time<-factor(trap$time)
trap$block<-factor(trap$block)
All the best,
miltinho astronauta
brazil
On 7/19/08, hpdutra <[EMAIL PROTECTED]> wrote:
>
>
> Hi everyone. I am trying to add a formula to my data using the
> groupedData
>
Dear all,
I have several sets of x-y-z points and I need to estimate the volume that
encompass all my points.
Recently I got some adivice to show the "convex hull" of my points using
geometry package (see code below).
But now I need to calculate the volume of my set of points.
Any advice are wellc
May be this help you; Just intall.packages("sqldf", dependencies=T)
require(sqldf)
my_df<-data.frame(cbind(gender=sample(c("male","female"),50,replace=T),
age=round(rnorm(50, mean=30, sd=5),0)))
my_df_subset_male<-sqldf("select * from my_df where gender=='male'")
my_df_subset_male
my_df_subset_
Hi Edna,
I am not sure the completely right answer, but I suspect that you use
data(df) to invoke a data.frame from the sample datasets provided from the
packages available on your R system. By other side, if you have a data.frame
loaded on your environent, you can use "attach" do turn the columns
setwd("c:\\temp")
#you need to insert a ENTER after your last value
> df1<-read.table("testinput.txt", head=T, sep="\t")
> df1
Date France Germany
1 3/15/07 1 2
2 3/10/07 2 4
> df2<-read.table("testdate.txt", head=T, sep="\t")
> df2
Date
1 3/15/07
2 3/14/07
3 3/13
Hi Rob Williams
I think it is one way of you do the job.
Cheers,
miltinho astronauta
brazil
my.df<-data.frame(cbind(data=sample(c("mon","sat","sun"), 20, replace=T),
values=rnorm(20)))
my.df$values<-as.numeric(my.df$values)
data.weigth<-read.table(stdin(), head=T, sep=",")
data,weigt
Just to clarify,
if you have two data.frame, one with your data, other with data-admissions,
just use
data.merge<-merge(my.df, data.weigth, by.x="data", by.y="data", all=T)
miltinho
On 7/23/08, milton ruser <[EMAIL PROTECTED]> wrote:
>
> Hi Rob Williams
>
I don´t know what you means by "treat", but may be you want something like
my.df<-read.table(stdin(), head=T, sep=",")
class,frequency
20-23,9
23-25,7
26-28,5
29-31,5
32-34,3
rownames(my.df)<-my.df$class
barplot (my.df$frequency)
axis(1, 1:dim(my.df)[1], rownames(my.df))
Cheers,
miltinho astronau
Like This?
my.df<-read.table(stdin(), head=T, sep=" ")
V5 V5.1 V5.2 V5.3 V5.4 V5.5
-5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183
-5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183
-5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183
-5890
I hope this helps
my.df<-read.table(stdin(), head=T, sep=" ")
V5 V5.1 V5.2 V5.3 V5.4 V5.5
-5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183
-5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.7183
-5890.18905 -6019.84665 -6211.06545 -6198.9353 -6616.8677 -6498.718
quot;, "mean_v1",
"mean_v2",
"rm2", "median_v1", "median_v2")
my.stats
On 7/23/08, Angelo Scozzarella <[EMAIL PROTECTED]> wrote:
>
> Thanks, but I want to calculate index like mean, median .
>
>
> How can I d
Like this?
options (scipen=100)
m <- c(4, 500)
paste("A", m, "B", sep="")
Regards,
Miltinho astronauta
brazil
On 7/24/08, Daren Tan <[EMAIL PROTECTED]> wrote:
>
>
> Instead of
>
> > m <- c(4, 500)
> > paste("A", m, "B", sep="")
> [1] "A4e+08B" "A5e+10B"
>
> I wa
Hi "somebody"
I hope this helps:
df1<-data.frame(cbind(va=runif(3), vb=runif(3)))
df1
df2<-data.frame(cbind(va=runif(3), vb=runif(3)))
df2
df.blank<-data.frame(cbind(va=NA, vb=NA))
df.blank
df.join<-rbind(df1, df.blank, df2)
df.join
Miltinho astronauta
brazil
On 7/25/08, [EMAIL PROTECTED
Hi Jimsong,
If I understood your point, give a look at "adehabitat" and "grasp"
packages.
Almost for adehabitat there are a demo for you see its functionality.
Cheers,
miltinho astronauta
brazil
On 7/26/08, Jinsong Zhao <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Is there a package that could do res
Dear all,
Is there a way of I deal with more than one kind of separators
when reading a asc file using scan() function?
The separators could be ":", "\t" and ";".
Kind regards
miltinho
[[alternative HTML version deleted]]
__
R-help@r-project
John,
I suspect that Patrick is right.
send us a str(df) to we see how your data frame looks like
kind regards
miltinho astronaura
brazil
On 8/1/08, Kerpel, John <[EMAIL PROTECTED]> wrote:
>
> Hi Folks!
>
>
>
> I used the code below previously with no problems, but now I get:
>
>
>
> DTB3<-rea
Hi Etienne
It is not so elegant, bu I think that work.
colname.list<-paste("A",1:5,sep="")
df<-data.frame(matrix(matrix(rep(1,length(colname.list)),1),1))
df
colnames(df)<-colname.list
df
df<-df[-1,]
df
Cheers,
Miltinho Astronauta
Brazil
On 8/4/08, Etienne Bellemare Racine <[EMAIL PROTECTE
Try this
foo1 = function(val)
{
return(d[val])
}
foo1("x")
Good luck
miltinho astronauta
brazil
On 8/6/08, Faheem Mitha <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> Consider the following
>
> x = c(1,2)
>> y = c(3,4)
>> d = data.frame(cbind(x,y))
>> d$x
>>
> [1] 1 2
>
>> d$"x"
>>
> [1] 1
Dear Prof. B.Ripley,
If :
> .Machine$sizeof.pointer
[1] 4
> 2*2*2*2
[1] 16
So I am running with 16 bits?
How can I know the number of bits supported on my machine?
Kindly,
miltinho astronauta
brazil
On 8/8/08, Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
>
> Look at .Machine$sizeof.pointer (i
Dear Sherri Heck,
Try something like:
my.df<-read.table(stdin(), head=T, sep=",")
doy,yr,mon,day,hr,hgt1,hgt2,hgt3,co21,co22,co23,sig1,sig2,sig3,dif,flag
244.02083,2005,09,01,00,2.6,9.5,17.8,375.665,373.737,373.227,3.698,1.107,0.963,-0.509,PRE
244.0625,2005,09,01,01,2.6,9.5,17.8,393.66,384.773,3
Dear Alessando, I don´t know if I understood well your question, but my be
you are not "losting" the precision. Try change the options(digits=10).
If you want to output with "," as sepatator, try something like
write.table(testground, "my_output.txt", sep=",", append=F, quote=F,
row.names=F)
but i
Dear Daniel,
Are you really interested on the analyzis of the effect of ML on Grup, our
on the effect of Grup on ML?
I reproduce your sample database, but "changed" some Grup values from 1 to 2
to allow an analysis of variance.
See the example below.
Vale!
miltinho astronaura
Brazil
GBM<-re
Dear all,
I know that it is a know issue, but I would like to change
the type of font on my plot, and I am not sure the
rigth way. I would like to use Times New Roman font,
but according to the "par()" help, some device allow
we choose an family of fonts. I tryed par(family="times")
without succes
Dear Sagga,
How give a look at the introduction material on
Help / Manual (in pdf) / An introduction to R
HTH
miltinho astronauta
brazil
On 8/27/08, saggak <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I am a post graduate in Statistics. I want to learn R language, but am very
> confused as to how to
Dear Kayj
Try something like
setwd("c:\\temp")
require(MASS)
my.df<-read.table("my_inputfile.txt", sep="\t", head=T)
my.df$newcol<-my.df$col1+my.df$col2+my.df$col3
write.table(my.df, "my_outputfile.txt", append=F, row.names=F, sep="\t")
On the above example, I suppose that your input file are
Hi Yuan,
It is not ellegant, but may work for you..
f<-as.factor(c("a","b","a"))
f.freq<-data.frame(table(f))
f.freq
lower.freq<-2
f.freq.subset<-subset(f.freq,f.freq$Freq>=lower.freq)
f.freq.subset
f.selected<-f[f %in% f.freq.subset$f]
f.selected<-factor(f.selected)
f.selected
Best wishes,
Hi Annie,
create a new data.frame with input variables having all predictors variables
on it.
after give a look at ?predict
best wishes
milton
On Fri, Aug 7, 2009 at 8:19 PM, annie Zhang wrote:
> Hi, R users,
>
> I am trying to use glm to do logistic regression. I know generally when I
> have
Hi cindy,
depends on your data type. It it is points, give a look at spatstat package.
bests
milton
On Sun, Aug 9, 2009 at 5:03 PM, cindy Guo wrote:
> Hi, All,
>
> I am wondering if there is any package which can give the index of the k
> nearest neighbors.
>
> Thank you,
>
> Cindy
>
>
Hi Jill,
Completely not elegant, but may be usefull.
Of course other colleagues will solve this with 1 line command :-)
cheers
milton
df<-read.table(stdin(), head=T, sep=",")
V1,V2,V3,V4
DPA1*,DPA1*,DPB1*,DPB1*
0103,0104,0401,0601
0103,0103,0301,0402
df.new<-as.matrix(df)
for (i in 2:dim(df)[
Hi Hitesh,
while the rigth response not arrive, you can play with:
id<-1:10
x<-runif(10)
y<-runif(10)
plot(x,y)
identify(x, y , labels = id)
Try give a look on spatstat help. I am not quite sure, but may be there you
can find some solution (sorry if it is not true)
cheers
milton
On Wed, Aug 1
Like this?
age<-as.integer(sample(rnorm(100, mean=30, sd=10), replace=T))
height<-as.integer(1+age*rnorm(100,mean=1,sd=0.2))
plot(age, height)
table(age,height)
or
freq=data.frame(table(age,height))
freq<-subset(freq,Freq>0)
freq
bests
milton
On Fri, Aug 14, 2009 at 5:02 AM, rajclinasia wrote
Hi Stephen,
I have read .mdb files using RODBC package.
Try give a look on it.
bests
milton
On Fri, Aug 14, 2009 at 7:55 PM, stephen sefick wrote:
> > library(Hmisc)
> > # Read all tables in the Microsoft Access database blabla.mdb
> > # perhaps better change to Locale in which the .mdb f
Dear all,
how can I setup R(gui) to run some commands evertime R startup?
cheers
milton
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide ht
Hi malcolm,
sorry but your post continue with pour quality, because it is not
reproducible, it is!?
By the way,
gavin.simp...@ucl.ac.uk wrote:
. You really shouldn't call your data, 'data' as it will get very
confusing when you start using modelling functions and using the data
argument, or u
Hi there,
what you means by "complete data".
Read the posting guide, where it is suggested a minimum reproducible code,
as well as good clarification about what you have/get and what you realy
want to get.
bests
milton
On Thu, Aug 20, 2009 at 3:38 AM, rajclinasia wrote:
>
> Hi every one,
>
> I
Try again.
0. read the posting guide.
1. giving a creative "subject title";
2. sending a minimum reproducible code, example, etc.
cheers
milton
On Sat, Aug 22, 2009 at 3:34 PM, Wang qiang wrote:
> dear friends,
> i am now working on a longitudinal data using R. all the analyses have been
> do
Hi gregorio,
I think you can have nested for() without problem, like:
for (i in sth : sth[length(sth)])
{
for (k in A:B)
{
}
}
or you can build conditional for's like:
rangeNegative<-1:10
rangePositive<-1:20
if (rnorm(1)>=0) MYRANGE<-rangePositive
if (rnorm(1)<0)
Hi there,
How about you send a minimum reproducible code as suggested on posting guide
:-)
bests
milton
On Tue, Aug 25, 2009 at 5:48 AM, ogbos okike wrote:
> Good day to you all,
> I have lightning data containing date, time, latitude and longitude. I hope
> that distribution of latitude and
Like tris:
NCols=5
NRows=7
myMat<-matrix(runif(NCols*NRows), ncol=NCols)
myMat
bests
milton
On Mon, Aug 24, 2009 at 6:17 PM, Peng Yu wrote:
> Hi,
>
> I did a search but I was able to find how to generate a random matrix.
> Can somebody let me know how to do it?
>
> Regards,
> Peng
>
>
Hi Bernardo,
I suggest you give a look at:
Dale MRT & Fortin MJ, 2009. Spatial Autocorrelation and Statistical Tests:
Some Solutions.
Journal of Agricultural, Biological and Environmental Statistics,
14(2):188-206.
Cheers
milton
On Tue, Aug 25, 2009 at 1:08 PM, B Garcia Carreras <
bernardo.garc
Hi Gustavo,
depends on how your thematic maps are stored.
Give a look on SPATIAL / CRAN at
http://cran.r-project.org/web/views/Spatial.html
If your data is raster-based, try to give a look on raster package.
bests
milton
On Tue, Aug 25, 2009 at 7:20 PM, dalposso wrote:
>
> how to create a cro
Google "R gallery" :-)
On Wed, Aug 26, 2009 at 7:32 AM, anupam sinha wrote:
> Hi all,
>I am trying to construct a frequency distribution graph i.e.
> suppose there is a variable *"k"* and it takes a range of values. What I
> want to do is to plot *"P(k)" *(probability/frequency of fin
Dear all,
I have about 30,000 matrix (512x512), with values from 1 to N.
Each value on a matrix represent a habitat patch on my
matrix (i.e. my landscape). Non-habitat are stored as ZERO.
No I need to change each 1-to-N values for the same random
number.
Just supose my matrix is:
mymat<-matrix(c(
hink that if I put this on a for() looping it will be very time
expensive,
and as I have a lot of landscapes, I need to speed up it.
Any suggestion?
bests
milton
On Wed, Aug 26, 2009 at 1:12 PM, David Winsemius wrote:
>
> On Aug 26, 2009, at 12:53 PM, milton ruser wrote:
>
> D
sum ( x == i )
> , min = min
> , max = max
>)
> }
> x
> }
> milton ( x = mymat )
>
> --
> David
>
> -
> David Huffer, Ph.D. Senior Statistician
> CSOSA/Washington, DC david.huf...@csosa.gov
> -------
david.huf...@csosa.gov
> -----
>
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of milton ruser
> Sent: Wednesday, August 26, 2009 1:18 PM
&g
t; > From: r-help-boun...@r-project.org
> > [mailto:r-help-boun...@r-project.org] On Behalf Of milton ruser
> > Sent: Wednesday, August 26, 2009 9:54 AM
> > To: r-help@r-project.org
> > Subject: [R] changing equal values on matrix by same random number
> >
> > D
Hi Carlos,
how about this step first:
rownames(mydata)<-gsub("361a","00361a",rownames(mydata))
rownames(mydata)<-gsub("456a","00456a",rownames(mydata))
good luck
milton
On Thu, Aug 27, 2009 at 12:27 PM, Carlos Gonzalo Merino Mendez <
carlosgmer...@yahoo.com> wrote:
> Hello everyone, I would ap
Hi Carlos,
I think I made a wrong suggestion. Sorry about that.
I was thinking that if you have the same rowname length it helps you on the
data handling. Is it true?! Case yes I can try suggest another automatic way
of you get it.
bests
milton
On Thu, Aug 27, 2009 at 12:39 PM, milton ruser
Hi Moumita,
Could you send a "minimum reproducible code" as suggested on posting guide?!
bests
milton
On Fri, Aug 28, 2009 at 8:08 AM, Moumita Das
wrote:
> Hi All ,
> Can anybody tell me if there's any way to get the summarized anova
> values.Now i will explain what i mean , when i say "*summa
Puting my 2cents:
newDF<-data.frame(aggregate(X$PL_Pos, list(X$MyDate), sum))
colnames(newDF)<-c("MyDate","PL_Pos_SUM")
good luck
milton
On Fri, Aug 28, 2009 at 1:03 PM, jim holtman wrote:
> Is this what you want:
>
> > aggregate(X$PL_Pos, list(X$MyDate), sum)
> Group.1x
> 1 2009-08-0
Hi Allen,
have you tryed:
newDF<-sourceDF[,names.species.bio.18]
This will create a new data.frame with only those species you have interest.
By the way, your data.frame is called data? Case yes, avoid this, please.
good luck
milton
On Mon, Aug 31, 2009 at 12:39 PM, AllenL wrote:
>
> Dear
Hi here,
may be you can play with reshape, or may be aggregate and reshape...
good luck
milton
On Tue, Sep 1, 2009 at 2:17 AM, rajclinasia wrote:
>
> Hi Every one,
> I have a dataframe "class" with "name", "sex", "age", "height", "Weight".
> if i caluclate summary statistics with the below co
Hi there,
and how about this:
nsim<-500
est<-NULL
for(i in 1:nsim){
fit <- geese(x ~ trt, id=subject, data=data_gee, family=binomial,
corstr="exch", scale.fix=TRUE)
.
corr_gee<-summary(fit)$correlation[1]
se_corrgee<-summary(fit)$correlation[2]
est<-data.frame(rbind(est,cbind(corr_gee
Hi Karen.
If you are running windows, try:
http://cran.r-project.org/bin/windows/base/
Case it is Vista, see some tips on the same link.
cheers
milton
On Wed, Sep 2, 2009 at 8:13 PM, Karen Federico wrote:
> I'm trying to download this program and I'm not sure how to do it. Can you
> help m
Hi there,
I think the option of 30 seconds is ok because it is less than each one
expent reading the messages :-) Just kiding...
bests
milton
On Wed, Sep 2, 2009 at 8:01 PM, Leo Alekseyev wrote:
> Thanks everyone for the useful suggestions. The bottleneck might be
> memory limitations of my
Hi there,
require(maptools)
?elide
good luck
milton
On Thu, Sep 3, 2009 at 1:04 AM, Hemavathi Ramulu wrote:
> Hi everyone,
> I have coding for repeating pentagon as below:
>
> plot(0:11,type="n")
> for (i in 1:10 )polygon(rep(c(4,5,7,8,6)), i*c(.5,.3,.3,.5,.7), bor=2)
>
> which are increasing ve
Hi Ajay,
To install new packages try:
install.packages("package_name", dependencies=T)
But stats is part of base R. :-)
bests
miltinho
On Thu, Sep 3, 2009 at 6:01 AM, Ajay Singh wrote:
> Dear All,
> I have to install 'stats' package in my windows machine, could you let me
> know how to insta
Hi Annie,
What kind of data (response and explanatory) you have?
As a ecological modeller, I always think first what
is my (our) mind models. After that I analyze a set of
concorrent - *but with ecological meaning* - models.
It helps me to test hypothesis as well as to discuss
the results. If you
Hi Noah,
Next time try, please, send a short reproducible code/example.
May be this can be (not so elegant but) helpfull
myDF<-data.frame(cbind(a=runif(5),b=runif(5)))
myDF
N=2
a.order<-rev(order(myDF$a))[1:N]
b.order<-rev(order(myDF$b))[1:N]
myDF.max2a<-myDF[a.order,]
myDF.max2a
myDF.max2b<-m
Hi Roslina,
x<-runif(1000,min=0, max=600)
hist(x)
x2<-ifelse(x<=300,x,300)
summary(x2)
hist(x2, ,breaks = c(0,50,100,150,200,250,300))
good luck
milton
On Mon, Sep 7, 2009 at 12:51 AM, Roslina Zakaria wrote:
> Hi r-users,
>
> I would like to know how to put all the data that is greater than
May be you also want:
x<-runif(1000,min=0, max=600)
x3<-x[x<=300]
summary(x3)
hist(x3, ,breaks = c(0,50,100,150,200,250,300))
bests
milton
On Mon, Sep 7, 2009 at 1:01 AM, milton ruser wrote:
> Hi Roslina,
>
> x<-runif(1000,min=0, max=600)
> hist(x)
>
> x2&l
Hi Bill,
I am not sure what you want, but...
mydf<-read.table(stdin(), head=T, sep=",")
Np,year
96,2
91,5
89,7
85,10
plot(Np~year, data=mydf)
mymodel<-lm(Np~year, data=mydf)
abline(mymodel, col="red")
bests
milton
On Wed, Sep 9, 2009 at 2:27 PM, Bill Hyman wrote:
> My data look like:
>
> Np
, data=mydf.new, lty=2)
cheers
milton
On Wed, Sep 9, 2009 at 3:01 PM, milton ruser wrote:
> Hi Bill,
>
> I am not sure what you want, but...
>
> mydf<-read.table(stdin(), head=T, sep=",")
> Np,year
> 96,2
> 91,5
> 89,7
> 85,10
>
> plot(Np~year,
You not tryed ?paste :-)
paste(a,b,sep="")
bests
milton
On Wed, Sep 9, 2009 at 5:08 PM, Abhishek Pratap wrote:
> Hi Guys
> I am want to join to strings in R. I am using paste but not getting
> desirable result.
>
> For the sake of clarity, a quick example:
>
> > a="Bio"
> > b="iology"
> > pas
Hi Karen,
As you are just starting (I guess), I suggest you take a shortcut:
1. copy and paste the data from Excel to the notepad, and
save it as .TXT
2. If all is ok, you will have a tab-delimited file.
3. Be sure that your variables have its names on first line
4. read your data using
setwd("c:
By the way, how about:
plot(y,mylm$residuals)
So you can have an idea of your error distribution across your response
variable domain. :-)
milton
toronto=brazil
On Sat, Sep 19, 2009 at 9:02 PM, Sunil Suchindran wrote:
> x <- seq(50)
>
> y <- 10 + x * 2 + rnorm(50,0,10)
>
> plot(y~x)
>
> mylm =
Tammy
Try avoid directories with spaces... may be this solve your problem.
Case not, write us again.
bests
milton
On Mon, Sep 21, 2009 at 10:05 AM, Tammy Ma wrote:
>
>
> HI, All R users,
>
> My problem is:
>
> > fn
> [1] "C:/Documents and
> Settings/lma/Desktop/FamilyAEntrepreneurs/Entrepreneu
Hi Maggie:
1) plot() combined with lines() may do the job.
2) google "R graph gallery"
bests
milton
On Tue, Sep 22, 2009 at 5:23 PM, Maggie wrote:
> Hello, I need to superimpose two graphs (plotted representations of
> waver files) so I can see how much they align. Is there a quick and
> di
Have you looked at ts() ?
On Tue, Sep 22, 2009 at 5:49 PM, Maggie wrote:
> I was wondering how to correlate two time series in R? I have to
> plotted waver files I need to correlate to one another to see how well
> they align..
>
> Any guidance would be very much appreciated!
>
> ___
Hi Raging Jim
may be this is a starting point.
myDF<-read.table(stdin(),head=T,sep=",")
mm,Rainfall
1977-02,17.4
1977-03,34.0
1977-04,26.2
1977-05,42.6
1977-06,58.6
1977-07,23.2
1977-08,26.8
1977-09,48.4
1977-10,47.0
1977-11,37.2
1977-12,15.0
1978-01,2.6
1978-02,6.8
1978-03,9.0
1978-04,46.6
Dear all,
I have a data.frame with a column like the x shown below
myDF<-data.frame(cbind(x=c("[[1, 0, 0], [0, 1]]",
"[[1, 1, 0], [0, 1]]","[[1, 0, 0], [1, 1]]",
"[[0, 0, 1], [0, 1]]")))
> myDF
x
1 [[1, 0, 0], [0, 1]]
2 [[1, 1, 0], [0, 1]]
3 [[1, 0, 0], [1, 1]]
4 [[0, 0,
Try: as.numeric(as.character( typec))
milton
On Mon, Mar 8, 2010 at 12:55 PM, Xumin Zeng wrote:
> Here is the example.
>
> > age=18:29
> > height=c(76.1,77,78.1,78.2,78.8,79.7,79.9,81.1,81.2,81.8,82.8,83.5)
> > type=c("A", "B", "C", "D","A", "B", "C", "D","A", "B", "C", "D")
> > typec=c("0","4",
Try
data2$X<-factor(data2$X)
By the way, avoid call data as "data", matrix as "matrix", vector as
"vector".
cheers
milton
On Wed, Mar 10, 2010 at 4:35 PM, clee wrote:
>
> If anyone can help with this, I would greatly appreciate it.
>
> When I subset a dataframe, and then create a table of on
Hi Olga,
may be you can work around with the suggestions below, while other
provide the best solution for your:
barplot(c(1,2,3,5,2,3,1),names.arg=c("100","200","300","400","500","600","700"),
xlab="diameter",ylab="flow",main="some title",space=0.1)
lines(lowess(c(1,2,3,5,2,3,1),f=1), type="b",
Hi Zhongyi,
I must confess I not understood completely what you need, but...
Tau<-seq(0.05,0.95,0.05);
Pi <- seq(0.19,0.01,-0.01);
par(cex.axis=0.8,ps=9,mar=c(1.5,1,0.5,1), oma=c(1,1,0.2,1) ,tck=-0.01);
plot(Tau,Pi, type='l', xlab="Tau",ylab="Pi",col=4, xaxt="n", yaxt="n");
axis(1,labels=F)
axis(
Hi there,
I have both systems on a DELL 64bit machine.
I compiled R 2.9.0 on both systems, to get 64bits capability.
Surpriselly, on Linux (Ubuntu with I installed 3 month ago) I spent 41s to
run the same test you did, and less time (35s) under Vista. In fact I had
noticed that I not have gained t
Hi Kavitha,
I must confess you that I not understood well what you are looking for.
But..
mylist<-list(x=1:25, y=runif(n=25))
plot(mylist, type="n")
points(mylist, type="p", col=mylist$x)
Hth,
miltinho
On Sun, Jun 28, 2009 at 1:03 AM, Kavitha Venkatesan <
kavitha.venkate...@gmail.com> wrote:
Really?
In fact I have a quadcore. But how can I know if Linux are really using only
one core, and how can I setup it to use the 4cores?
Thanks a lot,
milton
On Mon, Jun 29, 2009 at 1:46 AM, Patrick Connolly <
p_conno...@slingshot.co.nz> wrote:
> On Fri, 26-Jun-2009 at 04:37PM -040
Like this?
x<-1:100
y<-runif(100)
df<-data.frame(cbind(x,y))
mycoef.list<-NULL
for (i in 10:65)
{
mycoef<-coef(lm(y~x, data=subset(df, x %in% 1:i)))[2]
mycoef.list <-c(mycoef.list, mycoef)
}
hist(mycoef.list)
regards
milton
brazil=toronto
On Mon, Jun 29, 2009 at 2:50 PM, Hongwei Dong wrot
How about:
dev.cur()
dev.list()
dev.next(which = dev.cur())
dev.prev(which = dev.cur())
dev.off(which = dev.cur())
dev.set(which = dev.next())
dev.new(...)
graphics.off()
dev.cur()
dev.list()
dev.next(which = dev.cur())
dev.prev(which = dev.cur())
dev.off(which = dev.cur())
dev.set(which = dev.nex
Hi Andriy Fetsun,
How about include a "subject title" on the subject of the email like "length
funcion not work".
By the say, send us the result of str(your_object).
Bests
milton
brazil=toronto
On Thu, Jul 2, 2009 at 9:01 AM, Andriy Fetsun wrote:
> Hi Guys,
>
> It is very simple question, but
Hi Christine,
How about try again?
Cheers
milton
On Mon, Jul 6, 2009 at 11:34 AM, Christine Griffiths <
christine.griffi...@bristol.ac.uk> wrote:
> Hi R Users,
>
> Hopefully a very simple solution, but I am stumped nevertheless. I am
> running glmer in which the output is too large so that n
hi hema
may be strsplit can help on the job.
bests.
milton
On Tue, Jul 7, 2009 at 3:54 AM, Hemavathi Ramulu wrote:
> Hi everyone,
> Hi want to separate the string(column1) for example
>
> column1 column2 column3 column4 column5 column6
> bear b e a r
>
Hi there,
?reshape do the job.
bests
milton
On Thu, Jul 9, 2009 at 9:31 PM, roachyang wrote:
>
> I want to transpose a dataframe like
> level 2006 2007 2008
>A
>B .
>C
> into
> levelyear
>A 2006
>
Hi roachyang,
you need to be more precise on your email.
But believe that you tryed one of the funtions like reshape or transform and
the output has been printed on your R session. If your dataset are large, is
better you assign your output on a object - like myobj<-reshape(...) - and
then save yo
Hi Rajesh,
As you was little clean on your asking, try give a look at one of those
pages.
http://finzi.psych.upenn.edu/R/library/msm/html/msm.html
http://finzi.psych.upenn.edu/R/library/msm/html/hmm-dists.html
http://finzi.psych.upenn.edu/R/library/mhsmm/html/hsmmspec.html
http://finzi.psych.upen
n Fri, Jul 10, 2009 at 4:04 AM, rajesh j wrote:
> Hi,
>
> I actually dont need something thats about hmm's.Something like the plotmat
> in diagram package would suffice.But I need to be able to include plots
> beside the graph nodes.
>
>
> On Fri, Jul 10, 2009 at 12:
Hi Mark,
Like this?
mydf<-read.table(stdin(), head=T)
Trade PosType EnDate EnTime ExDate ExTime PL_Pos
1 1 1040107915 1040107 1300164
2 1 1040108909 1040108 1300184
3 1 1040115921 1040115 1300 64
4 1 1040120 1134 1040120 1300124
5
Hi Derek,
like this?
myfunction<-function(xmin, xmax, number_of_values)
{
xvalues<-seq(from=xmin, to=xmax, by = ((xmax - xmin)/(number_of_values -
1)))
outputvalues<-xvalues^2+(xmax/xvalues)^3*runif(number_of_values)
return(outputvalues)
}
my.values<-myfunction(1,10,100)
min(my.values)
max(m
Martin,
If I am not wrong the difference is that if you has two levels you get
U-test, and W-test for more than two levels. But the test is almost the
same.
cheers
milton
On Sat, Jul 11, 2009 at 2:13 PM, Martin Batholdy wrote:
> Hi,
>
> I know that I can perform a Mann-Whitney U test with wi
*hum*
I prefer stdin() because you not need to explain to your student or
beginners about TextConnection.
cheers
milton
On Sat, Jul 11, 2009 at 4:38 PM, Muenchen, Robert A (Bob)
wrote:
> Dear R-helpers,
>
> I know of two ways to reading data within an R program, using
> textConnection and stdi
The first think one need to do when has a so old version, is update it :-)
After, if the problem remain, try get help with the colleagues.
best
milton
On Thu, Jul 9, 2009 at 10:58 AM, Damien Moore wrote:
> Hi List
>
> I'm having difficulty understanding how plm should work with dynamic
> formul
Dear all,
I'm trying to compile R 2.9.1 on my home directory under debian,
and as I need to play with RPy, I tryed compile R using:
./configure --enable-R-shlib
But, during the compilation, I get the error below:
-
using as R_SHELL for scripts ... /bin/sh
conf
Dear R-friends,
I removed the directory, untarzed the source files and
now I can compile the R.
Thanks for those suggested it off-list.
Bests
milton
On Thu, Jul 16, 2009 at 6:08 PM, milton ruser wrote:
> Dear all,
>
> I'm trying to compile R 2.9.1 on my home directory under de
*hum*
How much of the "employes" of your institute use statistical softwares? 1-5?
5-20? 20-50?
I think a brief description could help on the discussion.
cheers
milton
On Thu, Jul 16, 2009 at 5:40 PM, Kel Lam wrote:
> My institute has been heavily dependent on SAS for the past while, and
> S
Hi there,
try this:
setwd("/home/mcr")
dir(path=".", pattern=".txt$")
OR
dir(path="/home/mcr/.", pattern=".txt$")
$ means finished with ".txt"
good luck,
milton
brazil=toronto
On Fri, Jul 17, 2009 at 12:08 AM, torpedo fisken wrote:
> Hi
> I got a script that works on file with the extensio
require(vegan)
library(help=vegan)
:-)
On Mon, Jul 20, 2009 at 2:03 PM, Noah Silverman wrote:
> Hello,
>
> I'm coming from RapidMiner, so some of the "easy" things there are a bit
> difficult for me to find in R
>
> How do I normalize data in a data frame. Ideally I want to scale the
> values f
May be:
text(.1*max(all$AREA),.9*max(all$SR),"text to be placed")
?
bests
milton
On Tue, Jul 21, 2009 at 5:03 PM, Mark Na wrote:
> Dear R-helpers,
>
> I wish to place some text in a plot, at approx 10% of my upper xlim and
> approx 90% of my upper ylim, i.e.
>
> > plot(log(all$SR,10)~log(all
try your first "reproducible line" first :-)
On Thu, Jul 23, 2009 at 5:18 PM, Alexis Maluendas wrote:
> Hi R experts,
>
> I need know how calculate a weighted mean by group in a data frame. I have
> tried with aggragate() function:
>
> data.frame(x=c(15,12,3,10,10),g=c(1,1,1,2,2,3,3),w=c(2,3,1,
1 - 100 of 295 matches
Mail list logo