of my way to
confirm whether it is homework... the instructor has internet access too.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
I assiduously avoid automatically generating distinct objects, and recommend
that you also do so.
You have the data, and can refer to individual rows by index as you need them.
---
Jeff Newmiller
efficient methods, but preventing any runaway process from bringing the
server to its knees is sysadmin work.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer
from character to factor.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO
I don't know anything about your subject, but have you reviewed
RSiteSearch(ornstein uhlenbeck)
?
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
==
unique(my.data$person)[i])]
- seq (1:dim(tmp)[1]) }
Dunno what tmp is... but try this:
my.data$item.number - 1
my.data$item.number - ave( my.data$item.number, my.data$person,
FUN=cumsum )
---
Jeff Newmiller
?subset
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
.
You can also fix it in R using gsub to replace commas with empty strings and
as.numeric to convert to numeric form. There are examples of this in the
mailing list archives.
---
Jeff Newmiller
You would need an infinite amount of time and an infinite amount of numerical
precision, all to arrive at the conclusion that the answer is infinite. Or you
could take a short cut:
ans - Inf
---
Jeff Newmiller
statistician.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
Mmm... sorry, psychic powers not working today.
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---
Jeff NewmillerThe . . Go Live
Michael, this comment doesn't seem appropriate to the question, since the
sample data is a ragged array that requires the addition of NAs to fit into a
wide format.
---
Jeff Newmiller
Try using the lm function:
?lm
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
No.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O
is very
similar, but you cannot use list operators $ and [[ on matrices (at least not
to get the results you are suggesting).
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew
?ifelse
Quite distinct from if () {} else {}.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
Your questions are all but unanswerable. Read the posting guide and
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---
Jeff Newmiller
.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O
It is straightforward to load function definitions into memory using the
source() function.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
?ifelse
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
special-interest-group mailing list how to resolve your editor problem.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
or at least not confuse others.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
and provide commented, minimal, self-contained, reproducible code.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
commented, minimal, self-contained, reproducible code.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries
://www.r-project.org/doc/bib/R-publications.html).
Please read the posting guide, and post in plain text.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.us
?summary.lm
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
suggestions.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
Use a while loop instead of a for loop. I don't think what you have coded makes
any sense, but fighting the for loop over control of the indexing variable is a
recipe for failure.
---
Jeff Newmiller
At the R prompt, type
RSiteSearch(metropolis Hastings)
and catch your own fish.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
was, but that is the nature of percentages.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
?source
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
Follow the link in the footer of any message from the list to the web page that
lets you modify your list subscription.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew
You have not indicated why the subset function is insufficient for your needs...
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
What OS are you using? It makes a difference.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
to the read.table function and
use string operations to get rid of the brackets before converting to numeric.
Factor variable can be a blessing, but seem more of a curse if you don't
understand them.
---
Jeff Newmiller
This is off topic here. You should post on the ESS help list.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
?
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer
expressions. Alternately, you can learn RE
syntax and escape the carat symbol so it is not interpreted specially.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.us
(2012-06-22)
$nickname
[1] Roasted Marshmallows
On 7/12/2012, at 04:29 , Uwe Ligges lig...@statistik.tu-dortmund.de
wrote:
On 06.12.2012 15:54, Jeff Newmiller wrote:
What OS are you using? It makes a difference.
... and R version.
Uwe Ligges
?cut
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O
Yes, I thought it was good, but for a book on graphics the coin problem was
noticeably lacking in clarity.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.us
.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries
http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Data-in-packages
Don't get stuck on your idea that the file is a gif... once you load it into
memory it is an R object.
---
Jeff Newmiller
What about putting your objects in a list, which does not have the search
through parents semantics?
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
... origin pro?
Then why are you here?
It is not clear from your message that this has anything to do with R.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.us
is.na(df2) is not doing what you think it is doing. Perhaps you should read
?na.omit.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
tell.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
Please read the posting guide. Packages have their own developers, as well as
their own change logs [in this case
http://cran.r-project.org/web/packages/forecast/ChangeLog].
---
Jeff Newmiller
Ask on the ggplot mailing list?
Normally you use melted data (see the reshape2 package) and let the scales
feature build the legend for you.
---
Jeff NewmillerThe . . Go Live
There is. Use while loops.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live
it in the Introduction to R document supplied with R.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
this list.
d) There is a well-written Introduction to R pdf document supplied with the R
software.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics
). You
can use the reshape2 package for transforming back and forth.
You may also want to check out the Time Series task view on CRAN. Most of those
classes work with data in array representation for high speed.
---
Jeff
Sounds like you want to simulate an ARIMA model. Why don't you read up on that
topic using RSiteSearch() and then perhaps rephrase your question?
---
Jeff NewmillerThe . . Go Live
perhaps you should be in communication with the ggplot developers. The ggplot
mailing list would be an appropriate place to begin.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew
is.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O
You might consider using the sqldf package.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries
.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O
x - c(1,1,2,2,3,3,4,4)
match(unique(x),x)
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
where is your sample code asked for in the Posting Guide?
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
function that does this for all cases.
Your goals must be part of each extraction function you use, so you really need
to write it yourself.
---
Jeff NewmillerThe . . Go Live
to
generate sample code that reproduces your problem, even if imperfectly.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
to use the ? shortcut in R, Google, RSiteSearch(), or the sos
package to look for supporting functionality.
You can also learn quite a bit by lurking on this list and reading answers to
other people's questions.
---
Jeff
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries
In the teaching to fish department, see
http://cran.R-project.org/bin/linux/debian/ and customise your mirror as
appropriate.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew
yourself with a bit of study if he does not respond.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
/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 NewmillerThe . . Go
of your data organized in
directories by the project you are working on.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research
Use Sys.setenv(TZ=Etc/GMT+8) before you read the files.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar
internally as UTC, so once they are read merging the
data should be easy.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer
I may be missing something here, but what does preferring roxygen over Rd files
have to do with Fortran, spaghetti code, test suites, or functionality? Do you
even know what roxygen is?
---
Jeff Newmiller The . . Go
Ah, sorry... I became confused by the mixture of top and bottom posting
combined with a leading pronoun. I will be on the lookout for that combination
now.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew
Why would you do this, when lists are fundamental types in R?
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar
I think your rewrite is overdue, because returning the array from the which
function seems counterintuitive.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO
a) POSIXt represents the idea of a datetime. POSIXct is a compact
representation (number of seconds since 1970-01-01 00:00:00 GMT) of this
idea. POSIXlt is an inefficient but convenient representation (using
nine separate components) of this idea. Either POSIXct or POSIXlt may be
treated as a
).
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
Use ?plyr::ddply
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded
before you source the files.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software
.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
integers as much as possible.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software
)
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer
side, why doesn't it deal similarly with the left side?
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries
playing with RStudio, but they haven't got the directory thing
straightened out yet AFAIK.
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
I just fix it afterward:
dta - dta[,c(col1,col2,col3)]
---
Jeff Newmiller The . . Go Live...
DCN:jdnew...@dcn.davis.ca.us Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar
, the sapply function. This avoids
allocating a whole sequence of data frames with sizes from 1:n, which is very
inefficient use of memory.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew
intersect(names(data1),names(data2))
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
such as stats.stackexchange.com. With the
answer to that question you could use the RSiteSeek function to search for
references to that algorithm, or even implement it yourself.
---
Jeff NewmillerThe . . Go
knitr markdown+pandoc gives serviceable results, for low enough expectations
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live
is not a file on disk.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO
format for Excel.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead
sum(M[1]12 12=M[2]) untested, no data
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
and it changes as
numbers are requested.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go
Contact the package author?
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O
?
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/BatteriesO.O#. #.O#. with
/Software
901 - 1000 of 3908 matches
Mail list logo