On Tue, 4 Mar 2014, Chirag Gupta wrote:
Jeff
This works fine for smaller ones but I have a big dataframe. Its ~35000 X 30.
When I try this command,
it says "Using as id variables".
Thank you.
You asked for a solution regarding a matrix. Now you talk about data
frames. And in responding to
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Stefano Sofia
> Sent: Tuesday, March 04, 2014 11:58 AM
> To: r-help@r-project.org
> Subject: [R] format for as.Date and inserting missing rows in a data
> frame
>
> Dear R use
Jeff
This works fine for smaller ones but I have a big dataframe. Its ~35000 X
30. When I try this command, it says "Using as id variables".
Thank you.
On Sat, Mar 1, 2014 at 12:38 AM, Jeff Newmiller wrote:
> library(reshape2)
> mx <- matrix( 1:12, nrow=3 )
> mxdf <- melt( mx )
> names( mxdf
Hi Elio,
If you change the last line of the code:
m1[indx2N] <- m2[indx1]
to
m1[indx2N] <- m2[sort(indx1)]
sum(m1[rownames(m1)=="p79",])
#[1] 191
sum(m2[rownames(m2)=="p79",])
#[1] 191
The problem is in the order of the colnames/rownames in each of the datasets.
I tested it on something
In 'An Introduction to R', section 11.7 on nonlinear least squares fitting,
the following example is given for obtaining the standard errors of the
estimated parameters:
"To obtain the approximate standard errors (SE) of the estimates we do:
sqrt(diag(2*out$minimum/(length(y) - 2) * solve(out$he
Hi,
You didn't provide any reproducible example to start with.
Using Jeff's example
mx <- matrix( 1:12, nrow=3 )
dimnames(mx) <- list(1:nrow(mx),1:ncol(mx)) ##
setNames(as.data.frame.table(mx),c("m","n","value"))
m n value
1 1 1 1
2 2 1 2
3 3 1 3
4 1 2 4
5 2 2 5
6
Dear R-team
I did a model selection by AIC which explain me the habitat use of my
animals in six different study sites (See attached files:
cross_val_CORINE04032014.csv and cross_val_CORINE04032014.r). Sites were
used as random factor because they are distributed over
This takes away names of all the variables
On Sat, Mar 1, 2014 at 9:30 AM, arun wrote:
>
>
> Hi,
> You could try:
> #If mat1 is the matrix
> dimnames(mat1) <- list(1:nrow(mat1),1:ncol(mat1))
> setNames(as.data.frame.table(mat1),c("m","n","value"))
> A.K.
>
>
> On Friday, February 28, 2014 11:40
Hi,
May be this helps:
dat <- read.table(text="Raingouge_number Station_number Year Month Day Rainfall
2004 2230 1951 1 1 2.60
2004 2230 1951 1 2 0.40
2004 2230 1951 1 3 0.00
2004 2230 1951 1 4 0.00
2004 2230 1951 1 5 0.20
2004 2230 1951 1 6 0.00
2004 2230 1951 1 7 0.00
2004 2230 1951 1 9 0.00
2004
Greetings,
I'm a software engineer with Intel. Recently I've been investigating R
performance on Intel Xeon and Xeon Phi processors and RH Linux. I've also
compared the performance of R built with the Intel compilers and Intel Math
Kernel Library to a "default" build (no config options) that
Dear all,
I have a problem reading xlsx files in R.
Could anybody help me how to resolve the problem?
install.packages("xlsx", dependencies=TRUE)
library(xlsx)
library(rJava)
data <- read.xlsx("3.1.xlsx", sheetIndex = 3.1)
data <- read.xlsx("3.1.xlsx", sheetName= "a",as.data.frame=TRUE, header=T
Hi guys
I am using cmprsk-package for CIF plot but I would like to plot the numbers at
risk for the different causes of failure at specific timepoints below a
cumulative incidence function plotIs anybody know how can I make that plot or
which package shall I use to make it?Thanks in advance!
Sop
Hi Rich
The first arguments for strip.default are
which.given, which.panel, var.name, factor.levels,
which means they take the names from the factors of each strip
without a reproducible example here is something that may help
data(esoph)
levels(esoph$alcgp)
xyplot(ncontrols ~ncase
The first submission of the new greport package is now on CTAN. This
package facilitates graphical reporting of clinical trials an is highly
tied to LaTeX, Hmisc, and lattice. It creates hyperlinks and pop-up
tooltips in the resulting pdf report. Tables are greatly de-emphasized,
but hyperli
I suspect the space in the filename could be the throwing the parser
off--you may need some "" around the filename or fill the space with an
underscore.
Clint
Clint BowmanINTERNET: cl...@ecy.wa.gov
Air Quality Modeler INTERNET: cl...@math.utah.edu
De
Hi, Jim
Thank you very much for your suggestion. But, x11() seems to be invalid for my
computer. I have tried to use mar() to resolve this question. Thanks a lot.
Best,
Yichun
> -åå§é®ä»¶-
> å件人: "Jim Lemon"
> åéæ¶é´: 2014å¹´3æ4æ¥ ææäº
> æ¶ä»¶äºº: "å¼ ä»¥æ¥
I've read Deepayan's book, ?strip, and ?strip.default, without learning
how to specify strip names on xyplots. The following command produces the
attached plot:
xyplot(cbind(dalles.disch.ts, dalles.temp.ts), strip.left, main = "Columbia
River @ The Dalles", xlab = "Date (Year.Month)", ylab = c(
On 04-03-2014, at 12:38, klq...@mail.bg wrote:
> I don't have any cost function to minimize. My task is to create the "best"
> matrix, matching the row sums, the column sums, row sumproducts (with the
> rows from another constant matrix) and also column sumproducts - it's a
> transportation pr
On Mon, 3 Mar 2014, Rich Shepard wrote:
I'm missing something simple here so a pointer is needed.
Figured it out: I created two ts() objects, one for each parameter, then
plotted them using cbind. Just need to tweak how the dates display on the x
axis, but that should be doable.
Rich
I have a binary rectangular T/F matrix; I need to be able to calculate the
shortest path (i.e., Pythagorean distance) between a populated cell in row
j and any populated cell in some row j+n.
For instance, if I have a chessboard with random black/white square colors,
I need the shortest distance (
HI,
I would use ?with() instead of ?attach.
sMean <- with(sorted,tapply(PRICE,ITEM,mean))
sMean
#Double Single Triple
# 352.4 379.9 563.5
parameter <- data.frame(Pname,Iname,stringsAsFactors=FALSE)
with(sorted,tapply(get(parameter[["Pname"]]),get(parameter[["Iname"]]),mean))
#Double Single
On Tue, 4 Mar 2014, Rich Shepard wrote:
Would xyplot() be a better function for these data?
Here's the syntax for the xyplot() command; the output is attached. What
have I done incorrectly here?
xyplot(col.riv.ts, data = NULL, screens = 1, cut = FALSE, auto.key = TRUE)
Data:
structure(
Hello,
Try instead
sMean2 <- tapply(parameter[[Pname]], parameter[[Iname]], mean)
Hope this helps,
Rui Barradas
Em 04-03-2014 17:01, Barry King escreveu:
I am reading parameters from an Excel file but am having trouble using them
in tapply. Here is a mini-version of my problem.
On Mon, 3 Mar 2014, Rich Shepard wrote:
I would like to plot (separately) time series for the 'disch' and
'tempMean' columns but have not had success in passing the correct syntax to
the plot() function and having the x-axis labels as human-readable dates
rather than the epoch time (which is wh
I am reading parameters from an Excel file but am having trouble using them
in tapply. Here is a mini-version of my problem.
sorted <- data.frame(c("Sing
Changes are listed below.
NOTE: The next release of rms will replace the survfit.formula function
with a new function named npsurv ("nonparametric survival estimates") so
as to not conflict with the survival package. This is a
NON-DOWNWARD-COMPATIBLE change. To get Kaplan-Meier estimates in
Recent changes include the following.
Changes in version 3.14-2 (2014-02-26)
* latex.default: improved logic using new function in Misc: latexBuild
* latex.default: fixed bug with ctable=TRUE with no caption by
removing default label
* latex.default: improved formatting for insert.top
I don't have any cost function to minimize. My task is to create the "best"
matrix, matching the row sums, the column sums, row sumproducts (with the
rows from another constant matrix) and also column sumproducts - it's a
transportation problem of finding OD matrix corresponding the total tonnag
Dear R users,
I have a very long data frame (50 years, more than 1.5 million rows) of daily
rainfall data from about 80 raingouges.
The data frame that I have been given looks like
Raingouge_number Station_number Year Month Day Rainfall
2004 2230 1951 1 1 2.60
2004 2230 1951 1 2 0.40
2004 2230 19
Hi
I am slowly getting enough of wireframe() from the package lattice, as
it is to complicated for what I need and does not really do what I
want. I am using it to produce a (surprise!) wireframe plot (see example
below).
The plot function is part of plot.tss in a package which I am working
on, a
> delayedAssign("foo$bar", 2)
>
> foo$bar # 1
>
> `foo$bar` # 2
Yes, you assign to the new variable `foo$bar`, not to bar component of the foo
variable!
You can use an environment for doing what you want:
e <- new.env()
e$bar <- 1
delayedAssign("bar", 2, assign.env = e)
e$bar
But notice also
Hi,
Despite OS is not provided, we can guess it is Windows, since Tinn-R works only
on Windows. The error message is quite clear, I think: R must start a socket
server in order for Tinn-R to communicate with it. Did you look at
?startSocketServer in the svSocket package? Then, you would have a
I am fascinated by lazy evaluation mechanism provided by delayedAssign. Like
delayedAssign("foo", {
Sys.sleep(1) # or any other time consuming operations
1
}
Time consuming operations will be evaluated only if object "foo" is used.
But when I try:
foo <- list()
foo$bar <- 1
33 matches
Mail list logo