Make use of the plyr and reshape2 package (both on CRAN):
library(plyr)
d<-adply(ArrayDiseaseCor, 1:2)
# adply calls function identity by default
d<-melt(d)
d<-subset(d,value>.5)
head(d)
You will have to rename columns, or adjust arguments in melt/adply.
Note: use set.seed before sampling for rep
see inline
On 12 February 2015 at 09:10, Sven E. Templer wrote:
> Make use of the plyr and reshape2 package (both on CRAN):
>
I forgot:
library(reshape2)
> library(plyr)
> d<-adply(ArrayDiseaseCor, 1:2)
> # adply calls function identity by default
> d<-melt(d)
> d<-subset(d,value>.5)
> head(d)
hello,
I am cleaning some large data with 4 million observation and 7 variable.
Of the 7 variables , 1 is name/string
I want to subset data, which have same name
Example-
Name var1 var2 var3 var4 var5 var6
aa- - - - --
ab
bd
ac
ad
af
ba
bd
aa
av
i want
Hi Samarvir,
Assuming that you want to generate a separate data frame for each
value of "Name",
# name of initial data frame is ssdf
for(nameval in unique(ssdf$Name)) assign(nameval,ssdf[ssdf$Name==nameval,])
This will produce as many data frames as there are unique values of
ssdf$Name, each name
I done a mistake when I paste the script in the message. An update:
url.csv <-
https://dl.dropboxusercontent.com/u/34009642/cepajabo07_wide_acumulado.csv
data02 <- read.table(url.csv, header=TRUE, sep="\t", dec=",")
head(data02)
timepoints <- 1:5 # 5 days
time <- t(matrix(rep(timepoints, 120),
I am little lost between all the possibilities to apply a function to
a data.frame or data.table.
Here is mine:
structure(list(name = c("poisonivy", "poisonivy", "poisonivy",
"poisonivy", "poisonivy", "poisonivy", "poisonivy", "poisonivy",
"cruzecontrol", "agreenmamba", "agreenmamba", "vairis", "
> I would like to query that if it is possible for R to terminate a program
> such as
> notepad, word, etc.?
pskill from the tools package says it supports the Windows system call
'TerminateProcess'.
You can get a process's ID using the windows command line 'tasklist'.
I got this to work on my
You don't need to do these operations in pieces so the mapply is unnecessary.
Neither dplyr nor data.table can go faster than (assuming your data frame is
called DF):
DF$dtm <- as.POSIXct( as.numeric( DF$ts ), tz="GMT", origin="1970-01-01" )
They can in this case save you from having to retype
I would not say it is fully "solved" since in using Nelder-Mead
you did not get the Hessian.
The issue is almost certainly that there is an implicit bound due to
log() or sqrt() where a parameter gets to be near zero and the finite
difference approximation of derivatives steps over the cliff. Prob
Hello Everyone...
I am fairly new to R. I would like to use the adehabitatHR package to create
kernel density and isopleths from my sea turtle GPS data. I�m running into some
issues�
Basically I am having trouble assigning IDs and XY fields within R to create
KDs and MCPs.
Thank you in advan
> R-ouput
>
> Df Sum SqMean SqF value
> Pr(>F)
> treatment314015 4672 65.021 < 2e-16
> ***
> variety 3 5883 1961 27.295
> 2.95e-12 ***
> treatment:variet
2.50% 97.50%
intercept 29787966
glands 13143611
damage 169 6144
treatment L1778 6703
treatment L4-3899 5125
Length -1817 1828
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.
Hi all,
I have four factors for a continuous time variable along with its
confidence interval. I would like to produce a publication quality error
bar chart that is clear to understand. For now, I used colors, x axis
position, facets and alpha level to distinguish them.
I would like to overlap ea
I have two df (and dt):
df1
structure(list(name = c("poisonivy", "poisonivy", "poisonivy",
"poisonivy", "poisonivy", "poisonivy", "poisonivy", "poisonivy",
"cruzecontrol", "agreenmamba", "agreenmamba", "vairis", "vairis",
"vairis", "vairis", "vairis", "vairis", "xaeth"), text = c("ok",
"need items
Hi Rich
> -Original Message-
> From: Richard M. Heiberger [mailto:r...@temple.edu]
> Sent: Wednesday, February 11, 2015 10:53 PM
> To: PIKAL Petr
> Cc: r-help@r-project.org
> Subject: Re: [R] suggestion for optimal plotting to show significant
> differences
>
> Petr,
>
> My first attempt i
I found a google user group for shiny, and am curious if there is an SIG as
well. Didn't see one in my searches, but looking for an active place to ask
questions and share code.
Thanks.
[[alternative HTML version deleted]]
__
R-help@r-project
I am gettting the error"
Error in rep_len(rep.int(seq_len(n), rep.int(k, n)), length) :
object 'N' not found
Also your image did not come through. Try sending it as a pdf file.
when I try to create
df<- data.frame(gender=gl(2,1,N, c("male","female")),
direction=gl(2,2,N, c("up","do
And?
John Kane
Kingston ON Canada
> -Original Message-
> From: michael.eisenr...@agroscope.admin.ch
> Sent: Thu, 12 Feb 2015 13:56:37 +
> To: r-help@r-project.org
> Subject: [R] horizontal bar plots for CI visualization
FR
You are most likely simply not running the whole lines of code: note that
the first line is:
N = 32
Best
,
He who is worthy to receive his days and nights is worthy to receive* all
else* from you (and me).
The Prophet, Gibr
Thank you very much, Ben. Your answer has been very useful.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and
On 12/02/2015 13:56, michael.eisenr...@agroscope.admin.ch wrote:
There are a number of options for doing this. You might consider using
forest plots as provided by one of a number of the meta-analysis
packages. See the CRAN MetaAnalysis task view for more details.
--
Michael
http://www.dewe
I'm a bit blind today. I read df as a dput() .
John Kane
Kingston ON Canada
-Original Message-
From: hyil...@gmail.com
Sent: Thu, 12 Feb 2015 23:38:01 +0800
To: jrkrid...@inbox.com
Subject: Re: [R] ggplot2 shifting bars to only overlap in groups
You are most likely simply not running th
Dear All,
I build a R package which will need to call external C functions. I registered
the C functions in the NAMESPACE file and include 32bit and 64bit dlls in the
packages. If I load the package in 64bit R and calls the external C functions,
it works fine. However if I load the package in 3
Windows 7, 64-bit.
I am trying to install RStudio. Before installing RStudio, I installed R 3.1.2.
During the installation or R, I installled (as per the default) 32- and 64-bit
packages. When I tried to install RStudio, I received the message
R does not appear to be installed. Please install R
Dear all
I just switched to new version
> version
_
platform i386-w64-mingw32
arch i386
os mingw32
system i386, mingw32
status Under development (unstable)
major 3
minor 2.0
year 2015
month 02
day
Ah, ask in the RStudio support area?
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
Time to (re)read the Posting Guide... questions about unreleased versions of R
are off topic here. Go to R-devel.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#.
Maybe https://groups.google.com/forum/#!forum/shiny-discuss ?
Hadley
On Thu, Feb 12, 2015 at 9:07 AM, Doran, Harold wrote:
> I found a google user group for shiny, and am curious if there is an SIG as
> well. Didn't see one in my searches, but looking for an active place to ask
> questions and
You should install Rtools first.
Then you will need to use
install.packages(c(A"","B","etc"), type="source", dependencies=TRUE)
Rich
On Thu, Feb 12, 2015 at 11:40 AM, PIKAL Petr wrote:
> Dear all
>
> I just switched to new version
>
>> version
>_
> platform i386-w64-mingw3
Hi,
I am trying to run the following model for OpenBUGS and want to use
R2OpenBUGS package. The model specifies weibull distribution for censored
data.
weibull.model <- function()
{
for(i in 1:n)
{
exp.alpha[i] ~ dgamma(a.alpha, b.alpha)
alpha[i] <- l
Hi everybody!
I want to do a boxcox transformation, but I got this:
Error: could not find function "boxcox"
What can I do? I am using R studio.
Thanks!!!
Xavier
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://s
2.50% 97.50%
intercept 29787966
glands 13143611
damage 169 6144
treatment L1778 6703
treatment L4-3899 5125
Length -1817 1828
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.
It seems that Surv objects do not sort correctly. This seems to be a bug.
Anyone else found this?
> survival.data
[1] 4+ 3 1+ 2 5+
> class(survival.data)
[1] "Surv"
> sort(survival.data)
[1] 2 1+ 4+ 3 5+
An easy work-around is to define a function sort.Surv
sort.Surv<-function(a){ord<-or
Dear John,
I think you have to specify the directory of R in the R-studio installation
process. Somehow the installation wizard is unable to find the address of R
in your system.
Thanks & Regards,
Arnab
Arnab Kumar Maity
Graduate Teaching Assistant
Division of Statistics
Northern Illinois Uni
Hello,
Try the following.
install.packages("sos") #if not yet
Then,
library(sos)
findFn("boxcox")
There are several hits, maybe you could start with package car
Hope this helps,
Rui Barradas
Em 12-02-2015 16:19, CHIRIBOGA Xavier escreveu:
Hi everybody!
I want to do a boxcox transform
On 12/02/2015 11:08 AM, Li, Yan wrote:
Dear All,
I build a R package which will need to call external C functions. I registered
the C functions in the NAMESPACE file and include 32bit and 64bit dlls in the
packages. If I load the package in 64bit R and calls the external C functions,
it works
I meant R3.0.3. I need this package working in R3.0.3.
I have 32bit and 64bit dlls both included in the package.
-Original Message-
From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com]
Sent: Thursday, February 12, 2015 1:01 PM
To: Li, Yan; r-help@r-project.org
Subject: Re: [R] 32bit R
On Thu, Feb 12, 2015 at 3:40 PM, arnaud gaboury
wrote:
> I have two df (and dt):
>
> df1
> structure(list(name = c("poisonivy", "poisonivy", "poisonivy",
> "poisonivy", "poisonivy", "poisonivy", "poisonivy", "poisonivy",
> "cruzecontrol", "agreenmamba", "agreenmamba", "vairis", "vairis",
> "vairis
I did not know the SVG file did not come through. I thought SVG should be
able to pass through the filter. Here is a PDF file along with an PNG.
Guess one of them should be able to pass.
祝好,
He who is worthy to receive his days and nights is worthy to receive* all
else* fr
On Thu, Feb 12, 2015 at 7:12 PM, arnaud gaboury
wrote:
> On Thu, Feb 12, 2015 at 3:40 PM, arnaud gaboury
> wrote:
>> I have two df (and dt):
>>
>> df1
>> structure(list(name = c("poisonivy", "poisonivy", "poisonivy",
>> "poisonivy", "poisonivy", "poisonivy", "poisonivy", "poisonivy",
>> "cruzecon
On 12/02/2015 16:26, Professor Bickis wrote:
It seems that Surv objects do not sort correctly. This seems to be a bug.
Anyone else found this?
This is presumably about Surv() from package survival, not mentioned.
There was a bug, corrected in R-devel (and I will port to R-patched
before 3.
It seems that Surv objects do not sort correctly. This seems to be a bug.
Anyone else found this?
>survival.data
[1] 4+ 3 1+ 2 5+
>class(survival.data)
[1] "Surv"
>sort(survival.data)
[1] 2 1+ 4+ 3 5+
An easy work-around is to define a function sort.Surv
>sort.Surv<-function(a){ord<-orde
Hi,
Maybe the following link helps.
http://r.789695.n4.nabble.com/box-cox-td4363944.html
--
View this message in context:
http://r.789695.n4.nabble.com/SIMPLE-question-tp4703176p4703180.html
Sent from the R help mailing list archive at Nabble.com.
On 2/12/2015 10:22 AM, John Sorkin wrote:
Windows 7, 64-bit.
I am trying to install RStudio. Before installing RStudio, I installed R 3.1.2. During the installation or R, I installled (as per the default) 32- and 64-bit packages. When I tried to install RStudio, I received the message
R does
## The next step is to think of this in the analysis of covariance setting.
## this example is based on
library(HH)
demo("ancova", package="HH", ask=FALSE)
item<-rep(letters[1:8], each=18)
day<-rep((0:5)*100, 24)
set<-rep(rep(1:3, each=6), 8)
test<-data.frame(item, day, set)
set.seed(111)
test$
To which I will add, you could have tried
count.fields('test.dat', sep='$' )
which I expect would have given you 3,3,2,3, and hence a pointer to where
the problem is.
count.fields is mentioned in the "See Also" section of ?read.table
--
Don MacQueen
Lawrence Livermore National Laboratory
70
On 12.02.2015 19:07, Li, Yan wrote:
I meant R3.0.3. I need this package working in R3.0.3.
I have 32bit and 64bit dlls both included in the package.
So it should be fine. Maybe you compiled it for a different R version or
on another OS
Best,
Uwe Ligges
-Original Message-
On 12.02.2015 16:05, arnabkm2007 wrote:
Hi,
I am trying to run the following model for OpenBUGS and want to use
R2OpenBUGS package. The model specifies weibull distribution for censored
data.
weibull.model <- function()
{
for(i in 1:n)
{
exp.alpha[i] ~ dgamma(a.alpha,
The split function does essentially this, but puts the results into a list
rather than using the dangerous and messy assign function. The overall
syntax is simpler as well.
On Thu, Feb 12, 2015 at 3:14 AM, Jim Lemon wrote:
> Hi Samarvir,
> Assuming that you want to generate a separate data fram
agroscope.admin.ch> writes:
>
> 2.50% 97.50%
> intercept 29787966
> glands13143611
> damage169 6144
> treatment L1 778 6703
> treatment L4 -3899 5125
> Length-1817 1828
>
plotrix::plotCI(..., err="x")
??
__
Hi, a solution could be:
# example matrix a:
a <- matrix(1:100, 10, 10)
a[, 1] <- (sample(c("aa","bb" , "ab"), 10, rep=TRUE))
a <- a[order(a[, 1]), ] # order the matrix by row = 1
#subsetting a:
lev <- levels(as.factor(a[, 1]))
subs <- list()
for(i in 1:length(lev)) {
subs[[i]] <- a[a[, 1] %
51 matches
Mail list logo