Hi
You can pad some NA to the result before transforming it to required matrix but
as Frede pointed out, what do you want to do with such result?
tm.1=rbind(c(1,-3,2,-4), c(1,-3,2,-4),c(1,-3,2,-4))
xx<-which(tm.1 > 0, arr.ind=TRUE)
res<-apply(xx, 1, paste0, collapse=",")
dim(res)<-c(3,2)
> res
Dear all,
I am very happy with the new features introduced by Rstudio about how
to create documents embedding R code.
I would like to know though if there is some way to embed code from a
working script into an Rmd document.
I have several working scripts for which I would like to report the
resul
On 20-06-2014, at 11:20, Luca Cerone wrote:
> Dear all,
> I am very happy with the new features introduced by Rstudio about how
> to create documents embedding R code.
>
> I would like to know though if there is some way to embed code from a
> working script into an Rmd document.
> I have sever
How about simply using source() to call the script? If necessary, wrap bits
of the script in functions, so you source a file with lots of functions,
and then call the ones you need, as you need them.
Bob
On 20 June 2014 11:20, Luca Cerone wrote:
> Dear all,
> I am very happy with the new featur
Thanks to Dennis Murphy I was able to improve mein R-Code:
1) A-Matrix:
A_Matrix <- diag(4) # 4 restrictions
A_Matrix[upper.tri(A_Matrix)] <- NA# 6 further restrictions
2) Variance-Covariance-Matrix
Xmat <- cbind(X1, X2, X3, X4)
vs <- apply(Xmat, 2, var)
VC_Matrix<-
Hi Berend, sorry if it OT (though I think that the process is pretty
much Rstudio independent, since what Rstudio does is wrap up knitr and
their package Rmarkdown,
but all the process can be run from the shell).
Bob, so far this is what I do, but it is not ideal for two reasons:
1. I would like m
Hi,
I am confronted with this error while trying to read csv file into R session.
Though it is warning message, I noticed that the whole file was not read
properly.
After having gone through the whole file, unable to identify error in file. I
am copying the last 2 rows in original csv file after
it looks like you have unbalanced quotes in the line containing:
DELIVERED/BUYER'S INDEX
try putting the option
quotes = ''
Sent from my iPad
On Jun 20, 2014, at 6:02, S N V Krishna wrote:
> DELIVERED/BUYER'S INDEX
__
R-help@r-project.org mailing
Hello
i am new to R and need help,
I want to parse a log file using R named tracking.log file.
i try to read it using "jsonlite" package but not able to get data in
proper format.
i entered a sample of file below.
i also attached a file tracking.log file with this mail
{
"
Hi,
I am a beginner in R and already read and (thought that I) understood the R
introduction tutorial. However there is this reading .csv which I cant
solve. The question is: Why has data in the both cases a different content?
I have a directory containing one .csv file.
Version 1:
data <- read.
Hi
Version one reads one file directly into data.frame named data, output of
version 2 is list named data with data.frame(s) nemed "1",
Is this a difference? Or you see also a difference in contents of those 2
data.frames?
Regards
Petr
> -Original Message-
> From: r-help-boun...
You have not said what your problem is, and you have not shown us the code you
have tried. How are we supposed to know what you want?
---
Jeff NewmillerThe . . Go Live...
DCN:
Hi All,
Is anyone using random forest for predicting? Some people claimed that it will
give more accurate result than decision tree. But considering it builds 500(by
default) full trees, is it worth to use random forest to predict instead of
decision tree? What typical applications of this algo
Hello again,
After playing around with my current problem for some time, I have
once again returned to Delaunay Graphs and after banging my head
against the problem for some time I fear that I can't see the issue
clearly anymore and want to ask for some outside comments, to maybe
shake my thoughts
Hi,
This is not an R question, so really not appropriate for the list.
The answer depends on what "worth it" means to you.
There are many applications:
http://scholar.google.com/scholar?hl=en&q=%22random+forest%22&btnG=&as_sdt=1%2C39&as_sdtp=
Sarah
On Fri, Jun 20, 2014 at 10:12 AM, Li, Yan wr
Thanks for the reply...Actually you answered my questionI just want to know
how people use it...
-Original Message-
From: Sarah Goslee [mailto:sarah.gos...@gmail.com]
Sent: Friday, June 20, 2014 11:31 AM
To: Li, Yan
Cc: r-help@r-project.org
Subject: Re: [R] random forest application
On Fri, Jun 20, 2014 at 2:40 AM, Luca Cerone wrote:
> Hi Berend, sorry if it OT (though I think that the process is pretty
> much Rstudio independent, since what Rstudio does is wrap up knitr and
> their package Rmarkdown,
> but all the process can be run from the shell).
>
> Bob, so far this is w
Dear Wagner,
I added the equamax rotation option to the psych package in version 1.4.6.
This was requested by Sagnik Chakravarty, with a solution by Gunter Nickel.
Unfortunately, the version on CRAN is 1.4.5, but you can get 1.4.6 from the
alternate repository http://personality-project.org
I've tried several things but I don't manage to get this plot right. Any
help greatly appreciated!
I'm running a for loop to produce 4 plots at once. Each plot should only
show data points for a specific group (i.e. 4 plots for groups 1 to 4).
The coordinates of the points should be petal length
Dear Wagner,
I added the equamax rotation option to the psych package in version 1.4.6.
This was requested by Sagnik Chakravarty, with a solution by Gunter Nickel.
Unfortunately, the version on CRAN is 1.4.5, but you can get the working
prerelease of 1.4.6 (1.4.6.20) from the alternate repo
On 20 Jun 2014, at 04:30 , David Winsemius wrote:
> I think it's your `digits = 0` argument:
>
>> formatC(20, digits = 3, width = 3, flag = "0")
> [1] "020"
At any rate, sprintf() is often more convenient:
> sprintf("%03d.csv", c(30, 104, 223))
[1] "030.csv" "104.csv" "223.csv"
--
Peter Da
Hi Simon,
Thanks for getting back to me. Would the opposite be true as well then? I
have other models where I don't get a warning message at the end of the
model fitting but the $converged slow indicates a 'FALSE'.
Thank you ~Trevor
On Wed, Jun 18, 2014 at 2:07 AM, Simon Wood wrote:
> I thin
Roxane Foulser-Piggott cam.ac.uk> writes:
> R version 3.1.0 (2014-04-10) -- "Spring Dance. Platform:
> x86_64-apple-darwin13.1.0 (64-bit).
> I would like to convert the following function from nlme to nlmer.
> I am finding it difficult to apply the documentation I can find on
> this procedur
Hi all,
Here is my situation. I have a dataframe, the structure would be something
like this,
TestData<-data.frame(ID=rep(1:10,each=10),TIME=rep(seq(0.1,1,0.1),10),VAR1=rnorm(100),VAR2=5*rnorm(100),VAR3=10*rnorm(100))
Basically, I want to extract the maximum value from each ID for VAR1, VAR2,
VA
Hi,
I like to use with xyplot (package lattice) the groups argument and
superpose.symbol to compare several curves. But, when there are a great
many points, the symbols are very close and the graph becomes
unreadable. Would there be an argument or a tip not to draw all the
symbols, for exa
Dear Laurent
for numeric x variables, you could try jitter:
xyplot(y~jitter(x,0.5))
Cheers
Christoph
Am 20.06.2014 21:45, schrieb Laurent Rhelp:
Hi,
I like to use with xyplot (package lattice) the groups argument and
superpose.symbol to compare several curves. But, when there are a
grea
How about
aggregate(TestData[,c('VAR1','VAR2','VAR3')], by=list(id=TestData$ID),
FUN=max)
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 6/20/14 12:42 PM, "Jun Shen" wrote:
>Hi all,
>
>Here is my situation. I have a dat
Have you looked at the 'aggregate' function? E.g.,
aggregate(TestData[c("VAR1","VAR2","VAR3")], by=TestData["ID"], max)
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Jun 20, 2014 at 12:42 PM, Jun Shen wrote:
> Hi all,
>
> Here is my situation. I have a dataframe, the structure would be
You could try:
library(plyr)
res <- ddply(TestData[,-2],.(ID),numcolwise(max))
colnames(res)[-1] <- paste0(colnames(res)[-1],".max")
A.K.
On Friday, June 20, 2014 3:43 PM, Jun Shen wrote:
Hi all,
Here is my situation. I have a dataframe, the structure would be something
like this,
TestData<
Hi Don, Bill and A.K.
Thanks for your reply. It worked!
On Fri, Jun 20, 2014 at 3:56 PM, arun wrote:
> You could try:
> library(plyr)
> res <- ddply(TestData[,-2],.(ID),numcolwise(max))
> colnames(res)[-1] <- paste0(colnames(res)[-1],".max")
> A.K.
>
>
>
>
> On Friday, June 20, 2014 3:43 PM, Ju
I'm back in the office with the machine that was giving me trouble.
# fresh start-up of R 3.1.0, installed on the my machine's hard drive,
#under Windows XP Service Pack 3.
# spatstat version 1.37-0
library(spatstat)
data(redwood)
dens <- density(redwood)
str(dens) # everything looks to be in ord
WUA_table<-WUA.df[,2:dim(WUA.df)[2]]
WUA_discharge<-WUA.df[,1]
colour_scheme<-palette(rainbow(dim(WUA_table)[2]))
# Main scatterplot
p1 <- ggplot(NULL, aes(WUA_discharge,WUA_table)) +
geom_line() +
scale_color_manual(values=colour_scheme)+
scale_x_continuous(expand = c(0, 0)) +
scale_y_con
Aww thank u !
I had a knot in my brain... thank you for solving it :)
Cheers,
Sven
--
View this message in context:
http://r.789695.n4.nabble.com/Reading-in-a-csv-2-different-results-tp4692434p4692448.html
Sent from the R help mailing list archive at Nabble.com.
_
The digits argument for formatC is for sigfigs. I found a solution within the
formatC argument list. When I added the format arg to formatC:
filenames <- paste0(formatC(id, digits = 0, width = 3, format = "d", flag =
"0"), ".csv")
..it miraculously worked. d is the format value for integers. Hope
Hi all,
I am trying to use template function for spatial ETAS (not the simulation code,
but the loglikelihood estimation) with some changes (in 3-D space and with
different omori function). I changed the etas_normal0 function and the main
code accordingly but still it doesn't give me the correc
Hi Chris,
Try the form: plot(dens, useRaster=FALSE, ribargs=list(useRaster=FALSE))
Pablo
2014-06-20 15:58 GMT-05:00 Christopher W Ryan :
> I'm back in the office with the machine that was giving me trouble.
>
> # fresh start-up of R 3.1.0, installed on the my machine's hard drive,
> #under W
You are almost surely being bitten by the issue about which you
previously made inquiries to me, concerning the delaunayn() function
from the "geometry" package. (NOTE: ***PACKAGE***!!! Not "library". A
library is a *collection* of packages.) The delaunayn()
function also uses the qhull alg
On Jun 20, 2014, at 9:18 AM, Bea GD wrote:
> I've tried several things but I don't manage to get this plot right. Any help
> greatly appreciated!
> I'm running a for loop to produce 4 plots at once. Each plot should only show
> data points for a specific group (i.e. 4 plots for groups 1 to 4).
Hi,
I encountered with some difficulty in preparing the nonlin.function for the
gnm function. Please help me.
I want to use the gnm function in the "gnm" package to fit the following
spherical function
y = a + b (1.5*x - 0.5 *(x/c)) if x< c
y = a + b
On Jun 20, 2014, at 2:40 AM, Luca Cerone wrote:
> Hi Berend, sorry if it OT (though I think that the process is pretty
> much Rstudio independent, since what Rstudio does is wrap up knitr and
> their package Rmarkdown,
> but all the process can be run from the shell).
>
> Bob, so far this is wha
Dear!
I get this error when I try to install it on my linux PC:
root@orvaquimcism:~# R CMD INSTALL
/mnt/disco/downloads/R/psych_1.4.6.20.tar.gz
Error in rawToChar(block[seq_len(ns)]) :
embedded nul in string:
'\037\x8b\b\0\0\0\0\0\0\003\xec\xbdk{\xe3Æ(\x9c\xaf\xc2\xf3\xf0?\xb4\xa9I\x86\x90
\x8a
41 matches
Mail list logo