I am trying to create levelplot's of cpu usage for systems.
print(levelplot(util.mean ~ x.hour * x.day, colorkey=T, cut=20,
scales=list(x=list(at=seq(0,96,length=25),
labels=ifelse(seq(0,24) %% 4 == 0, seq(0,24), ''))), # add
tick marks at the hour
main="CPU Utilization During No
hits=-1.6 tests=BAYES_00,NO_REAL_NAME
X-USF-Spam-Flag: NO
Hi all,
I don't have enough knowledge in the statistics.Can any one help out
how to generate correlated data which is correlated in three variables??
thanks in advance
Rama
__
R-help@r-project.
?package.skeleton
b
On Feb 5, 2008, at 1:48 PM, [EMAIL PROTECTED] wrote:
Is there a function to form in one step (configure files and install)
a simple R package of consisting of one script file of R functions?
For example in Windows:
form.package(name="mypkg", rcodefile ="c:\misc\mypkg.r" )
Is there a function to form in one step (configure files and install)
a simple R package of consisting of one script file of R functions?
For example in Windows:
form.package(name="mypkg", rcodefile ="c:\misc\mypkg.r" )
Thank you for any comments.
Giles
Giles Crane, M.Phil., MPH
Research Scien
Dear R,
I have a question concerning quantile regression models.
I am using the quantile regression model to test the relationship between
abalone and the percentage cover of algae etc at different sites and depths.
An example is
fit<-rq(abalone~%coversessileinvertebrates+factor(Depth)+factor(S
Working with lists of models gets stranger. I've actually found that, with
lmer objects in a list, as long as I use them such as in the following
example
all.models<-c(my.lmer, my.lmer2)
summary(all.models[[1]])
Everything is fine. However, if, instead, I had lm objects or glm objects,
the sam
Now I understand why 3 by 3 data2_1 works and not the 3x10 data2_1.
How can I precompute thr and pass it safely to function(x) for the column
operation ?
-Original Message-
From: jim holtman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 06, 2008 11:33
To: Ng Stanley
Cc: r-help
Su
Here is a short example:
> dat <- data.frame(x = rnorm(20),
a = rep(letters[1:4], 5),
b = rep(letters[1:5], each = 4))
> summary(aov(x ~ a*b, dat))
Df Sum Sq Mean Sq
a3 0.8021 0.2674
b4 3.7175 0.9294
a:b 12 10.5416
Hi,
I'm trying to work through a Nested ANOVA for the following scenario:
20 males were used to fertilize eggs of 4 females per male, so that
female is nested within male (80 females used total). Spine length
was measured on 11 offspring per family, resulting in 880
measurements on 80 families
On Feb 5, 2008, at 10:37 AM, Monica Pisica wrote:
> Hi everybody,
>
>
> I have to recognize that my post certainly shows my lack of skills
> in really navigating the R web page i am surprised that only
> one or two persons wrote me about the "Task Views" - it is what i
> was after - al
Hi Jim
I am trying to prepare a bed file to load as accustom track on the UCSC genome
browser.
I have a data frame that looks like the one below.
> x
V1V2 V3
1 chr1 11255 55
2 chr1 11320 29
3 chr1 11400 45
4 chr2 21680 35
5 chr2 21750 84
6 chr2 21820 29
7 chr2 31890 46
8 chr3 32100 29
9
Dear Bernhard:
Thanks very much. Unless you object, I shall add it to the
'FinTS' library as "ArchTest" (comparable to the S-PLUS Finmetrics
'archTest' function) -- with a worked example in '\scripts\ch03.R'.
Best Wishes,
Spencer
Pfaff, Bernhard Dr. wrote:
> Dear All,
>
>
jim holtman wrote:
> Your function 'll' only returns a single value when passed a vector:
>
>
>> x <- seq(0,2,.1)
>> ll(x)
>>
> [1] -7.571559
>
>
> 'plot' expects to pass a vector to the function and have it return a
> vector of the same length; e.g.,
>
>
>> sin(x)
>>
> [1] 0.0
You matrix only has 3 rows, so when you do 'apply(data2_1,2,...)' you
are extracting columns which only have a length of 3 while thr has a
length of 10
> str(data2_1)
num [1:3, 1:10] 0.958 0.271 -0.950 -0.130 -0.754 ...
> str(thr)
num [1:10] 1.060 0.528 0.104 0.925 -0.256 ...
>
That is wh
Replacing colMeans by mean removed the warning messages. Thanks
However, when I precompute thr, and pass it to function(x), the error
returns. Using the shorter data2_1, doesn't give any warnings. What is
happening ?
data2_1 <- matrix(c(0.9584190, 0.2710325, -0.9495618, -0.1301772, -0.7539687,
0.
Your function 'll' only returns a single value when passed a vector:
> x <- seq(0,2,.1)
> ll(x)
[1] -7.571559
'plot' expects to pass a vector to the function and have it return a
vector of the same length; e.g.,
> sin(x)
[1] 0. 0.09983342 0.19866933 0.29552021 0.38941834 0.47942554
0.5
The error message was coming from the call to colMeans where 'x' was
not a matrix; it was a vector that resulted from the 'apply' call.
Did you intend to use 'mean' instead like this example:
> data2_1 <- matrix(c(0.9584190, 0.2710325, -0.9495618, -0.1301772, -0.7539687,
+ 0.5344464, -0.8205933, 0
Hi,
I keep getting the error message. Please help.
Error in colMeans(x, na.rm = TRUE) : 'x' must be an array of at least two
dimensions
The codes are:
data2_1 <- matrix(c(0.9584190, 0.2710325, -0.9495618, -0.1301772, -0.7539687,
0.5344464, -0.8205933, 0.1581723, -0.5351588, 0.04448065, 0.9936
Dear Peter and Iksmax,
To elaborate slightly, the Rcmdr tries to figure out which menu items are
appropriate in a given context, and as Peter says, requires that you have at
least one factor in the active dataset before activating the pie chart menu
item; only factors will be included in the pie-c
Dear R-users,
Suppose I have defined a likelihood function as ll(tau), how can I plot this
likelihood function by calling it by plot?
I want to do it like this:
ll <- function(tau)
{
w <- 1 / (s^2 + tau^2)
mu <- sum(theta * w) / sum(w)
-1/2*sum((theta-mu)^2*w -log(w))
}
plot(ll,
I can feel a sermon coming on...
I'd like to emphasize Martin's warning below and encourage you to avoid
this kind of construction. The problem is side effects. Some R
functions do this (e.g. fix) but everyone understands why. The real
problem, in my view, is deeper. The question you ask orig
kmeans doesn't allow weights. Since your weights are frequencies,
though, there is a slightly inelegant way of handling it. You need to
unwind the frequencies and let each point enter the calculation
separately. (OK, very inelegant!)
A <- a[rep(1:nrow(a), a[, 3]), 1:2] ### expanded
Agrarimmobilien wrote:
> Hello,
>
> I hope somebody can help me. I'm using the R-comander with library(Rmcdr).
>
> Using the menu, I added an new data-matrix . After I wanted to draw a pie
> chart, but the problem is, that the pie chart menu is blinded out.
>
> In the concerning variable column, t
Hi,
I am trying to perform Maximum Likelihood estimation of a Multivariate
model (2 independent variables + intercept) with autocorrelated errors of
1st order (ar(1)).
Does R have a function for that? I could only find an univariate option
and when writing my own I find that it is pretty memory-c
I am using Cox regression to identify at risk groups. I have a training data
set and a validation data set. How can I get the C-index in R? Any hint is
highly appreciated.
Thanks,
Bereket
[[alternative HTML version deleted]]
__
R-help@r-project
bereket weldeslassie wrote:
> Hi
>
> I am using Cox regression to identify at risk groups. How can I get the
> C-index in R?
>
> Thanks,
>
> Bereket
library(Hmisc)
?rcorr.cens
# assumes no overfitting
Also:
library(Design)
?validate
# penalizes for overfitting
Frank
> <'[EMAIL PROTECTED]'>
Jon Loehrke said the following on 2/5/2008 2:29 PM:
> Is it possible to place maps onto lattice plots?
>
> With basic plotting you can add a map to a plot
>
> library(lattice)
> long<-c(-69.2, -69.5, -70.1, -70.3)
> lat<-c(41, 41.5, 43.2, 42.8)
> plot(long, lat)
> map('state', c("massachusetts")
Hello,
I hope somebody can help me. I'm using the R-comander with library(Rmcdr).
Using the menu, I added an new data-matrix . After I wanted to draw a pie
chart, but the problem is, that the pie chart menu is blinded out.
In the concerning variable column, there are no NA -Value (is.na) .
Any
Is it possible to place maps onto lattice plots?
With basic plotting you can add a map to a plot
library(lattice)
long<-c(-69.2, -69.5, -70.1, -70.3)
lat<-c(41, 41.5, 43.2, 42.8)
plot(long, lat)
map('state', c("massachusetts"),add=TRUE)
but is it possible with lattice?
library(lattice)
factor<
I'm new to Hmisc and trying to get the following to work, but if I un-
comment the y-scale list (in order to get a log-scale for the hazard
ratio), the error bars become strangely large. The dataframe is
simply ODS output from TPHREG in SAS. Can someone point me towards
what I'm sure is a
Ops, I think is this you want
lapply(c("head", "tail"), function(.x)as.ts(apply(a, 2, .x, nrow(a)/2)))
On 05/02/2008, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote:
> Try this:
>
> lapply(split(a, rep(1:2, each=nrow(x)/2)), ts, start=start(a),
> freq=frequency(a))
>
>
> On 04/02/2008, stephen s
Try this:
lapply(split(a, rep(1:2, each=nrow(x)/2)), ts, start=start(a),
freq=frequency(a))
On 04/02/2008, stephen sefick <[EMAIL PROTECTED]> wrote:
> I have a time series object with two columns.
>
> a <- ts(x, frequency=1/15)
> I would like to split this into two time series of the same length
On Feb 5, 2008 3:50 AM, Bram Kuijper <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> is it possible to dynamically add key items to an already existing key,
> belonging to a lattice xyplot?
It's not lattice, but this is pretty easy to do with ggplot2:
install.packages("ggplot2")
library(ggplot2)
qplot(
That did it, thanks.
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 05, 2008 4:28 PM
To: Scillieri, John
Cc: [EMAIL PROTECTED]
Subject: Re: [R] SAS ODBC
See the help page for odbcConnect. I have no experience with that ODBC
driver, but a few
All,
I've fit some models via lme() and now I'm trying to fit similar models with
lmer() for some simulations I'm running.
The model below (fm1) has an intercept variance that depends on treatment
group. How would one accomplish a similar stratification for the level-1
variance, i.e., the with
See the help page for odbcConnect. I have no experience with that ODBC
driver, but a few contain errors and need believeNRows = FALSE.
On Tue, 5 Feb 2008, Scillieri, John wrote:
> All,
>
> I'm trying to connect to a remote SAS server using SAS's 9.1 ODBC driver
> and the RODBC package. I'm runn
*Apologies if this is not the right way to ask a question, I'm a first
timer posting here.
Does anyone have a solution to this? I'm having trouble figuring out
how to use weighting with K Means Clustering.
So say if my dataset is:
Column 1 = x coords
Column 2 = y coords
Column 3 = frequency
All,
I'm trying to connect to a remote SAS server using SAS's 9.1 ODBC driver
and the RODBC package. I'm running R-2.6.1 on Win XP. I can successfully
connect to the database, but no matter which table I query, I get back
an empty table with only the column headers. For example:
> sqlQuer
On 2/5/08, Alex Brown <[EMAIL PROTECTED]> wrote:
> I have encountered the following behaviour in lattice in 2.6.1 (and
> 2.4.0) which differs depending upon the type you use. I believe the
> numeric behaviour to be correct, and the POSIXct behaviour to be in
> error.
>
> When the x data and x axis
If you want 0,0.05,0.1,...0.95,1.00 then think about encoding as characters:
> sprintf("%.2f", seq(0, 1, 0.05))
[1] "0.00" "0.05" "0.10" "0.15" "0.20" "0.25" "0.30" "0.35" "0.40"
"0.45" "0.50" "0.55"
[13] "0.60" "0.65" "0.70" "0.75" "0.80" "0.85" "0.90" "0.95" "1.00"
>
then you won't have the p
Not too sure of exactly what you want to do with the loop. Here is
one that prints out the values:
> x <- 1:10
> for (i in x) print(i)
[1] 1
[1] 2
[1] 3
[1] 4
[1] 5
[1] 6
[1] 7
[1] 8
[1] 9
[1] 10
>
On 2/5/08, mohamed nur anisah <[EMAIL PROTECTED]> wrote:
> hi,
>
> I'm in my learning process of
On 2/5/08, Bram Kuijper <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> is it possible to dynamically add key items to an already existing key,
> belonging to a lattice xyplot?
No.
-Deepayan
> This is what I do: I make an xyplot with an initial key. Later on, I
> want to extend this key with more items
Jarrett Byrnes ucdavis.edu> writes:
>
> I have a slight conundrum. I'm attempting to write a scrip that will
> take a number of objects (lm, glm, and lmer) and return AIC scores
> and weights. I've run into 3 problems, and was wondering if anyone
> had any pointers.
>
> 1) is there any
OK, that looks a good suggestion. Though it is a bit of a step towards loops
and counting ...
Thanks a lot.
Regards
JS
-Original Message-
From: Gabor Grothendieck [mailto:[EMAIL PROTECTED]
Sent: Tue 2/5/2008 4:51 PM
To: john seers (IFR)
Cc: R Help
Subject: Re: [R] Using lapply and
Dave:
This is an attribute. So, you can get it as follows:
library(lme4)
example(lmer)
attr(VarCorr(fm1), "sc")
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of David Afshartous
> Sent: Tuesday, February 05, 2008 2:37 PM
> To: r-help@r-project.o
All,
How does one extract the level-1 variance from a model fit via lmer()?
In the code below the level-2 variance component may be obtained via
subscripting, but what about the level-1 variance, viz., the 3.215072 term?
(actually this term squared) Didn't see anything in the archives on this.
> I like the fact that Task Views are written by experts but the
> community aspect of crantastic is really appealing. Depending how the
> aforementioned experts feel about crantastic, and how it grows and
> scales, I would be very glad to see:
>
> - some "experts reviews" on some packages. some pe
>From: Judith Flores <[EMAIL PROTECTED]>
>Date: 2008/02/05 Tue PM 12:52:06 CST
>To: RHelp <[EMAIL PROTECTED]>
>Subject: [R] Sampling
you just can put 24 in there and
then use replace=FALSE
sample(rep(letters[1:2],c(12,12),24,replace=FALSE))
>Hi there,
>
> I want to generate different samples
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Judith Flores
> Sent: Tuesday, February 05, 2008 10:52 AM
> To: RHelp
> Subject: [R] Sampling
>
> Hi there,
>
>I want to generate different samples using the
> followindg code:
>
>
> g<-sample(LE
Hi Judith,
Also you can try
NSIM=20 # Number of samples
res=apply(matrix(rep(rep(LETTERS[1:2],12),NSIM),ncol=NSIM),2,sample)
res
I hope this helps.
Jorge Iván Vélez
On 2/5/08, Daniel Dunn <[EMAIL PROTECTED]> wrote:
>
> sample(rep(LETTERS[1:2],12), 24, replace=F)
>
> -Original Message--
I am using R 2.6.1 on a 64 bit PC running Windows XP Pro.
My main problem is that I want to produce a scatter plot with density
estimation, where the colors of points correspond to a kernel density estimate
at the location of the points. I have not found a package that will do this.
If the
On 2/5/2008 1:52 PM, Judith Flores wrote:
> Hi there,
>
>I want to generate different samples using the
> followindg code:
>
>
> g<-sample(LETTERS[1:2], 24, replace=T)
>
>How can I specify that I need 12 "A"s and 12 "B"s?
>
> Thank you,
>
> Judith
x <- rep(c("A","B"), each=12)
x
[
Would this work:
g<-sample(rep(LETTERS[1:2],12), 24, replace=F)
HTH
-Kevin
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Judith Flores
Sent: Tuesday, February 05, 2008 1:52 PM
To: RHelp
Subject: [R] Sampling
Hi there,
I want to generate different s
sample(rep(LETTERS[1:2],12), 24, replace=F)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Judith Flores
Sent: Tuesday, February 05, 2008 1:52 PM
To: RHelp
Subject: [R] Sampling
Hi there,
I want to generate different samples using the followindg cod
Tom:
You can do this with ggplot2. The code below puts 95%
CI,a smooth line and the mean(blue point)on the same
plot.
Felipe
library(ggplot2)
r <- ggplot(ToothGrowth, aes(y=len, x=factor(dose)))
r$background.fill = "cornsilk"
r + geom_boxplot(aes(colour=supp)) +
stat_summary(aes(group=supp)
Hi there,
I want to generate different samples using the
followindg code:
g<-sample(LETTERS[1:2], 24, replace=T)
How can I specify that I need 12 "A"s and 12 "B"s?
Thank you,
Judith
Be a better
On 2008-February-04 , at 21:10 , hadley wickham wrote:
>> The real answer was Task Views on CRAN (most of the OQs topics
>> *are* already
>> Task Views), so crantastic is very partial. If you have a little
>> time and want
>
> I think crantastic and task views solve somewhat different problems
I strongly suggest you collaborate with a local statistician. I can think of
no circumstance where multiple regression on "hundreds of thousands of
variables" is anything more than a fancy random number generator.
-- Bert Gunter
Genentech Nonclinical Statistics
-Original Message-
From: [
I have encountered the following behaviour in lattice in 2.6.1 (and
2.4.0) which differs depending upon the type you use. I believe the
numeric behaviour to be correct, and the POSIXct behaviour to be in
error.
When the x data and x axis in a lattice graph are POSIXct, and when
using scal
Hi,
I appreciate it if someone can confirm the maximum number of variables
allowed in a multiple linear regression model. Currently, I am looking for
a software with the capacity of handling approximately 3,000 variables. I
am using Excel to process the results. Any information for processing a
Hi,
I appreciate it if someone can confirm the maximum number of variables
allowed in a multiple linear regression model. Currently, I am looking for
a software with the capacity of handling approximately 3,000 variables. I
am using Excel to process the results. Any information for processing a
If you must use lapply then do it over the names rather than the
data:
lapply(names(people), function(nm) plot(1:10, people[[nm]], main = nm))
On Feb 5, 2008 11:47 AM, john seers (IFR) <[EMAIL PROTECTED]> wrote:
>
>
> Hi Gabor
>
> Thanks for the suggestion but I am not sure it actually address
Hi Gabor
Thanks for the suggestion but I am not sure it actually addresses my
problem. I will ponder the idea of my data needing to be in a different
form but I am not sure how to get there easily with what I have got.
The example I gave was just a simplified example to demonstrate how you
ca
Hi
>
> I am using Cox PH regression using the coxph function to identify at risk
> groups. How can I get the C-index (area under ROC curve) statistic in R?
>
> Thanks,
>
> Bereket
>
[[alternative HTML version deleted]]
__
R-help@r-project.org
Duncan told you how to do this using density, another option is to use
the logspline package for a different way to estimate densities. With
this approach you can use the dlogspline and plogspline functions to
compare your density estimates.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Stat
On Tue, 5 Feb 2008, Barry Rowlingson wrote:
> Duncan Murdoch wrote:
>
>> Another problem is that there are two different class systems in R:
>> sometimes calls S3 and S4 (because of the versions of S where they were
>> introduced). You were reading about S3.
>
> There's three different class sys
Got it Thanks
> On Tuesday 05 February 2008 (16:51:41), Konrad BLOCHER wrote:
>> Hi,
>>
>> I'm pretty new to R and seem to be having difficulties with writing a
>> function that would change an array and keep the change after the
>> function
>> finishes its work.
>>
> It seems you want this:
>
> X
In general functions changing global variables as a side effect is dangerous
(i.e., often leads to programming errors and difficult-to-maintain code).
So, if the performance of the following is sufficient, it is what I would
recommend.
addition <- function(X, a) {
X[1, 1] <- X[1, 1] + a
X
Introduce
cat(j)
flush.console()
in your loop.
-Christos
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Waterman,
> DG (David)
> Sent: Tuesday, February 05, 2008 11:20 AM
> To: r-help@r-project.org
> Subject: [R] immediate print
>
> Hi every
Thanks that works fine but still doesnt keep the result only prints it.
How can I make it retain the value in the variable?
Thanks,
> You want to have X as an argument to your function
> and return X at the end of it:
>
> addition <- function(x, a) {
> x[1,1] <- x[1,1] + a
> x
> }
>
> add
Hello,
I'm using recursive SVM script (rSVM -
http://www.stanford.edu/group/wonglab/RSVMpage/R-SVM.html ) on some microarray
data. The data to be input are log2, as numeric matrix w/ attributes --
str(svm_num_mat)
num [1:10, 1:12340] 13.1 13.1 13.1 13.1 13.0 ...
- attr(*, "dimnames")=List
On Tuesday 05 February 2008 (16:51:41), Konrad BLOCHER wrote:
> Hi,
>
> I'm pretty new to R and seem to be having difficulties with writing a
> function that would change an array and keep the change after the function
> finishes its work.
>
It seems you want this:
X<-array(1,dim=c(2,2))
addition<
Hi KB
I am not sure exactly what you want to do but perhaps this is this
closer to what you need:
addition<-function(X, a){Xnew<-X + a}
X<-array(1,dim=c(2,2))
a<-2
Xa<-addition(X,a)
Xa
Regards
JS
---
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf O
hits=-2.5 tests=BAYES_00,FORGED_RCVD_HELO
X-USF-Spam-Flag: NO
maybe you could use mapply(), e.g.,
people <- list(Andrew = rnorm(10), Mary = rnorm(10),
Jane = rnorm(10), Richard = rnorm(10))
doplot <- function (individual, main) {
plot(individual, main = main)
}
par(mfrow = c(2,2))
jpe
Hi everyone,
I have a function containing a loop that takes some time to complete.
Before I enter the loop I want to print a text string to the screen
explaining what is being calculated, however, I find that the
information is not printed until the function exits. Is there a way of
immediately p
The problem is your data is in wide format and you want it in long format.
See ?reshape and also see the reshape package. In your example, ?stack
is sufficient:
library(lattice)
xyplot(values ~ seq_along(values) | ind, data = stack(people))
On Feb 5, 2008 11:05 AM, john seers (IFR) <[EMAIL PRO
Dear List,
I am trying to get R's terminal output to a file and to the terminal
at the same time, so that I can walk through some tests and keep a log
concurrently. The function 'sink' with the option split=TRUE seems to
do just that. It works fine for most output but for objects of class
Hi Kes
May be this help:
setwd("c:\\temp\\mydir")
you can also change by
setwd("c:/temp/mydir")
Best wishies
Miltinho
Brazil
- Mensagem original
De: Falco tinnunculus <[EMAIL PROTECTED]>
Para: r-help@r-project.org
Enviadas: Terça-feira, 5 de Fevereiro de 2008 9:26:18
Assunto: [R]
On Feb 5, 2008 6:06 AM, Barry Rowlingson <[EMAIL PROTECTED]> wrote:
> Duncan Murdoch wrote:
>
> > Another problem is that there are two different class systems in R:
> > sometimes calls S3 and S4 (because of the versions of S where they were
> > introduced). You were reading about S3.
>
> There'
Hello All
Using lapply and ending up with lists of lists I often end up in the
position of not having the names of the list passed by lapply. So, if I
am doing something like a plot, and I would like the title to reflect
which plot it is, I cannot easily do it. So I find myself doing some
unstru
Hi,
I'm pretty new to R and seem to be having difficulties with writing a
function that would change an array and keep the change after the function
finishes its work.
in other words
I have an array of 1'sX<-array(1,dim=c(2,2))
I want to add a number to X[1,1] by means of a function called
Hi,
I'm preetty new to R and seem to be having difficulties with writing a
function that would change an array and keep the change after the function
finishes its work.
in other words
I have an array of 1'sX<-array(1,dim=c(2,2))
I want to add a number to X[1,1] by means of a function called
You almost got it right. THe solution is
df[df$ind %in% subgr,]
See ?"%in%"
G.
On Tue, Feb 05, 2008 at 04:47:02PM +0100, Karin Lagesen wrote:
>
> Hi!
>
> I have a large dataframe that I want to extract a subset from. This
> subset has a certain column value that matches elements in a vector I
Hi!
I have a large dataframe that I want to extract a subset from. This
subset has a certain column value that matches elements in a vector I
have defined. So, my question is how do I get the rows that match one
of the elements in the vector.
Example:
a = c(1:5)
b = letters[1:10]
df = data.fram
Hi everybody,
I have to recognize that my post certainly shows my lack of skills in really
navigating the R web page i am surprised that only one or two persons
wrote me about the "Task Views" - it is what i was after - although maybe too
general for my lazy taste - but hei - it is ther
On 2008-February-05 , at 16:13 , Prof Brian Ripley wrote:
> Without reproduction instructions we have to guess at what you are
> doing.
Sorry to not have included some. I did not think it was relevant since
this was not directly a coding issue. I'll be more thorough in the
future.
> But
On Tuesday 05 February 2008 (15:54:26), Daniel Dunn wrote:
> I have a related question. Suppose I generate a series of linear models
>
> modco=list()
> modco[[length(modco)+1]]=lm(normskvop ~ I(nts^0.5)-1, data = colo,
> weights=wtz)
> modco[[length(modco)+1]]=lm(normskvop ~ I(nts^0.5)-1, data = c
Without reproduction instructions we have to guess at what you are doing.
But I think the answer is in the help for options(), and more obvious from
?chooseCRANmirror (which seems to be one of the functions you are using).
On Tue, 5 Feb 2008, jiho wrote:
> Dear List,
>
> I noticed that, when e
Dear List,
I noticed that, when executing R without X11 (e.g. on a remote machine
without X forwarding), when R needs to display a Tk dialog (e.g. when
presenting the list of mirrors for install.packages,or of available
packages containing help on a given keyword) it replaces it by a
simpl
I have a related question. Suppose I generate a series of linear models
modco=list()
modco[[length(modco)+1]]=lm(normskvop ~ I(nts^0.5)-1, data = colo,
weights=wtz)
modco[[length(modco)+1]]=lm(normskvop ~ I(nts^0.5)-1, data = colo,
weights=wtz, subset=sector!="X")
modco[[length(modco)+1]]=lm(norm
hi,
I'm in my learning process of doing a programming with "for" loop. How to
make a loop of a vector of length 10 where elements are 1,2,3,4,5,6,7,8,9,10.
Any suggestion needed!! Many thanks.
Cheers,
Anisah
-
[[alternative HTML vers
Maybe this thread is of use for you.
How to access results of survival analysis Xiaochun Li (06 May 2006)
http://tolstoy.newcastle.edu.au/R/help/06/05/26713.html
Heinz
At 21:28 04.02.2008, Xing Yuan wrote:
>Hi all,
>
>Does anybody know how to output the mean/median survival time from survfit?
>Th
Duncan Murdoch wrote:
> Another problem is that there are two different class systems in R:
> sometimes calls S3 and S4 (because of the versions of S where they were
> introduced). You were reading about S3.
There's three different class systems if you also include the R.oo
add-on package[1
On Feb 5, 2008 9:09 AM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> This illustration uses S3. Note that functions do not modify their arguments
> so to modify an object we have to pass it to the method and then pass the
> object back. There is also another system called S4 which involves typ
R-community,
Sometime during the next 12-months, I plan on configuring a new computer system
on which I will primarily run "R" and a SQL database (Microsoft SQL Server,
MySQL, Oracle, etc). My primary goal is to "optimize" the system for R, and
for passing data to and from R and the database.
This illustration uses S3. Note that functions do not modify their arguments
so to modify an object we have to pass it to the method and then pass the
object back. There is also another system called S4 which involves typing
of arguments and there are packages proto and R.oo which provide differe
On 2/5/2008 7:26 AM, Falco tinnunculus wrote:
> Dear all,
>
> How do I set the working directory to a fixed map? It's time consuming to
> change working directory every time I run R.
You can put a setwd() command in your Rprofile. On Windows, you could
set the startup directory in the shortcut.
Hi,
I have some basic questions about lme(), I have run following:
>Mod1<-lme
>summary (Mod1)
>anova (Mod1)
1. What is the differece between the summary result and the anova
result?
2. Is it sufficient to only report the anova result in an article?
3. How is the most proper way to desc
On 2/5/2008 8:21 AM, tom soyer wrote:
> Hi,
>
> I read section 5, oop, of the R lang doc, and I am still not sure I
> understand how to build a class in R for oop. I thought that since I
> understand the oop syntex of Java and VB, I am wondering if the R programmig
> experts could help me out by c
On 2/5/2008 7:21 AM, Eric Elguero wrote:
> thank you to all who answered.
>
>
>> 0+0.05+
> + 0.05+0.05+0.05+0.05+0.05+0.05+
> + 0.05+0.05+0.05+0.05+0.05+0.05+
> + 0.05+0.05+0.05+0.05+0.05+0.05 - 0.95
> [1] 3.330669e-16
>
>> seq(0,1,0.05)[20] - 0.95
> [1] 1.110223e-16
>
>> 0+19*0.05 - 0.95
> [1]
1 - 100 of 122 matches
Mail list logo