hod works. I confused character with factor.
>
>Besides, I should use: dta$DischargeNum <- as.numeric( dta$Discharge )
>instead of: dta$Discharge <- as.numeric( dta$Discharge )
>
>
>On Tue, Sep 20, 2016 at 5:18 PM, Jeff Newmiller
>
>wrote:
>
>> Which means
Get rid of the commas? Get rid of the get() function call? Get rid of the
cbind() function call? Post using plain text format so the HTML doesn't screw
up code? Read the Posting Guide? All of these ideas have merit IMHO...
--
Sent from my phone. Please excuse my brevity.
On September 20, 2016
f Jan 2015?
> Mytsdata <- ts(variable, frequency=12, start=c(2015,1))
Jeff
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
ide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##
ible code.
[[alternative HTML version deleted]]
__
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.
You seem to be confused about what curve is doing vs. what you are doing.
A) Compute the points you want to plot and put them into 2 vectors. Then figure
out how to plot those vectors. Then (perhaps) consider putting that all into
one line of code again.
B) The predict function is the preferr
lease excuse my brevity.
On September 25, 2016 9:04:09 AM PDT, mviljamaa wrote:
>On 2016-09-25 18:52, Jeff Newmiller wrote:
>> You seem to be confused about what curve is doing vs. what you are
>> doing.
>
>But my x-range in curve()'s parameters from and to should be the e
7;B',]$lka, data[koulu == 'B',]$ruotsi.pist,
>col=varitB, pch=16, xlab='', ylab='', main='Lukio B’)
>
>curve(bs["(Intercept)"]+bs["mies"]*0+bs["kouluB"]+bs["lka"]*x+bs["kouluB:clka"]*clka,
>fro
;,]$lka, data[koulu == 'B',]$ruotsi.pist, col=varitB,
pch=16, xlab='', ylab='', main='Lukio B?)
curve(bs["(Intercept)"]+bs["mies"]*0+bs["kouluB"]+bs["lka"]*x+bs["kouluB:clka"]*clka,
from=min(lka), to=max(lka), add=TRU
:
>>
>> fit2 <- lm(ruotsi.pist ~ mies + koulu + clka + koulu*clka, data=dta)
>
>I mean, not to use clka to replace lka. But to use the above fit2,
>rather than your fit2.
>
>>> On 25 Sep 2016, at 21:23, Jeff Newmiller
>wrote:
>>>
>>> This ill
You failed to read the Posting Guide, which would have told you which mailing
list to post this question to. (Hint: not this one.)
--
Sent from my phone. Please excuse my brevity.
On September 26, 2016 4:46:06 AM PDT, Eric Deveaud wrote:
>
>
> Hello,
>
>as far as I understood the R librar
Importing datafile "Raadata.csv"
(Headers: Treatment, Mussel, Experiment, Interval, CR_Art, CR_Rho, CHR_Art,
FR_C_Art , CHR_Rho, FR_C_Rho).
Some fields are empty. Not all treatments have values in all columns.
read.csv2 is used because of European standards, I have to convert comma to dot.
There is R-sig-debian (Ubuntu is a derivative of Debian), but to be honest,
this seems more like a question for askubuntu.com.
--
Sent from my phone. Please excuse my brevity.
On October 2, 2016 1:55:59 PM PDT, Rolf Turner wrote:
>
>Dunno exactly whom I should ask about this problem, but I thou
-all-about-adding-features
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playin
ion should have a clear goal and as few side effects
as possible.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
You are not generating lists, you are generating vectors.
Try
rep( seq.int( n ), each= 4 )
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go
This seems like a recipe for garbage results to me, but there may be I
something you can set the error option to. See ?options.
---
Jeff NewmillerThe . . Go Live...
DCN
Regex "[^a-zA-Z]" reads as "not a letter".
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
This is very off-topic here. My suggestion would be to do as the Posting Guide
says and ask this on R-devel, or perhaps even a gdb forum. From what little I
know, valgrind might help also.
---
Jeff Newmiller
-make-a-great-r-reproducible-example
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
You don't have to do it by hand. Use the list.files function to create the list
of file names.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Li
.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
Vectors are not "columns" or "rows". Use the c() function to concatenate
vectors.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#.
us a few rows
of your data.
[1]
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---
Jeff NewmillerThe . . Go Live...
DCN:Basics
Lacking any reference to R, this message is off-topic on this mailing list. You
might try math.stackexchange.com.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics
n",ylim=c(0,100),
>>ylab="")
>>axis(side=4, at=c(0,50,100))
>>mtext("Cumulative Precipitation (cm)", side=4, line=2.5, at=50,
>>col="grey")
>>
>> [[alternative HTML version deleted]]
>>
share your files.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Res
and give us a better picture of your
problem and attempted solution.
[1]
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---
Jeff NewmillerThe
n't needed to do that yet.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#.
There are many ways to import data into R, and I don't know any of them that
would do what you are describing. You really need to give us some reproducible
code if we are to follow along with your problem.
---
Jeff Newm
ple
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. w
mal, self-contained, reproducible code.
__
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
I suggest you post using plain text to minimize communication problems on this
list.
I use the clusterEvalQ and cluster export functions to setup the slave
processes before I start processing.
---
Jeff Newmiller
you can use 64bit R.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
/Software/
This belongs on R-devel. Read the Posting Guide, which also warns you to post
in plain text (for less confusion and a better reception).
---
Jeff NewmillerThe . . Go Live...
DCN
or LaTeX output. Or, you could write your own function to
generate any output format you want.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go
Not familiar with your examples, but knitr relies on R for control flow and
whisker for template substitution, so it kind of seems unnecessary to have yet
another syntax for control flow.
---
Jeff Newmiller
start with the CRAN "Statistical Genetics" task view, and a textbook
on the subject. The Bioconductor project may also be a useful resource.
---
Jeff NewmillerThe . .
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
/Software/Embedded Controllers
ta to a data frame. Patrick Burns' "The R Inferno" [2] may provide
some useful guidance as well.
[1]
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
[2] http://www.burns-stat.com/
---
or it. Just enter the name of
most functions without parentheses at the R command line. Page 43 of [1] should
help for more deeply hidden code.
[1] http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf
---
Jeff Newm
3.2 library is in a different directory than 3.1 library.
You might benefit from reading the discussion about packages in the
installation manual for R.
---
Jeff NewmillerThe . . Go
Assaf: they are named differently when you run different versions. 3.1 and 3.2
are different, but 3.1.1 and 3.1.2 are both in the 3.1 directory.
---
Jeff NewmillerThe . . Go Live
For those R packages, as a normal user (rather than sysadmin of a shared
computer) the OP should accept the default R/3.1 subdirectory in their home
directory.
---
Jeff NewmillerThe
I think you are looking for a way to make a vignette. Consider using the Sweave
variant of knitr.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go
time
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (
w.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Li
input file, and remove
the line that overwrites it from your code.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go
.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
/Software/Embedded
It is not a decision that R
should automatically make.
b) Most performance issues with R arise due to users choosing inefficient
algorithms. Inserting parallelism inside existing algorithms will not fix that.
---
Jeff
s has already been
done for you (see ?filter).
[1] https://stat.ethz.ch/pipermail/r-help//2014-December/424027.html
---
Jeff NewmillerThe . . Go Live...
DCN:B
you asked for
one column at a time.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead:
This is why there are mirrors. You don't have to wait for them or tell them to
do their jobs.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Li
the "aperm" function.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#
What does quartz() have to do with this? If quartz is the problem, R-sig-mac
would be a better place to ask. Or are you being bitten by R FAQ 7.22?
---
Jeff NewmillerThe . . Go Live
The help for for contourplot answers this question in the description of the
formula (x) argument.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go
Sorry, my first response was too hasty. Per the help file you need to use some
kind of interpolation method to resample whatever random data points you have
in a regular grid before you give it to contourplot.
---
Jeff
-reproducible-example
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research
data in cross
tabulation form. You could use table or perhaps the tables package to render
the data into the desired form.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics
Your example is not the same as the answers you have received. Look again.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go
these issues.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Eng
FAQ 7.31
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research
Your question is about statistics, not R. Do read the Posting Guide to inform
you for future questions. Meanwhile, you should probably go to
stats.stackexchange.com.
---
Jeff NewmillerThe
.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O
?merge
Particularly look at the all argument.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO
said, I avoid creating such
complex output formats as much as possible... one data frame = one file is much
more portable.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics
using R
before diving into such murky waters, but if you want to push forward you will
need to use a search engine and perhaps make email contact with the package
author if you need help.
---
Jeff Newmiller
has upgraded in the second digit (e.g. 3.1.2
to 3.2.0) then you may need to refresh your personal package library with
contributed packages protested for your new version of R.
---
Jeff NewmillerThe
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
/Software/Embedded Controllers
I don't use JRI, but the data seem to be there. If you are looking for the row
names, try ?rownames.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#.
Bert, can you be more specific about which article for those of us who don't
subscribe?
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Li
ard networking setup.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. wit
"Real time" is a squishy term. Your question is not one that can be answered
here, since it is so context dependent.
---
Jeff NewmillerThe . . Go Live...
DCN:
to do with the pieces and less about
making pieces.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live
.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
I don't know, but I highly recommend the "sos" package so you can answer this
for yourself.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#.
curate when you have loaded that package.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.
But not 120 bits of pi... just 120 bits of the double precision version of pi.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go
Use dev.off and re-open the device.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
This does not clarify. Please re-read Bert's response and try again.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Li
Not reproducible.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Sorry, now it works for me as well. And yes, must drop rows with is.na( prace )
prior to calling ggplot. Note that the levels of prace do not contain NA so
your subject line is not correct.
---
Jeff Newmiller
I think grep is better suited to this:
zz$v5 <- grepl( paste0( alarm.words, collapse="|" ), do.call( paste, zz[ , 2:3
] ) ) )
---
Jeff NewmillerThe . . Go Live...
DCN:
Just add a word break marker before and after:
zz$v5 <- grepl( paste0( "\\b(", paste0( alarm.words, collapse="|" ), ")\\b" ),
do.call( paste, zz[ , 2:3 ] ) ) )
---
Jeff New
ct.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 provide commented, minimal, self-contained, reproducible code.
---
select the subset of columns to work with, and the
rowSums function to do the calculations. Something like
dta$abc <- rowSums( dta[ , grep( "abc", names( dta ) ) ] )
---
Jeff Newmiller
.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
/Software
.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
/Software/Embedded
EE[,,1] <- A[,,1] %*% B[,,1]
EE[,,2] <- A[,,2] %*% B[,,2]
EE[,,3] <- A[,,3] %*% B[,,3]
etc.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#.
extra little effort to dput some example data so we can communicate clearly
about your problem. [1]
[1]
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---
Jeff Newm
providing appropriate
resources to assist the student so we should not have to second guess them
anyway. Reducing list volume is at best a secondary concern from my perspective.
---
Jeff NewmillerThe
"\\b" is a zero length match. strsplit seems to chop at least one character off
the beginning of the string if it sees a match, and then it looks at the
shortened string that remains and repeats.
---
Jeff
;red green")
[1] 1
## as expected
Does strsplit use a different regex engine than grep()? Or more
likely, what am I misunderstanding?
Thanks.
Bert
David Winsemius
Alameda, CA, USA
__
R-help@r-project.org mailing list -- T
re, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
---
Jeff Newmiller
ing-guide.html
and provide commented, minimal, self-contained, reproducible code.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Read the Posting Guide. Most attachments get stripped on the list to discourage
viruses and encourage small, reproducible examples in the body of the email.
---
Jeff NewmillerThe
on, indv3 is from x.HHu,
and the rest position and indv1 and indv2 are from y.HHo
HHid position ind3 indv1 indv2
1 HH1 10 0 2 0
2 HH10101 0NA 2
3 HH11111 NANA NA
4 HH2 20 0 0
an suggest ways to fix it in R.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#..
.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
/Software/Embedded
annot advise you on ff.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Pl
701 - 800 of 4330 matches
Mail list logo