On 12/08/2014 07:07, David Winsemius wrote:
On Aug 11, 2014, at 8:01 PM, John McKown wrote:
On Mon, Aug 11, 2014 at 9:43 PM, Thomas Adams wrote:
Grant,
Assuming all your filenames are something like file1.txt,
file2.txt,file3.txt... And using the Mac OSX terminal app (after you cd to
the di
On Aug 11, 2014, at 8:01 PM, John McKown wrote:
> On Mon, Aug 11, 2014 at 9:43 PM, Thomas Adams wrote:
>> Grant,
>>
>> Assuming all your filenames are something like file1.txt,
>> file2.txt,file3.txt... And using the Mac OSX terminal app (after you cd to
>> the directory where your files are lo
On Mon, Aug 11, 2014 at 9:43 PM, Thomas Adams wrote:
> Grant,
>
> Assuming all your filenames are something like file1.txt,
> file2.txt,file3.txt... And using the Mac OSX terminal app (after you cd to
> the directory where your files are located...
>
> This will strip off the 1st lines, that is, y
Grant,
Assuming all your filenames are something like file1.txt,
file2.txt,file3.txt... And using the Mac OSX terminal app (after you cd to
the directory where your files are located...
This will strip off the 1st lines, that is, your header lines:
for file in *.txt;do
sed -i '1d'${file};
done
On Sun, Aug 10, 2014 at 6:50 PM, John McKown
wrote:
> OK, I assume this results in a vector of file names in a variable,
> like you'd get from list.files();
Yes.
> Why? Do you need them in separate data frames?
I do not.
> The meat of the question. If you don't need the files in separate data
Scott,
there is a package called ff that '... provides data structures that are
stored on disk but behave (almost) as if they were in RAM ...'
i hope it helps
peter
On Sat, Aug 9, 2014 at 6:31 PM, Waichler, Scott R
wrote:
> Hi,
>
> I have some very large (~1.1 GB) output files from a groundwa
Hi
If you want a 1 package and 1 function approach try this
xyplot(conc ~ time | factor(subject, levels = c(2,1,3)), data = data.d,
par.settings = list(strip.background = list(col = "transparent")),
layout = c(3,1),
aspect = 1,
type = c("b","g"),
scales =
On Aug 11, 2014, at 3:27 PM, Jinsong Zhao wrote:
> On 2014/8/11 14:50, William Dunlap wrote:
>> You can use
>> m[m > 0 & m <= 1.0] <- 1
>> m[m > 1 ] <- 2
>> or, if you have lots of intervals, something based on findInterval(). E.g.,
>> m[] <- findInterval(m, c(-Inf, 0, 1, Inf)) - 1
>
On 2014/8/11 14:50, William Dunlap wrote:
You can use
m[m > 0 & m <= 1.0] <- 1
m[m > 1 ] <- 2
or, if you have lots of intervals, something based on findInterval(). E.g.,
m[] <- findInterval(m, c(-Inf, 0, 1, Inf)) - 1
(What do you want to do with non-positive numbers?)
Bill Dunla
You can use
m[m > 0 & m <= 1.0] <- 1
m[m > 1 ] <- 2
or, if you have lots of intervals, something based on findInterval(). E.g.,
m[] <- findInterval(m, c(-Inf, 0, 1, Inf)) - 1
(What do you want to do with non-positive numbers?)
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Au
(m>1)+1
On Mon, Aug 11, 2014 at 5:40 PM, Jinsong Zhao wrote:
> Hi there,
>
> I hope to replace a range of numeric in a matrix with a integer. For
> example, in the following matrix, I want to use 1 to replace the elements
> range from 0.0 to 1.0, and all larger than 1. with 2.
>
>> (m <- matrix(r
Hi there,
I hope to replace a range of numeric in a matrix with a integer. For
example, in the following matrix, I want to use 1 to replace the
elements range from 0.0 to 1.0, and all larger than 1. with 2.
> (m <- matrix(runif(16, 0, 2), nrow = 4))
[,1] [,2] [,3] [,4
In addition to the solution and comments that you have already
received, here are a couple of additional comments:
This is a variant on FAQ 7.21, if you had found that FAQ then it would
have told you about the get function.
The most important part of the answer in FAQ 7.21 is the last part
where
That code will not work. get() and assign() are troublesome for a
variety of reasons. E.g.,
* adding made-up names to the current environment is dangerous. They
may clobber fixed names in the environment. You may be confused about
what the current environment is (especially when refactoring co
whoops
P1<- plot(grouped.data)
Sent from my iPhone
> On Aug 11, 2014, at 5:06, Naser Jamil wrote:
>
> Dear R-user,
> May I seek your help to sort out a little problem. I have the following
> codes
> to draw two graphs. I want to superimpose the second one on each of the
> first one.
>
> #
The book is absolutely helpful to me. Any R newusers should read the book. Now
I am reading the Section Rcpp.
--
PO SU
mail: desolato...@163.com
Majored in Statistics from SJTU
At 2014-08-11 09:02:53, "Mitchell Maltenfort" wrote:
>Ah, what do you know anyway? -- as the book critic said t
On Mon, Aug 11, 2014 at 9:00 AM, michelle maurin
wrote:
> see code below
>
>
> pollutantmean <- function(directory, pollutant, id = 1:332) {
> files_list <- list.files(directory, full.names=TRUE) #creates a list of
> files
> dat <- data.frame()#creates an empty data frame
> for (i in 1:332)
I think this is what you are looking for.
library(latticeExtra)
t.tmp <-seq(0,30, .01)
P1 + layer(panel.xyplot(y=f1(0.5,0.5,0.06, t.tmp), x=t.tmp, type="l",
col="black"))
Notice that t is a very bad name for your variable as it is the name
of a function.
I used t.tmp instead.
Rich
On Mon, Aug
Hi all,
I wonder if you can help me.
THE PROBLEM
I want to train and test a GLM with some large datasets. I am running into some
problems when I flatten my tables together to feed into the GLM model, as it
produces a very large table which is far too big for the memory on my computer.
THREE T
Good Morning,
first let me thank you very much for answering my first two questions on
this list.
Currently, i do vegan's EnvFit to simple PCA ordinations. When drawing
the biplot, one can set a cutoff to just fit the parameters with
significant p-values (via p.max=0.05 in the plot command).
Dear R-user,
May I seek your help to sort out a little problem. I have the following
codes
to draw two graphs. I want to superimpose the second one on each of the
first one.
library(nlme)
subject<-c(1,1,1,2,2,2,3,3,3)
time<-c(0.0,5.4,21.0,0.0,5.4,21.0,0.0,
Ah, what do you know anyway? -- as the book critic said to the author.
Ersatzistician and Chutzpahthologist
I can answer any question. "I don't know" is an answer. "I don't know
yet" is a better answer.
"I can write better than anybody who can write faster, and I can
Or just go to http://adv-r.had.co.nz/ ...
Hadley
On Sun, Aug 10, 2014 at 9:34 PM, John McKown
wrote:
> Well, it says that it's from Hadley Wickham.
>
> https://github.com/hadley/adv-r
>
>
> This is code and text behind the Advanced R programming book.
>
> The site is built using jekyll, with a
On 11/08/14 20:17, pari hesabi wrote:
Hello everybody,
Can anybody help me to write a program for the CDF of sum of two
independent gamma random variables ( covolution of two gamma
distributions) with different amounts of parameters( the shape
parameters are the same)?
Is this homework? Th
Dear Diba,
you could try package distr; eg.
library(distr)
G1 <- Gammad(scale = 0.7, shape = 0.5)
G2 <- Gammad(scale = 2.1, shape = 1.7)
G3 <- G1+G2 # convolution
G3
For the convolution exact formulas are applied if available, otherwise
we use FFT; see also http://www.jstatsoft.org/v59/i04/ (w
Dear Rcppusers,
I can't figure out what the following codes do:
int f4(Function pred, List x) {
int n = x.size();
for(int i = 0; i < n; ++i) {
LogicalVector res = pred(x[i]);
if (res[0]) return i + 1;
}
return 0;
}
I investigated it, and understand applying a function to everypart of a lis
It's a great method, but there is a memory problem, DFS would occupy a large
memory. So from this point of view, i prefer the loop.
>> for (i in 1 : nrow(unique)){
>> tmp=get(past0("DF",i))[1,]
>> assign(paste0("df",i),tmp)
>> dfi=dfi[,1:3]
>> names(dfi)=names(tmp[c(1,4,5)])
>> dfi=rbind(dfi,tm
Hello,
I'm taking part in Google Summer of Code 2014 wih Ganglia and I spent the
past few months implementing an R package that makes it possible to
directly import and work with RRD (http://oss.oetiker.ch/rrdtool/) files in
R.
There are currently three ways to use the package:
- importRRD("file
Hello everybody,
Can anybody help me to write a program for the CDF of sum of two independent
gamma random variables ( covolution of two gamma distributions) with
different amounts of parameters( the shape parameters are the same)?
Thank you
Diba
29 matches
Mail list logo