Re: [R] about data problem

2016-09-20 Thread Jeff Newmiller
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

Re: [R] if/else help

2016-09-21 Thread Jeff Newmiller
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

[R] Establishing dates in Time Series Data

2016-09-21 Thread Jeff Reichman
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

Re: [R] Replacing value with "1"

2016-09-23 Thread Jeff Newmiller
ide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##

Re: [R] how to pass multiple pattern varibles to grep()

2016-09-23 Thread Jeff Newmiller
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.

Re: [R] curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length

2016-09-25 Thread Jeff Newmiller
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

Re: [R] curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length

2016-09-25 Thread Jeff Newmiller
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

Re: [R] curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length

2016-09-25 Thread Jeff Newmiller
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

Re: [R] curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length

2016-09-25 Thread Jeff Newmiller
;,]$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

Re: [R] curve() doesn't seem to use the whole range of x? And Error: longer object length is not a multiple of shorter object length

2016-09-26 Thread Jeff Newmiller
: >> >> 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

Re: [R] src/Makevars ignored ?

2016-09-26 Thread Jeff Newmiller
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

[R] I get only NA values into my loop - Need to find mean of max CR_Art per Experiment per Mussel

2016-10-01 Thread Jeff Rømer
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.

Re: [R] Font problem.

2016-10-02 Thread Jeff Newmiller
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

Re: [R] Programming R to avoid loops

2015-04-18 Thread Jeff Newmiller
-all-about-adding-features --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playin

Re: [R] basic q re: parsing functions, declaration order

2015-04-18 Thread Jeff Newmiller
ion should have a clear goal and as few side effects as possible. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

2015-04-20 Thread Jeff Newmiller
You are not generating lists, you are generating vectors. Try rep( seq.int( n ), each= 4 ) --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go

Re: [R] run Rscript and ignore errors?

2015-04-24 Thread Jeff Newmiller
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

Re: [R] Need content_transformer() called by tm_map() to change non-letters to spaces

2015-04-24 Thread Jeff Newmiller
Regex "[^a-zA-Z]" reads as "not a letter". --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] some general advice sought on the use of gctorture()

2015-04-24 Thread Jeff Newmiller
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

Re: [R] knittr: non-numeric argument to binary operator

2015-04-26 Thread Jeff Newmiller
-make-a-great-r-reproducible-example --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO

Re: [R] package.skeleton warning

2015-04-28 Thread Jeff Newmiller
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

Re: [R] Forecasting prices

2015-04-28 Thread Jeff Newmiller
. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with

Re: [R] Stacking of vectors to form a column vector

2015-04-29 Thread Jeff Newmiller
Vectors are not "columns" or "rows". Use the c() function to concatenate vectors. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#.

Re: [R] Stacking of vectors to form a column vector

2015-04-29 Thread Jeff Newmiller
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

Re: [R] cycle in a directed graph

2015-05-03 Thread Jeff Newmiller
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

Re: [R] Fwd: (no subject)

2015-05-03 Thread Jeff Newmiller
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]] >>

Re: [R] Downloading file.Rdata from internet

2015-05-04 Thread Jeff Newmiller
share your files. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Res

Re: [R] MOnth over Month Variance in %

2015-05-06 Thread Jeff Newmiller
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

Re: [R] Calling Function With Arguments In a Script

2015-05-07 Thread Jeff Newmiller
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#.

Re: [R] Error importing data - wrapping?

2015-05-09 Thread Jeff Newmiller
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

Re: [R] [SPAM?] binding two lists of lists of dataframes together

2015-05-11 Thread Jeff Newmiller
ple --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. w

Re: [R] Plotting times at night and getting plot limits correct

2015-05-14 Thread Jeff Newmiller
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

Re: [R] specific package to laply

2015-05-14 Thread Jeff Newmiller
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

Re: [R] Reading access file

2015-05-14 Thread 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/

Re: [R] Using iconv from glibc

2015-05-14 Thread Jeff Newmiller
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

