Hi Henrique,
Thanks for your reply.
I tried you suggestion but it didn't work with the poLCA package.
Maybe i didn't express myself good.
The normal syntax is:
f - cbind(V1,V2,V3)~1
poLCA(f,data)
and what I wanna do is kind of use an expression to automatically
generate the V1,V2,V3 argument
Hi
r-help-boun...@r-project.org napsal dne 09.09.2009 10:07:49:
Hi Henrique,
Thanks for your reply.
I tried you suggestion but it didn't work with the poLCA package.
Maybe i didn't express myself good.
The normal syntax is:
f - cbind(V1,V2,V3)~1
poLCA(f,data)
You complicated it a
Hi Paul,
I've tried your solutions and it works great... still my eps viewer
(CocoViewX) doesn't visualize them well, but the pdf converter (I use
mac, the Finder does this conversion automagically) visualize all the
images correctly
thank you very much for your help!
simone
Il giorno
Dear all
I have a simple problem which I thought is easy to solve but what I tried
did not work. I want to change character variables to factor in data
frame. It goes easily from factor to character, but I am stuck in how to
do backwards conversion.
Here is an example
irisf-iris
Hi,
I would like to create variables in R containing parameters of
summary(*Forecast
Results*).
Using the following code:
library(forecast)
data - AirPassengers
xets - ets(data, model=ZZZ, damped=NULL)
xfor - forecast(xets,h=12, level=c(80,95))
summary(xfor)
the output is:
Forecast method:
Super! It works. :-) Thanks a lot, you both.
Greetings
Jürgen
Petr PIKAL schrieb:
Hi
r-help-boun...@r-project.org napsal dne 09.09.2009 10:07:49:
Hi Henrique,
Thanks for your reply.
I tried you suggestion but it didn't work with the poLCA package.
Maybe i didn't express myself
Dear all,
Lets say I have a data frame as follows:
Date - as.Date(c('2006-08-23', '2006-08-30', '2006-09-06', '2006-09-13',
'2006-09-20'))
Income - c(73.79, 72.46, 76.32, 72.43, 72.62)
data.frame(Date, Income)
Date Income
1 2006-08-23 73.79
2 2006-08-30 72.46
3 2006-09-06 76.32
Hi Clair,
try to use this code
aggregate(toto$Income,by=list((substr(toto$Date,1,7))),sum)
Regards
mohamed
clair.crossup...@googlemail.com a écrit :
Dear all,
Lets say I have a data frame as follows:
Date - as.Date(c('2006-08-23', '2006-08-30', '2006-09-06', '2006-09-13',
From: Rolf Turner
On 8/09/2009, at 9:07 PM, FMH wrote:
Dear All,
I'm looking for a way on computing the derivative of first and
second order of a smoothing curve produced by a nonprametric
regression. For instance, if we run the R script below, a smooth
nonparametric
Try this:
rowsum(Income, format(Date, '%m-%Y'))
or
tapply(Income, format(Date, '%m-%Y'), sum)
On Wed, Sep 9, 2009 at 7:51 AM, clair.crossup...@googlemail.com
clair.crossup...@googlemail.com wrote:
Dear all,
Lets say I have a data frame as follows:
Date - as.Date(c('2006-08-23',
Just one other addition. If by monthly summary you mean a summary
that has an entry for each year/month combo rather than just one
entry for all Januaries, one entry for all Februaries etc. then try this
which works in both the Date and chron cases:
aggregate(z, as.yearmon, mean)
On Tue, Sep
Dear R-users,
I´m having for the first time a problem while printing out values in the
screen,
I have a function wich takes quite a long time to execute, and I thought
it´d be useful to insert a print statement inside the main loop to keep
control of the current iteration,
however, for some
Dear All,
Someone suggesting me to use the filled.contour function to plot the image
together with the color index, and an example from the help menu is show below.
#
require(grDevices) # for colours
Thank you very much for the help!
Now, I have an additional question regarding transcending from Design to
rms: Before, it was possible to plot interaction, and get lines with
plot(ols2, gender=NA, marital.status=NA, xlab='gender',
ylab='anxiety', conf.int=FALSE)
Now, I am lost how to do
Try this:
accuracy(xfor)
The model information can be obtained by:
xfor$model
On Wed, Sep 9, 2009 at 8:11 AM, Pedro Souto pmmso...@gmail.com wrote:
Hi,
I would like to create variables in R containing parameters of
summary(*Forecast
Results*).
Using the following code:
Dear Steve,
Here are a fex examples for empirical variograms using ggplot2
library(gstat)
library(ggplot2)
data(meuse)
coordinates(meuse) = ~x+y
vgIso - variogram(log(zinc)~x+y, meuse)
vgIso$id - iso
vgAniso - variogram(log(zinc)~x+y, meuse, alpha=c(0,45,90,135))
vgAniso$id - aniso
Empirical -
You could use lapply indeed of sapply:
irisf[,index] - lapply(irisf[,index], as.factor)
str(irisf)
On Wed, Sep 9, 2009 at 8:06 AM, Petr PIKAL petr.pi...@precheza.cz wrote:
Dear all
I have a simple problem which I thought is easy to solve but what I tried
did not work. I want to change
Hi
I am facing an error after using ksvm() and/or svm() when I can call predict()
it is giving me the error:
Error in .local(object, ...) : test vector does not match model !
My dimentions of trainingset is 134 x 95 and validationset is 66 x 94
sample code of prediction:
model.ksvm =
See ?flush.console
for (i in 1:1e2){
print(i)
flush.console()
}
On Wed, Sep 9, 2009 at 7:28 AM, Amparo Albalate
amparo.albal...@uni-ulm.dewrote:
Dear R-users,
Iæ´ having for the first time a problem while printing out values in the
screen,
I have a function wich takes quite a long
If you are running with RGUI, change the mode to nonbuffered output
under the Misc tab or use flush.console()
On Wed, Sep 9, 2009 at 6:28 AM, Amparo
Albalateamparo.albal...@uni-ulm.de wrote:
Dear R-users,
I惴 having for the first time a problem while printing out values in the
screen,
I have a
Dear r-Community,
Step1: I would like to calculate a NMDS (package vegan, function metaMDS) with
species data.
Step2: Then I want to plot environmental variables over it, using function
envfit.
The Problem: One of these environmental variables is cos(EXPOSURE). But for
flat releves there is no
From: Carlos Alzola calz...@cox.net
To: r-help@r-project.org
Date: Tue, 8 Sep 2009 23:19:11 -0400
Subject: [R] SAS vs. R in web application
Good evening,
I have been asked to investigate the pros and cons of using SAS vs. R in a
web application. Either SAS or R would be the engine used to
Petar Milin wrote:
Thank you very much for the help!
Now, I have an additional question regarding transcending from Design to
rms: Before, it was possible to plot interaction, and get lines with
plot(ols2, gender=NA, marital.status=NA, xlab='gender',
ylab='anxiety', conf.int=FALSE)
Now,
My guess is that by table you are really looking for a 'dataframe'.
Further, I guess that an indexed format is most useful to you.
Try:
# Create the requested dataframe
dat=data.frame(type=c(rep(Hypermarket,10),rep(Supermarket,15),rep(Minimarket,20),rep(Cornershop,20),rep(Spazashop,35)),
On Wed, 2009-09-09 at 14:43 +0200, Kim Vanselow wrote:
Dear r-Community,
Step1: I would like to calculate a NMDS (package vegan, function
metaMDS) with species data.
Step2: Then I want to plot environmental variables over it, using
function envfit.
The Problem: One of these environmental
Dear Jim,
Thanks for telling me about gc() - that may help.
Here's some more detail on my function. It's to implement a methodology for
classifying plant communities into functional groups according to the values of
species traits, and comparing the usefulness of alternative classifications
Dear All
I new to using R and am struggling with some matrix multiplication.
I have two matrices, one containing random numbers, these are multiplied
together to get another matrix which is different each time. When I put in
another for loop to repeat this process a multiple times the matrices
This may be overkill for your application, but you might be
interested in the fda package, for which a new book appeared a couple
of months ago: Functional Data Analysis with R and Matlab (Springer
Use R! series, by Ramsay, Hooker and Graves; I'm the third author).
The package includes
If it is taking 10 hours to run, you might want to use Rprof on a
small subset to see where time is being spent. Also can you use
matrices instead of dataframe because there is a cost in accessing
them if you are just using them in a matrix-like way. Take a look at
the output from Rprof and that
I am not sure what you mean by being the same each time. If I make
successive calls to the function, I get different results:
z
[,1]
[1,] 0.
[2,] 0.
[3,] 201.6382
[4,] 0.
[5,] 0.
[6,] 0.
[7,] 0.
matmult(InitialPop,1)
[,1]
[1,] 0.000
[2,]
A clumsy way but it seems to work
data - data.frame(cbind(k = 0:3, fk = c(11, 20,7,2), f0k = c(13.72,
17.64, 7.56, 1.08), fkest = c(11.85, 17.78, 8.89, 1.48)))
d - t(data[,2:4])
# barplot(d, beside=TRUE)
xps1 - xps2 -
On Wed, Sep 9, 2009 at 5:43 AM, Kim Vanselowvanse...@gmx.de wrote:
Dear r-Community,
Step1: I would like to calculate a NMDS (package vegan, function metaMDS)
with species data.
Step2: Then I want to plot environmental variables over it, using function
envfit.
The Problem: One of these
Do you run into problems if you use something like:
cc - rep(numeric,9)
mydata - read.table(yourdata,header=TRUE,colClasses=cc,skip=1,nrows=numRows)
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Have a look at ?IQR
Note that this function computes the quartiles using the quantile function
rather than following Tukey's recommendations, i.e., IQR(x) = quantile(x,3/4) -
quantile(x,1/4).
It looks like boxplot() gives the results you expect.
tt - boxplot(x)
tt
--- On Tue,
I am Arif. I have made program code for Vector Auto Regressive in terms
of completing my undergraduate program using R. I have an important
question related to my project.
If I have:
data(Canada)
var.2c - VAR(Canada, p = 2, type = const)
var.2c.stabil - stability(var.2c,
Hi,
I have a weird problem with my data but I cannot really locate it and cannot
make a small example data set do reproduce the problem.
I basically divide one numerical column of a data frame with another. When I
run describe() on that column, I get
Error in vector(integer, length) : vector
Sorry, I hope this will be the last (for now, at least).
Following your advices, I did:
n - 100
anxiety - c(rnorm(n, 10, 2.5), rnorm(n, 26, 3.2),
rnorm(100, 25, 3.1), rnorm(100, 10, 2.6))
m.status - c(rep('married', n*2), rep('not married', n*2))
gender - c(rep('male', n), rep('female',
Hi all,
I try to represent a multiple curve graphic where the x-axis is the
temperature and the different y-axes are the different X (X22,X43,X44...)
some X corresponds to the same molecule (22 and 44 are for CO2 for instance)
so I use the same colour for them.
I wanna mix the linetype with
dear All,
i'm using the following two functions:
share.vector - function (vec1)
{
vec1 - vec1 - max(vec1,na.rm=TRUE) -0.1 ## this line avoids overflow
vec1 - exp(vec1)
vec2 - vec1/(1+sum(vec1,na.rm=TRUE))
vec2
}
share.matrix - function (mat1)
{
out1 - apply(mat1,2,share.vector)
What is wrong with using plot(..., type=h)?
data - data.frame(cbind(k = 0:3, fk = c(11, 20,7,2), f0k = c(13.72,
17.64, 7.56, 1.08), fkest = c(11.85, 17.78, 8.89, 1.48)))
d - t(data[,2:4])
plot(rep(1:4,3)+rep(seq(-0.1,0.1,0.1), 4), as.vector(d), col=rep(1:3,
each=4),type=h, lwd=3,
Petar Milin wrote:
Sorry, I hope this will be the last (for now, at least).
Following your advices, I did:
n - 100
anxiety - c(rnorm(n, 10, 2.5), rnorm(n, 26, 3.2),
rnorm(100, 25, 3.1), rnorm(100, 10, 2.6))
m.status - c(rep('married', n*2), rep('not married', n*2))
gender - c(rep('male',
Inline below.
Bert Gunter
Genentech Nonclinical Biostatistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Ben Bolker
Sent: Tuesday, September 08, 2009 7:29 PM
To: r-help@r-project.org
Subject: Re: [R] optim() argument scoping:
RFish wrote:
I new to using R and am struggling with some matrix multiplication.
I'm not sure what you're trying to print, but you could place this vector in
an expression
My bad memory? I forgot that option existed.
--- On Wed, 9/9/09, S Ellison s.elli...@lgc.co.uk wrote:
From: S Ellison s.elli...@lgc.co.uk
Subject: Re: [R] barplot with lines instead of bars
To: r-help@r-project.org, John Kane jrkrid...@yahoo.ca
Received: Wednesday, September 9, 2009, 12:02
The code below seems to contradict your claim that vectors cannot
contain vectors.
zz - vector(mode = list, length = 3)
zz
[[1]]
NULL
[[2]]
NULL
[[3]]
NULL
Best,
Giovanni
Date: Tue, 08 Sep 2009 23:00:54 -0500 (CDT)
From: sclar...@illinois.edu
Sender: r-help-boun...@r-project.org
Hello Kim Gav,
Gavin Simpson gavin.simpson at ucl.ac.uk writes:
On Wed, 2009-09-09 at 14:43 +0200, Kim Vanselow wrote:
Dear r-Community,
Step1: I would like to calculate a NMDS (package vegan, function
metaMDS) with species data.
Step2: Then I want to plot environmental variables
Sorry I probably wasn't clear with my description. The reason i put for loop
in was that I want to do the matrix multiplication about 1000 times to get a
1000 different matrices. Therefore I was hoping the for loop would be able
to automate this then use write.table to write to an external
Apologies for what might seem like an simple question.
I have written a model which gives me a frequency distribution for a
particular score within a set. What I now want to do is loop this so that I
get many different frequency distributions and append them to a table with a
collum which
Sometimes it's the simple things...
Why doesn't this lag X$x by 3 and place it in X$x1? (i.e. - Na's in
the first 3 rows and then values showing up...)
The help page does talk about time series. If lag doesn't work on
data.frame columns then what would be the right function to use to lag
by a
If the result of the 'table' is a different length each time, then you
will have to consider the use of a list. If it is the same length,
then something like this should work
results - matrix(ncol=50, nr=10)
for (i in 1:50) results[,i] - your computation for table
On Wed, Sep 9, 2009 at 12:40
On Wed, 9 Sep 2009, Mark Knecht wrote:
Sometimes it's the simple things...
Why doesn't this lag X$x by 3 and place it in X$x1?
It does.
(i.e. - Na's in the first 3 rows and then values showing up...)
Because this is not how the ts class handles lags.
What happens is that X$x is
Try this:
x - 1:10
head(c(rep(NA, 3), x), -3)
[1] NA NA NA 1 2 3 4 5 6 7
tail(c(x, rep(NA, 3)), -3)
[1] 4 5 6 7 8 9 10 NA NA NA
depending on which direction you want.
On Wed, Sep 9, 2009 at 1:43 PM, Mark Knecht markkne...@gmail.com wrote:
Sometimes it's the simple things...
I only have 4 data points and want to fit a curve. It does not work in modreg
due to too few data. Do you have any idea? Many thanks!
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
My data look like:
Np year
962
915
897
85 10
- Original Message
From: Bill Hyman billhym...@yahoo.com
To: r-help@r-project.org
Sent: Wednesday, September 9, 2009 11:23:26 AM
Subject: [R] fitting nonlinear model
I only have 4 data points and want to fit a curve. It does
Hi All
Thanks for the pointers. reading them I see that what I intend to can
certainly be done without much pain. However with my test scripts I am not
able to fully understand Rscript. The ?Rscript option doesnt print out a lot
to help me get the minute details.
Any good example/s or some info
Is this what you want?
x - structure(list(Temp = c(25.9765, 26.57025, 27.164, 27.7565, 28.34892,
28.94142, 29.53125, 30.12233, 30.71483, 31.30983, 31.90233, 32.49475,
33.08458, 33.67575, 34.26558, 34.85933, 35.45183, 36.04683, 36.63933,
37.23042, 37.82417, 38.414), X22 = c(4.62e-12, 4.73e-12,
Thanks, Paul.
In fact I had been hoping to lure you to the surface, from the
12740-km ocean depths which you inhabit, during our hours of
darkness!
Your suggested modification of the options in the embedFonts
command indeed produces an EPS file which displays without clipping.
However, when
Put this line in a file called test.R:
cat(command args are:\n); print(commandArgs())
and then call it like this from the shell or Windows cmd line assuming
that Rscript is in your path:
Rscript test.R abc def
On Wed, Sep 9, 2009 at 2:37 PM, Abhishek Pratap abhishek@gmail.com wrote:
Hi
Bill Hyman wrote:
My data look like:
Np year
962
915
897
85 10
And which equation are you trying to fit to this data?
-Charlie
-
Charlie Sharpsteen
Undergraduate
Environmental Resources Engineering
Humboldt State University
--
View this message in context:
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 billhym...@yahoo.com wrote:
My data look
Hi Milton,
Thanks for your help. Actually, I would like to fit a non-linear fashion. For
some data like below, 'lm' may not work very well. Do you have idea? Thanks
again!
Bill
0 1
2 0.9
5 0.5
7 0.1
10 0.01
From: milton ruser milton.ru...@gmail.com
I am wondering if you know how to return by function or show in boxplot,
the indexes of unusual points, such as,
points that are outside the box or in [Q3+1.5IQR,Max].
For example,
boxplot(c(4,rnorm(20),8))
There are 2 unusual points 4 and 8. How to show the indexes of 4 and 8 in
the boxplot
or
Bill Hyman wrote:
Hi Milton,
Thanks for your help. Actually, I would like to fit a non-linear fashion.
For some data like below, 'lm' may not work very well. Do you have idea?
Thanks again!
That's why information equation you are trying to fit is very important. For
example, the
Hi R users,
I have a question. How can I see the code behind the function. For example,
boxplot
function (x, ...)
UseMethod(boxplot)
environment: namespace:graphics
I really would like to see how people code this. Could someone please show
me how to see the code behind the function?
Many
May be this:
mydf-read.table(stdin(), head=T, sep=,)
Xvar,Yvar
0,1
2,0.9
5,0.5
7,0.1
10,0.01
mymodel-loess(Yvar~Xvar, data=mydf)
plot(mymodel)
mydf.new-data.frame(cbind(Xvar=seq(from=0, to=10, by=0.1)))
mydf.new$Yvar-predict(mymodel, newdata=mydf.new)
lines(Yvar~Xvar, data=mydf.new, lty=2)
Kabeli
I think this is what you want:
Hypermarket - matrix(rnorm(10, mean=2, sd=7000))
Supermarket - matrix(rnorm(15, mean=12000, sd=4000))
Minimarket - matrix(rnorm(20, mean=1, sd=4000))
Cornershop - matrix(rnorm(20, mean= 8000, sd=3000))
Spazashop - matrix(rnorm(35, mean= 7000,
--
How can I see the code behind the function. For example,
boxplot
function (x, ...)
UseMethod(boxplot)
environment: namespace:graphics
I really would like to see how people code this.
Try this:
bp - boxplot(c(4,rnorm(20),8))
bp$out
On Wed, Sep 9, 2009 at 4:25 PM, g...@ucalgary.ca wrote:
I am wondering if you know how to return by function or show in boxplot,
the indexes of unusual points, such as,
points that are outside the box or in [Q3+1.5IQR,Max].
For example,
Chunhao Tu wrote:
Hi R users,
I have a question. How can I see the code behind the function. For
example,
boxplot
function (x, ...)
UseMethod(boxplot)
environment: namespace:graphics
I really would like to see how people code this. Could someone please show
me how to see the
boxplot returns a dataframe that has the values in it at $out:
x - boxplot(c(4,rnorm(20),8))
x
$stats
[,1]
[1,] -1.5364498
[2,] -0.5282799
[3,] -0.1398736
[4,] 0.3065579
[5,] 1.3430388
$n
[1] 22
$conf
[,1]
[1,] -0.4210947
[2,] 0.1413474
$out
[1] 4 8
$group
[1] 1 1
On Wed, Sep 9, 2009 at 11:09 AM, Achim Zeileis
achim.zeil...@wu-wien.ac.at wrote:
On Wed, 9 Sep 2009, Mark Knecht wrote:
Sometimes it's the simple things...
Why doesn't this lag X$x by 3 and place it in X$x1?
It does.
(i.e. - Na's in the first 3 rows and then values showing up...)
Thank you very much.
But it seems that
x$out returns the values not the indexes of the values (1,22).
-james
boxplot returns a dataframe that has the values in it at $out:
x - boxplot(c(4,rnorm(20),8))
x
$stats
[,1]
[1,] -1.5364498
[2,] -0.5282799
[3,] -0.1398736
[4,]
use 'match' to get the indices;
match(x$out, yourData)
On Wed, Sep 9, 2009 at 4:07 PM, g...@ucalgary.ca wrote:
Thank you very much.
But it seems that
x$out returns the values not the indexes of the values (1,22).
-james
boxplot returns a dataframe that has the values in it at $out:
x -
Hi James,
If that's the case, then
set.seed(123)
x - c(4,rnorm(20),8)
bp - boxplot(x)
bp$out
# [1] 4 8
which(x %in% bp$out)
# [1] 1 22
is what you are looking for. :-)
HTH,
Jorge
On Wed, Sep 9, 2009 at 4:07 PM, g...@ucalgary.ca wrote:
Thank you very much.
But it seems that
x$out returns
Hello.
I'm trying to find a way in R to calculate between and within subject
variances and confidence intervals for some analytical method
development data.
I've found a reference to a method in Burdick, R. K. Graybill, F. A.
1992, Confidence Intervals on variance components, CRC Press.
Thanks for your help.
-jmaes
Hi James,
If that's the case, then
set.seed(123)
x - c(4,rnorm(20),8)
bp - boxplot(x)
bp$out
# [1] 4 8
which(x %in% bp$out)
# [1] 1 22
is what you are looking for. :-)
HTH,
Jorge
On Wed, Sep 9, 2009 at 4:07 PM, g...@ucalgary.ca wrote:
Thank you
Thank you very much, now i can proceed to my next task. THANK YOU
--- On Wed, 9/9/09, Schalk Heunis schalk.heu...@enerweb.co.za wrote:
From: Schalk Heunis schalk.heu...@enerweb.co.za
Subject: Re: [R] Combining simulated data
To: KABELI MEFANE kabelimef...@yahoo.co.uk
Cc: R-help@r-project.org
You not tryed ?paste :-)
paste(a,b,sep=)
bests
milton
On Wed, Sep 9, 2009 at 5:08 PM, Abhishek Pratap abhishek@gmail.comwrote:
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
And did you read the help file, ?paste , paying attention to the arguments and
their descriptions, specifically the sep argument? Presumably, you want,
paste(a, b, sep = )
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of
I did try ?paste and paste(a,b,separator=). same result
Thanks,
-Abhi
On Wed, Sep 9, 2009 at 5:11 PM, milton ruser milton.ru...@gmail.com wrote:
You not tryed ?paste :-)
paste(a,b,sep=)
bests
milton
On Wed, Sep 9, 2009 at 5:08 PM, Abhishek Pratap abhishek@gmail.comwrote:
Hi Guys
guys I am sorry may be it is that part of the day where my eyes are not able
to read.
using separator instead of sep.
Thanks a lot,
-Abhi
On Wed, Sep 9, 2009 at 5:12 PM, Erik Iverson eiver...@nmdp.org wrote:
And did you read the help file, ?paste , paying attention to the arguments
and their
?paste and look at sep.
On Wed, 9 Sep 2009, 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
paste(a,b)
[1] Bio iology
*There is a SPACE in the word biology which
On 10/09/2009, at 9:08 AM, 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
paste(a,b)
[1] Bio iology
*There is a SPACE in the word biology which is what I dont
Paul:
If these data are real -- or at least a reasonable facsimile -- then even
though the machines might be considered random -- i.e. a sample from a
potential population of machines -- there are too few of them to get a
reasonable estimate of their variance. Better to treat them as fixed and
Hi Bryan --
Bryan Keller wrote:
Bill,
Thanks for the great tips for speeding up functions in your response. Those
are really useful for me. Even with the improvements the recursion is still
many times slower than I need it to be in order to make it useful in R. I
may just have to
All,
Below is an xyplot plot with multiple panels and a title produced via main:
library(lattic)
data.ex = data.frame(y = rnorm(10), t = rep(1:5, 2), group = rep(c(0,1),
each = 5))
xyplot(y ~ t | as.factor(group), data = data.ex,
main = list(Put figure caption here
Hello,
I think I misread the link you sent me yesterday. In any case, the
reason why SAS generates a model with 30 trials whereas R produces
another one with 25 is that, if the parameter for the number of trials
is not specified in the proc/function call, both systems adhere to
different
Note that the memoization optimization is orthogonal
to the simpler optimizations I suggested (don't repeat
calculations in loops, sort the input vector, do a little
math to avoid so many recursions to the leaves). You
can combine them to get
Cmemo1 - function(T, m) {
C - function(lt, m) {
R-list
I am sorry for asking this stupid question, but i have been running in circles.
I want to randomly generate a scaling point of between 1 and 10, for say
hundred entries, where the first 10% percent is has rates between 2 and 7, the
next 15% 3 and 7, 20% between 3 and 9, 20% between 3
I just added a new option nlines to plot.Predict to make it easy to get
interaction line plots for categorical predictors. To get the new
version type the following after running require(rms):
source('http://biostat.mc.vanderbilt.edu/tmp/plot.Predict.s')
Here are some examples:
require(rms)
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of KABELI MEFANE
Sent: Wednesday, September 09, 2009 4:06 PM
To: R-help@r-project.org
Subject: Re: [R] Help on percentage of random numbers for different classes
R-list
I am
Dear R users,
I have numerous data sets (csv files) saved in the folder which has the same
name as individual data.
(i.e data x1 saved in x1 folder, data x2 in x2 folder etc)
I would like to read in the desired data set name using 'scan' function and
assign this inputted value to an object so
Try this:
read.csv(sprintf(D://R//Data//%04d//%04d.csv, x, x), header = TRUE)
On Wed, Sep 9, 2009 at 9:32 PM, Steven Kang stochastick...@gmail.comwrote:
Dear R users,
I have numerous data sets (csv files) saved in the folder which has the
same
name as individual data.
(i.e data x1 saved
I've been trying to filling in the missing variables in a matrix with the
mean from the column they are in. So the following code does this just fine.
#3X3 matrix where the middle number is missing.
data=matrix(c(1:4,NA,6:9), 3, 3)
#replace missing values in an vector with the mean of the
Try this:
fill.in.1 - function(x) ifelse(is.na(x), mean(x, na.rm = TRUE), x)
apply(data, 2, fill.in.1)
or
fill.in.2 - function(x) replace(x, is.na(x), mean(x, na.rm = TRUE))
apply(data, 2, fill.in.2)
Note that in both cases a column containing only NAs will be filled
with NaN's.
On Wed, Sep
95 matches
Mail list logo