Dear all,
in my .bashrc file I have set the environment variable R_HISTFILE like this:
export R_HISTFILE=$HOME/.Rhistory
I then use it in my .Rprofile to have R writing all the history in a
single file, rather than on a per directory basis.
However this doesn't work becaus R_HISTFILE is not
Luca Cerone luca.cer...@gmail.com writes:
Dear all,
in my .bashrc file I have set the environment variable R_HISTFILE like this:
export R_HISTFILE=$HOME/.Rhistory
I then use it in my .Rprofile to have R writing all the history in a
single file, rather than on a per directory basis.
Thanks,
effectively I was using RStudio (on an Ubuntu 12.04 machine).
Is there any other way to make the variable available to Rstudio?
Now I have simply written the path manually, but I like the idea of
having a system-wide variable :)
Thanks for your help, Rainer!
On Tue, Apr 1, 2014 at
Luca Cerone luca.cer...@gmail.com writes:
Thanks,
effectively I was using RStudio (on an Ubuntu 12.04 machine).
Is there any other way to make the variable available to Rstudio?
Now I have simply written the path manually, but I like the idea of
having a system-wide variable :)
Check out
deleting the old rownames might help.
rownames(df1) - rownames(df2) - rownames(df3) - NULL
But a reproducible example would be interestng. In simple cases there
is no problem with duplicated rownames as they are automatically
renamed:
df1 - data.frame(A=1, B=2, row.names=A)
df2 -
Hi, Well, the solution to my problem maybe is easy, but i have really stuck
with this.
I have a process which evolves in three times, so there is the parameter of
time (t=1,2,3).More particularly i have three 4*4 matrices, one for each time.
In other words each element has three cordinates:
Hi all,
I got some trouble trying to open a .kml file into R. Usually, the readOGR
package works great for it but here I get a message error that I can't
understand.
When I'm typing this :
myfile -readOGR(dsn=/windows/landuse.kml,layer=agricultural use)
I get the following error :
Error in
Hi ,
A colleague has done an Cox-regression , on data not available to me.
I ran an identical Cox regression model on similar data.
If I use datadist to store the distribution summaries for included variables,
and replace coefficients and linear predictor with my colleague's coefficients
and
Hi all,
I have a question on rpart and randomforest results:
We calculated a single regression tree using rpart and got a pseudo-r2 of
roundabout 10% (which is not too bad compared to a linear regression on this
data). Encouraged by this we grew a whole regression forest on the same data
set
Is it possible that the random forest is somehow adjusting for optimism or
overfitting?
On Apr 1, 2014 7:27 AM, Schillo, Sonja sonja.schi...@uni-due.de wrote:
Hi all,
I have a question on rpart and randomforest results:
We calculated a single regression tree using rpart and got a pseudo-r2
Hi Denis,
Thank you so much. This is exactly what i needed. I am not telling you how much
time i wasted to change default colors for fill and colour, coming up with
pretty weird ideas, non working, of course.
Thanks again,
Monica
Date: Tue, 1 Apr 2014 02:23:08 -0700
Subject: Re: [R]
Dear all,
Anyone knows how to generate a vector of Normal distributed values
(for example N(0,0.5)), but with a sum-to-zero constraint??
The sum would be exactly zero, without decimals.
I made some attempts:
l - 100
aux - rnorm(l,0,0.5)
s - sum(aux)/l
aux2 - aux-s
sum(aux2)
[1]
You are on a fool's errand. Read FAQ 7.31.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...
Use an 3-dimensional array.
?array
And any basic introduction to R.
-
David L Carlson
Department of Anthropology
Texas AM University
College Station, TX 77840-4352
-Original Message-
From: r-help-boun...@r-project.org
This mailing list has a no homework policy (read the Posting Guide, please,
which also requests that you post in plain text format only). If this is not
homework then you will have to be a bit more specific about what you know and
what you don't in order to get useful help. Questions about why
Make a copy with opposite sign. This is Normal, symmetric, but no longer random.
set.seed(112358)
x - rnorm(5000, 0, 0.5)
x - c(x, -x)
sum(x)
hist(x)
B.
On 2014-04-01, at 8:56 AM, Marc Marí Dell'Olmo wrote:
Dear all,
Anyone knows how to generate a vector of Normal distributed
The sum-to-zero constraint imposes a loss of one degree of freedom. Of N
samples, only (N-1) can be random. Thus the solution is
N - 100
x - rnorm(N-1)
x - c(x, -sum(x))
sum(x)
[1] -7.199102e-17
Boris Steipe boris.ste...@utoronto.ca
Sent by: r-help-boun...@r-project.org
But the result is not Normal. Consider:
set.seed(112358)
N - 100
x - rnorm(N-1)
sum(x)
[1] 1.759446 !!!
i.e. you have an outlier at 1.7 sigma, and for larger N...
set.seed(112358)
N - 1
x - rnorm(N-1)
sum(x)
[1] -91.19731
B.
On 2014-04-01, at 10:14 AM, jlu...@ria.buffalo.edu wrote:
Boris is right. I need this vector to include as initial values of a
MCMC process (with openbugs) and If I use this last approach sum(x)
could be a large (or extreme) value and can cause problems.
The other approach x - c(x, -x) has the problem that only vectors
with even values are obtained.
It seems so simple to me, that I must be missing something.
Subject to Jeff Newmiller's reminder of FAQ 7.31; if the sum is zero
then the mean is zero and vice versa.
The OP's original attempt of:
-
l - 100
aux - rnorm(l,0,0.5)
s - sum(aux)/l
aux2 - aux-s
sum(aux2)
Then what's wrong with centering your initial values around the mean?
Marc Marí Dell'Olmo marceivi...@gmail.com
04/01/2014 10:56 AM
To
Boris Steipe boris.ste...@utoronto.ca,
cc
jlu...@ria.buffalo.edu, r-help@r-project.org r-help@r-project.org
Subject
Re: [R] A vector of normal distributed
Hello,
One way is to use ?scale.
set.seed(4867)
l - 100
aux - rnorm(l, 0, 0.5)
aux - scale(aux, scale = FALSE)
sum(aux)
hist(aux, prob = TRUE)
curve(dnorm(x, 0, 0.5), from = -2, to = 2, add = TRUE)
Hope this helps,
Rui Barradas
Em 01-04-2014 16:01, jlu...@ria.buffalo.edu escreveu:
Then
Dear useRs,
I have a number of text file located at a certain location with the following
names.
s1.txt,s2.txt,s3.txt,s4.txt,s5.txt...s120.txt
when i read them, before opening them, by using
filelist = list.files(pattern = .s*.txt)
The are opened in the following order
[1] s1.txt
I would like to drop the out put part of the output that begins with
as.factor(stratadow) in the summary of a model shown below.How can I
accomplish this task? Thanks
summary(mod1)
Family: poisson
Link function: log
Formula:
death ~ hw + temp + as.factor(stratadow)
Parametric coefficients:
Try
mixedsort in gtools package
Br. Frede
Sendt fra Samsung mobil
Oprindelig meddelelse
Fra: eliza botto
Dato:01/04/2014 18.10 (GMT+01:00)
Til: r-help@r-project.org
Emne: [R] importing multiple text files in R
Dear useRs,
I have a number of text file located at a certain
Is the time and date package the right one to convert a vector, such as the
following, into a time format?
12:06 11:51 11:53 12:27 14:20 12:27
The aim is to deal with a time variable numerically (find means, etc).
Thanks
Harold
[[alternative HTML version deleted]]
someone has solved the problem?? I have the same problem
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
I want to read the following file with and extract the longitude and latitude
for certain areas.
The file is satellite data from topex and contains the monthly wave energy
fluxes around the worlds oceans.
For doing that i have the following loop that reads the specific data.
I then want to
On 01/04/2014 12:33 PM, Doran, Harold wrote:
Is the time and date package the right one to convert a vector, such as the
following, into a time format?
12:06 11:51 11:53 12:27 14:20 12:27
The aim is to deal with a time variable numerically (find means, etc).
I don't know which package you
you can extract numbers from your file names and then sort them like this:
filelist = list.files(pattern = .s*.txt)
filelist[order(as.integer(gsub([^0-9], , filelist)))]
(cf with alphabetic order: filelist[order(gsub([^0-9], , filelist))]
Or if you just have s1...s120 you can construct the names
Use .Renviron
Hadley
On Tue, Apr 1, 2014 at 2:33 AM, Luca Cerone luca.cer...@gmail.com wrote:
Thanks,
effectively I was using RStudio (on an Ubuntu 12.04 machine).
Is there any other way to make the variable available to Rstudio?
Now I have simply written the path manually, but I like the
Hi,
You could extract the part you wanted by:
indx - grepl(as.factor,names(mod1$coefficients))
coef(summary(mod1))[!indx,]
A.K.
On Tuesday, April 1, 2014 1:03 PM, Kumsa waddee...@gmail.com wrote:
I would like to drop the out put part of the output that begins with
as.factor(stratadow) in the
Here is one approach to generating a set (or in this case multiple
sets) of normals that sum to 0 (with a little round off error) and
works for an odd number of points:
v - matrix(-1/8, 9, 9)
diag(v) - 1
eigen(v)
x - mvrnorm(100,mu=rep(0,9), Sigma=v, empirical=TRUE)
rowSums(x)
range(.Last.value)
Hi,
May be this helps:
set.seed(14)
dat1 - data.frame(shell_ID=
sample(c(0208A_47_33,0208A_47_34,0912C_13_3,1400C_2_48),20,replace=TRUE),stringsAsFactors=FALSE)
dat2 - dat1
ord1 -
order(as.numeric(gsub([[:alpha:]]+.*,,dat1$shell_ID)),as.numeric(gsub(.*\\_,,dat1$shell_ID))
)
dat1 -
Hi,
May be this helps:
set.seed(445)
dat1 -
as.data.frame(matrix(sample(seq(2,4,by=0.5),80,replace=TRUE),ncol=20),stringsAsFactors=FALSE)
dat1[dat1==2] -
dat1[,sapply(dat1,is.character)] - lapply(dat1[,sapply(dat1,is.character)]
,as.numeric)
identical(sum(sapply(dat1,is.numeric)),
Dear All,
Sorry to bother you.
I am using Aquamacs 3.0a (GNU Emacs 24.3.50.2), newly installed.
Somehow, on my mac even the newly installed R3.0.3 will mill endlessly
after M-x R waiting for
127.0.0.1:22381/doc/html/index.html
to load. How can I find out, what is wrong with my
Dear All,
Sorry to bother you.
I am using Aquamacs 3.0a (GNU Emacs 24.3.50.2), newly installed, on Mac
OSX 10.7.5 .
Somehow, on my mac even the newly installed R3.0.3 will mill endlessly
after M-x R waiting for
127.0.0.1:22381/doc/html/index.html
to load. How can I find out, what is
Hi,
What are the columns in sat.mat?
I can see that, sat.mat[,1:2] are longitude and latitude in some form
but we don't even know what dim(sat.mat)[2] is from what you've shown.
You can avoid the loops (untested):
asub - sat.mat[,1] = long.min sat.mat[,1] = long.max
sat.mat[,2] = lat.min
sorry i forgot to put the file; Here it is
https://www.dropbox.com/s/paau32l6bth5t8r/pow_sat_file.txt
--
View this message in context:
http://r.789695.n4.nabble.com/Plotting-Satellite-tp4687971p4687981.html
Sent from the R help mailing list archive at Nabble.com.
I have a series of dates and times in one column. They are all in the format
%m/%d/%Y %H:%M:%S; however, they are character values.
I have a number of problems:
1) if I use antdist$ts[1] to just examine the FIRST value of the timestamp
(ts) column, it shows that there are 144873 Levels, and it
Dear Guys..
Thank you very much for taking time to answer these questions.
I 'm running simple command directly on R console:
corpus=tm_map(corpus,tolower)
giving this result:
The process has forked and you cannot use this CoreFoundation
functionality safely. You MUST exec(). Once and
On 01/04/2014, 4:13 PM, Christian Hoffmann wrote:
Dear All,
Sorry to bother you.
I am using Aquamacs 3.0a (GNU Emacs 24.3.50.2), newly installed.
Somehow, on my mac even the newly installed R3.0.3 will mill endlessly
after M-x R waiting for
127.0.0.1:22381/doc/html/index.html
to load. How
Dear list members,
The answer is in package pracma, function gradient.
Regards,
Pascal Oettli
On Fri, Mar 28, 2014 at 2:51 PM, Pascal Oettli kri...@ymail.com wrote:
Dear list members,
I am wondering whether there is any more efficient way to calculate
centered difference on matrix in R?
Hello,
The binom package is using ggplot2 to plot the density. Thus, you
have to follow the ggplot2 syntax:
R binom.bayes.densityplot(hpdc) + ggtitle(my plot)
HTH
Pascal
On Tue, Apr 1, 2014 at 7:41 AM, Chris chris.bar...@barkerstats.com wrote:
Hi, I'm using a function in the binom library.
Hi all,
I'm trying to use deSolve to solve a series of differential equations
with rk4 mimicking a SEIR model, while including an event/function
that is not solely time-dependent.
Explicitly:
I want to introduce vaccination 7 days after the proportion of I2/N2
reaches 0.01.
Here is the code I
Hi 'What is your name?'
When you read the data into R the first column was interpreted as a factor
where the levels are the timestamps. If you used read.table() there is the
stringsAsFactor you can set to FALSE so that the first column will be read in
as strings instead of a factor.
However
46 matches
Mail list logo