Re: [R] How to make sub-headers in R

2015-05-15 Thread Jeff Newmiller
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

Re: [R] Template Engine for R

2015-05-16 Thread Jeff Newmiller
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

Re: [R] Help manipulating 23andme data in R - reproducing relationship results

2015-05-17 Thread 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 . .

Re: [R] Error in dimnames(phi) <- list(rn, dims) : length of 'dimnames' [2] not equal to array extent

2015-05-17 Thread Jeff Newmiller
--- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers

Re: [R] R-help

2015-05-18 Thread Jeff Newmiller
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/ ---

Re: [R] Urgent :) Output interpretation: standard error of lm dummy variable

2015-05-19 Thread Jeff Newmiller
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

Re: [R] Question regarding different R versions on an enterprise network server

2015-05-21 Thread Jeff Newmiller
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

Re: [R] Question regarding different R versions on an enterprise network server

2015-05-21 Thread Jeff Newmiller
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

Re: [R] Debian Rcmdr misses sem leaps etc

2015-05-22 Thread Jeff Newmiller
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

Re: [R] Roxygen Documentation

2015-05-22 Thread Jeff Newmiller
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

Re: [R] R programming

2015-05-22 Thread Jeff Newmiller
time --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (

Re: [R] problem with duplicated function

2015-05-24 Thread Jeff Newmiller
w.com/questions/5963269/how-to-make-a-great-r-reproducible-example --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Li

Re: [R] Trouble with SPI package

2015-05-25 Thread Jeff Newmiller
input file, and remove the line that overwrites it from your code. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go

Re: [R] How do I move the horizontal axis in a plot so that it starts at the zero of the vertical axis?

2015-05-25 Thread Jeff Newmiller
. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded

Re: [R] About performance of R

2015-05-27 Thread Jeff Newmiller
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

Re: [R] Using lapply when there are dependencies

2015-05-27 Thread Jeff Newmiller
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

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread Jeff Newmiller
you asked for one column at a time. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead:

Re: [R] Toronto CRAN mirror 403 error?

2015-05-29 Thread Jeff Newmiller
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

Re: [R] Arrays of variable dimensionality

2015-05-30 Thread Jeff Newmiller
the "aperm" function. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#

Re: [R] lattice contourplots

2015-06-01 Thread Jeff Newmiller
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

Re: [R] lattice contourplots

2015-06-01 Thread Jeff Newmiller
The help for for contourplot answers this question in the description of the formula (x) argument. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go

Re: [R] lattice contourplots

2015-06-01 Thread Jeff Newmiller
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

Re: [R] building a list in a loop

2015-06-05 Thread Jeff Newmiller
-reproducible-example --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research

Re: [R] Cross tabulation with top one variable and side as multiple variables

2015-06-09 Thread Jeff Newmiller
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

Re: [R] reading as date

2015-06-10 Thread Jeff Newmiller
Your example is not the same as the answers you have received. Look again. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go

Re: [R] How to validate the cluster analysis?

2015-06-10 Thread Jeff Newmiller
these issues. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Eng

Re: [R] Help with abs function

2015-06-12 Thread Jeff Newmiller
FAQ 7.31 --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research

Re: [R] Marascuilo procedure

2015-06-12 Thread Jeff Newmiller
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

Re: [R] Installing R 2.15.2 on Mac

2015-06-12 Thread Jeff Newmiller
. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O

Re: [R] matrix/df help populate NA

2015-06-13 Thread Jeff Newmiller
?merge Particularly look at the all argument. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO

Re: [R] Exporting from R to Excel or .csv

2015-06-16 Thread Jeff Newmiller
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

Re: [R] two problems

2015-06-21 Thread Jeff Newmiller
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

Re: [R] issue in running timeseries forecasting related package

2015-06-22 Thread 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

Re: [R] 3D point cloud fitting

2015-06-23 Thread Jeff Newmiller
--- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers

Re: [R] Returning the coefficient parameters from JRI

2015-06-24 Thread Jeff Newmiller
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: ##.#. ##.#.

Re: [R] repeated measures: multiple comparisons with pairwise.t.test and multcomp disagree

2015-06-24 Thread Jeff Newmiller
Bert, can you be more specific about which article for those of us who don't subscribe? --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Li

Re: [R] Remote Connection

2015-06-29 Thread Jeff Newmiller
ard networking setup. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. wit

Re: [R] Stream package

2015-06-29 Thread Jeff Newmiller
"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:

Re: [R] Subset() within function: logical error

2015-06-29 Thread Jeff Newmiller
to do with the pieces and less about making pieces. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live

Re: [R] erro during make

2015-06-30 Thread Jeff Newmiller
. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with

Re: [R] Is there a package for Granger causality in panel models?

2015-06-30 Thread Jeff Newmiller
I don't know, but I highly recommend the "sos" package so you can answer this for yourself. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#.

Re: [R] Ramanujan and the accuracy of floating point computations - using Rmpfr in R

2015-07-02 Thread Jeff Newmiller
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#. #.

Re: [R] : Ramanujan and the accuracy of floating point computations - using Rmpfr in R

2015-07-02 Thread Jeff Newmiller
But not 120 bits of pi... just 120 bits of the double precision version of pi. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go

Re: [R] How to feed graphic device (png, jpeg etc) with different files names

2015-07-03 Thread Jeff Newmiller
Use dev.off and re-open the device. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO

Re: [R] Greek letters in column titles.

2015-07-05 Thread Jeff Newmiller
This does not clarify. Please re-read Bert's response and try again. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Li

Re: [R] geom_segment drop unused levels

2015-07-07 Thread Jeff Newmiller
Not reproducible. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing

Re: [R] geom_segment drop unused levels

2015-07-07 Thread Jeff Newmiller
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

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread 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:

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread Jeff Newmiller
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

Re: [R] randomForest set.seed()

2015-07-09 Thread Jeff Newmiller
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. ---

Re: [R] sum some columns for each row

2015-07-09 Thread Jeff Newmiller
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

Re: [R] Compiling on AIX 6.1

2015-07-09 Thread Jeff Newmiller
. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software

Re: [R] Corrected: approaches tpmatrix multiplication of each layer of 3-d array with different matrix

2015-07-10 Thread Jeff Newmiller
. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded

Re: [R] Corrected: approaches to matrix multiplication of each layer of 3-d array with different matrix

2015-07-10 Thread Jeff Newmiller
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: ##.#. ##.#.

Re: [R] Trellis Plots: translating lattice xyplot() to ggplot()

2015-07-10 Thread Jeff Newmiller
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

Re: [R] (no subject)

2015-07-10 Thread Jeff Newmiller
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

Re: [R] Do grep() and strsplit() use different regex engines?

2015-07-11 Thread Jeff Newmiller
"\\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

Re: [R] Do grep() and strsplit() use different regex engines?

2015-07-11 Thread Jeff Newmiller
;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: [R] data$variable=factor(....)

2015-07-11 Thread Jeff Newmiller
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

Re: [R] Rolling Window Granger Causality

2015-07-11 Thread Jeff Newmiller
ing-guide.html and provide commented, minimal, self-contained, reproducible code. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Knitr/Lattice/Lyx [was: Trellis Plots: translating lattice xyplot() to ggplot()]

2015-07-11 Thread Jeff Newmiller
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

Re: [R] merge: right set overwrite left set

2015-07-12 Thread Jeff Newmiller
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

Re: [R] sum some columns for each row

2015-07-14 Thread Jeff Newmiller
an suggest ways to fix it in R. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#..

Re: [R] sum some columns for each row

2015-07-14 Thread Jeff Newmiller
. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded

Re: [R] Parsing large amounts of csv data with limited RAM

2015-07-14 Thread Jeff Newmiller
annot advise you on ff. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Pl

<    3   4   5   6   7   8   9   10   11   12   >