This is not one but two FAQs:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-file-names-work-in-Windows_003f
http://cran.r-project.org/bin/windows/base/rw-FAQ.html#R-can_0027t-find-my-file
See the posting guide and the footer of this message.
On 12/11/2013 06:13, Luca Meyer wrote:
Hi,
I
Hello,
What is the result when you use source("C:/Users/...R")?
Regards,
Pascal
On 12 November 2013 15:13, Luca Meyer wrote:
> Hi,
>
> I have a piece of code sitting on a dropbox directory and haev installed R
> 3.0.2 on 2 machines: one MacBook Pro and one Sony Vaio pc.
>
> Now, when I use
>
Hello,
You probably should install a Fortran compiler.
Regards,
Pascal
On 12 November 2013 13:40, Wang Chongyang wrote:
> I am using Ubuntu 12.04 and unable to install xts. Here are the info:
>
> usr/bin/ld: cannot find -lgfortran
> collect2: error: ld returned 1 exit status
> make: *** [xt
Hi,
I have a piece of code sitting on a dropbox directory and haev installed R
3.0.2 on 2 machines: one MacBook Pro and one Sony Vaio pc.
Now, when I use
source("/Users/R")
to call the script from the Mac no problems, but when I use
source("C:\Users\...R")
to call the script from the Sony
Hi,
I am building a bivariate SVAR model
y_1t=c_1+Ã_1 (1,1) y_(1,t-1)+Ã_1 (1,2) y_(2,t-1)+Ã_2 (1,1) y_(1,t-2)+Ã_2
(1,2) y_(2,t-2)+å_1t
b y_1t+ y_2t=c_2+Ã_1 (2,1) y_(1,t-1)+Ã_1 (2,2) y_(2,t-1)+Ã_2 (2,1)
y_(1,t-2)+Ã_2 (1,2) y_(2,t-2)+å_2t
Now y1 is "relatively" exogenous in that y
Wang Chongyang gmail.com> writes:
> I am using Ubuntu 12.04 and unable to install xts. Here are the info:
>
> usr/bin/ld: cannot find -lgfortran
Do 'sudo apt-get install r-base-dev' to install a set of requirement
for building packages, which includes among other things the Fortran
library you
HI,
set.seed(25)
dat1 <-
as.data.frame(matrix(sample(c("A","T","G","C"),46482*56,replace=TRUE),ncol=56,nrow=46482),stringsAsFactors=FALSE)
lst1 <- split(dat1,as.character(gl(nrow(dat1),20,nrow(dat1
res <- lapply(lst1,function(x) sapply(x[,1:8],function(y) sapply(x[,9:56],
function(z)
Hi,
May be this what you wanted.
res2 <- lapply(row.names(res[[1]]),function(x)
do.call(rbind,lapply(res,function(y) y[match(x, row.names(y)),])))
length(res2)
#[1] 48
dim(res2[[1]])
#[1] 2325 8
A.K.
On Monday, November 11, 2013 10:20 PM, Yu-yu Ren wrote:
Thank you so much for that scr
HI,
It's not very clear.
set.seed(25)
dat1 <-
as.data.frame(matrix(sample(c("A","T","G","C"),46482*56,replace=TRUE),ncol=56,nrow=46482),stringsAsFactors=FALSE)
lst1 <- split(dat1,as.character(gl(nrow(dat1),20,nrow(dat1
res <- lapply(lst1,function(x) sapply(x[,1:8],function(y) sapply(x[,9:56]
Hello
I'm working with mixed effects models using lmer() and have some problems to
get all variance components of the model's random effects. I can get the
variance of the random effect out of the summary and use it for further
calculations, but not the variance component of the residual term.
I am using Ubuntu 12.04 and unable to install xts. Here are the info:
usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make: *** [xts.so] Error 1
ERROR: compilation failed for package ‘xts’
* removing ‘/home/jasom/R/x86_64-pc-linux-gnu-library/3.0/xts’
Warning in insta
Hello R-Help Mailing List:
Are you interested in running "collaborative" R analytics in the cloud?
Join the The Knoxville R User Group and The Orange County R User Group for
a free webinar on the "Elastic-R" software platform.
Webinar Format:
- Introduction to Elastic-R
- Live demonstration of t
Hi R Experts,
I need some advice on how to manage the number of models/objects I have in one
workspace.
Below is typically how I get started each time I begin or resume an analysis.
But now I am storing multiple models which are built off of dataframes with
dims of 30,000 x 60.
I am anticipati
On Mon, Nov 11, 2013 at 8:04 PM, Lopez, Dan wrote:
> Below is how I am currently doing this. Is there a more efficient way to do
> this?
> The scenario is that I have two dataframes of different sizes. I need to
> update one binary factor variable in one of those dataframes by matching on
> two
Below is how I am currently doing this. Is there a more efficient way to do
this?
The scenario is that I have two dataframes of different sizes. I need to update
one binary factor variable in one of those dataframes by matching on two
variables. If there is no match keep as is otherwise update.
Hi Gabor,
This is a great solution! I will use it.
Thank you!
Dan
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: Monday, November 11, 2013 3:02 PM
To: Lopez, Dan
Cc: R help (r-help@r-project.org)
Subject: Re: [R] How do I derive a logical variable
Thanks.
Dan
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Monday, November 11, 2013 2:26 PM
To: R help (r-help@r-project.org)
Cc: Lopez, Dan
Subject: Re: [R] How do I derive a logical variable in a dataframe based on
another row in the same dataframe?
Hi,
You may
Great advice!
Thank you.
Dan
-Original Message-
From: William Dunlap [mailto:wdun...@tibco.com]
Sent: Monday, November 11, 2013 1:18 PM
To: Lopez, Dan; R help (r-help@r-project.org)
Subject: RE: [R] How do I derive a logical variable in a dataframe based on
another row in the same data
As a starting point for answering this question, you might sear Google for
"The RAppArmor Package: Enforcing Security Policies in R Using Dynamic
Sandboxing on Linux"
kw
On Mon, Nov 11, 2013 at 4:01 PM, wrote:
>
>Hello. At the company I work for, I recently requested having R loaded
> on
See below
--
Don MacQueen
Lawrence Livermore National Laboratory
On 11/11/13 2:01 PM, "seanstcl...@verizon.net"
wrote:
>
> Hello. At the company I work for, I recently requested having R
>loaded onto
> my desktop and some of my colleagues.
>
> My company's IT/Security groups are havin
On 11/12/2013 09:52 AM, Mª Teresa Martinez Soriano wrote:
normal<-sort(rnorm(1000))cauchy<-sort(rcauchy(1000)) t3<-sort(rt(1000,3))
t10<-sort(rt(1000, 10))
col<-c("green","blue","orange","purple") v<-list(normal,cauchy,t3,t10)
names(v)<-c("Normal", "Cauchy", "T-stud 3 df
On Mon, Nov 11, 2013 at 3:50 PM, Lopez, Dan wrote:
> Hi R Experts,
>
> How do I mark rows in dataframe based on a condition that's based off another
> row in the same dataframe?
>
> I want to mark any combination of FY,ID, TT=='HC' rows that have a
> FY,ID,TT=='TER' row with a 1. In my example
Hi , thanks in advance I have the follow code:
normal<-sort(rnorm(1000))cauchy<-sort(rcauchy(1000))
t3<-sort(rt(1000,3))t10<-sort(rt(1000, 10))
col<-c("green","blue","orange","purple")
v<-list(normal,cauchy,t3,t10) names(v)<-c("Normal", "Cauchy", "T-stud 3
Hi,
You may try:
fun1 <- function(dat){
dat$EXCL3 <- 0
dat$EXCL3[dat$TT=="HC"] <- 1*as.character(interaction(dat[,1:2]))[dat$TT=="HC"]
%in% as.character(interaction(dat[,1:2]))[dat$TT=="TER"]
dat
}
fun1(HTDF)
set.seed(14)
indx <- sample(1:nrow(HTDF),12)
HTDF1 <- HTDF[indx,]
fun1(HTDF1)
A.K.
Hello. At the company I work for, I recently requested having R loaded onto
my desktop and some of my colleagues.
My company's IT/Security groups are having trouble assessing whether R
software meets their standards.
Can anyone point me to a source where i can read about how R us
If you have an algorithm that only works on sorted data, it is easy to
write a function that sorts [a copy of] the data, applies the algorithm,
then puts the result back in the order of the original data. E.g.,
f <- function (data) {
ord <- with(data, order(TT, ID, FY)) # data[ord,] will be
Thanks, AK.
The three codes worked as expected.
Again, thanks so much for understanding my problem and proving the right
solutions.
Atem.
On Saturday, November 9, 2013 6:27 PM, arun wrote:
HI,
The code could be shortened by using ?merge or ?join().
library(plyr)
##Using the output from `lst
Hi R Experts,
How do I mark rows in dataframe based on a condition that's based off another
row in the same dataframe?
I want to mark any combination of FY,ID, TT=='HC' rows that have a
FY,ID,TT=='TER' row with a 1. In my example below this is rows 4, 7 and 11.
My data looks something like thi
Here's a suggestion.
The sample() function takes random samples of sets. See
?sample
The set you want to take a random sample from is the rows of your data.
Represent the rows by their row numbers.
To get a vector of row numbers, you can use the seq() function. See
?seq
Let's suppose your dat
Thank you all for taking your time and looking at this problem. Yes, date
handling is a problem with many languages. I have resolved the rbind not
being able to handle different data formats in a column for this specific
problem by making the data format a character and later convert back to
numeri
See the R randomForest package.
This already does ensemble classification and regression.
-- Bert
On Mon, Nov 11, 2013 at 10:04 AM, Iut Tri Utami wrote:
> Dear Mr/Mrs
>
> I am Iut, student of graduate student in Bogor Agriculture Institur
> I read a book on ensemble methods in data mining by Se
Dear Mr/Mrs
I am Iut, student of graduate student in Bogor Agriculture Institur
I read a book on ensemble methods in data mining by Seni and Elder and find
R code about bagging.
I am confused how to call these functions and and how to agregate it with
the majority votes?
I think there is missing c
Hi Viarti, can you clarify your question slightly?
(1) When you say "the predict value still on pattern scale" what do you
mean? It sounds like you are saying that the prediction values are on the
Ytraining values specifically or do you mean that you expect the scale to
differ.
(2) When you say ho
Thanks to all of you. All solutions work fine. I'm running S Ellisons
version with Williams comment. Perfect for what I'm doing.
And sorry for using a name same as a base R function (twice) ;-)
Cheers,
Carlos
2013/11/1 PIKAL Petr
> Hi
>
> Yes you are right. This gives number of zeroes not max
Steve, thanks for your reply. Here is what I get.
pkg is a 4-level categorical vector.
> is.factor(pkg)
[1] TRUE>
> summary(pkg)
BGA PGA QCC QFP
225 36 19 178
>
> dat <- earth(lifetime ~ pkg+pins+volts+temp+doi+logspd, degree=3) ## The
other vars are continuous.
> s <- 243
> pr <- c(pkg[s],pi
Dear Mr/Mrs.
I am Viarti Eminita, student from magister fifth level of Statistics in
Bogor Agriculture University. Mr/ Mrs, now I'm analyzing ANN on time series
data, I am learning kohonen package for series data, but when I want to
predict, the predict value still on pattern scale. I wanna ask ho
I am using R 3.0.2 on a 64 bit machine
I have a data set from 1989-2002. The data has four variables
serialno, date, admission ward, temperature and bcg scar.
serialno admin_ward date_admn bcg_scar temp_axilla yr
70162Ward2 11-Oct-89 y 38.9 1989
70163 Ward1
With a data frame (call it *d*) composed of 2000 individuals and
*n*observations for each individual (thus
*2000n* observations in total), I would like to generate *k* bootstrap
samples with replacement from *d*. Amongst other variables, *d* has a
numeric variable *id* taking on identical value for
Your code is messed up because you posted in HTML. Also, it is not reproducible
(e.g. no sample data, incomplete analysis code). (See
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
for more on reproducibility.) Also, this looks very much like homework and t
Or you can use the integer divide and remainder operators:
> n <- 30
> x <- seq(0, len=n)
> + (x %% 2) + (x %/% 4)*2 + 1 # period 2 oscillator + jump by 2 every fourth
[1] 1 2 1 2 3 4 3 4 5 6 5 6 7 8 7
[16] 8 9 10 9 10 11 12 11 12 13 14 13 14 15 16
Bill Dunlap
Spo
> n<-7
> rep(seq(1,n,2), each=4)+c(0,1,0,1)
[1] 1 2 1 2 3 4 3 4 5 6 5 6 7 8 7 8
rep(), seq(), rbind(), apply() ... whatever: internally there will always
be iteration via some loop :-)
Ia.
On Mon, Nov 11, 2013 at 11:16 AM, Carl Witthoft wrote:
> Here's a rather extreme solution:
>
> foo<-re
Here is another solution that is a bit more flexible
tmp <- seq(8)
# split into your desired groups
max.groups <- 2
tmp.g <- split(tmp, ceiling(seq_along(tmp)/max.groups))
# do repeats, unlist, numeric index
as.numeric(unlist(rep(tmp.g, each = 2)))
Hope this works for you,
Charles
On Mon, Nov
Here's a rather extreme solution:
foo<-rep(1:6,each=2)
Rgames> foo
[1] 1 1 2 2 3 3 4 4 5 5 6 6
Rgames> foo[rep(c(1,3,2,4),3)+rep(c(0,4,8),each=4)]
[1] 1 2 1 2 3 4 3 4 5 6 5 6
In the general case, then, it would be something like
foo<- rep(1:N, each = 2) # foo is of length(2*N)
foo[rep(c(1,
OK. Then using aggregate():
> data$yes <- ifelse(data$response=="yes", 1, 0)
> data$no <- ifelse(data$response=="no", 1, 0)
> dataresp <- aggregate(cbind(no, yes)~region+district, data,
sum)
> dataresp[,3:4] <- dataresp[,3:4]/rowSums(dataresp[,3:4])
> # or dataresp[,3:4] <- prop.table(as.matrix(da
> f1
function(x) {
one <- matrix(1:x, nrow=2)
as.vector(rbind(one, one))
}
> f1(8)
[1] 1 2 1 2 3 4 3 4 5 6 5 6 7 8 7 8
Pat
On 11/11/2013 12:11, Federico Calboli wrote:
Hi All,
I am trying to create an index that returns something like
1,2,1,2,3,4,3,4,5,6,5,6,7,8,7,8
and so on and
1. You need to define more explicitly exactly what you mean by "randomly."
2. You need to make an honest effort to learn basic R, e.g. by
spending time with the "Introduction to R" document that ships with R
or an online tutorial (there are many good ones).
Cheers,
Bert
On Sun, Nov 10, 2013 at 1
Is there an r package out there that solves for pure strategy* Nash
equilibrium of a two-person game*? A search for Nash equilibrium in r
provides a link to the *GNE* package which solves for the Generalized Nash
equilibrium. But what I would like to solve is a pure strategy Nash
equilibrium.
Have you read these instructions?
http://cran.r-project.org/bin/linux/ubuntu/README.html
They say to run
sudo apt-get install r-base-dev
which should install 'build-essential' (which is an Ubuntu package,
not an R package).
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstradi
Hi,
first off, thanks for the suggestion. I managed to solve it by doing:
IND = rep(c(T,T,F,F), 5)
X = rep(NA, 20)
X[IND] = 1:10
X[!IND] = 1:10
which avoids any function -- I think mapply, apply etc call a for loop
internally, which I'd rather avoid.
BW
F
On 11 Nov 2013, at 12:35, andrija
Thanks !!
Best regards
...
Tanvir Ahamed
Göteborg, Sweden
On Monday, 11 November 2013, 13:49, Uwe Ligges
wrote:
On 11.11.2013 13:31, Mohammad Tanvir Ahamed wrote:
> Hi there !!
> I have a function like
> fun <- function(x,y)
> {
> loe<-loess(y ~ x,span=0.9,fami
On 11.11.2013 13:31, Mohammad Tanvir Ahamed wrote:
Hi there !!
I have a function like
fun <- function(x,y)
{
loe<-loess(y ~ x,span=0.9,family="gaussian")
pre<-predict(loe,data.frame(x=x))
return(pre)
}
Now i have defined :
x<-1:500
y<-matrix(rnorm(1000,3),ncol=2)
I can manipulate fun(x,y[,1]
> given the model
>
> y = x1 / 1+ b1x2^b2
>...
> i am able to find the parameter of the above model usingnls method, can u
> please give hint on how i can solve the same model as above using MM
> robust estimate to obtain the parameter. i mean u can illustrate using the
> above information to enab
Hi. Here are two approaches:
c(mapply(function(x,y) rep(c(x,y), 2), (1:10)[c(T,F)], (1:10)[c(F,T)]))
c(tapply(1:10, rep(1:(10/2), each=2), rep, 2), recursive=T)
Andrija
On Mon, Nov 11, 2013 at 1:11 PM, Federico Calboli
wrote:
> Hi All,
>
> I am trying to create an index that returns someth
Hi there !!
I have a function like
fun <- function(x,y)
{
loe<-loess(y ~ x,span=0.9,family="gaussian")
pre<-predict(loe,data.frame(x=x))
return(pre)
}
Now i have defined :
x<-1:500
y<-matrix(rnorm(1000,3),ncol=2)
I can manipulate fun(x,y[,1]) .
But i want to apply the function on each column
I'm trying grnn package, and reproduced the example (
http://cran.r-project.org/web/packages/grnn/grnn.pdf), I tried the example
with another x input column in the dataset (see below):
but I'm getting the following error "Error in Ya * patterns1 :
non-conformable arrays", though I took care to pa
hi
I have this code for a cross validation:
>res <- as.data.frame(CV_Pb_var)$residual> sqrt(mean(res^2))>
>mean(res)> mean(res^2/as.data.frame(CV_Pb_var)$var1.var)
I can not seem to export everything in one table
also can I to be exported it graphically?
thanks
enzo
--
Hi All,
I am trying to create an index that returns something like
1,2,1,2,3,4,3,4,5,6,5,6,7,8,7,8
and so on and so forth until a predetermined value (which is obviously even).
I am trying very hard to avoid for loops or for loops front ends.
I'd be obliged if anybody could offer a suggestion
On 11/11/2013 09:07 PM, mohan.radhakrish...@polarisft.com wrote:
Hi,
I am trying to show time( HH:MM:SS) in my x-axis. I have these
two questions.
1. The error in the code is
Error in axis(1, at = data$Time, labels = data$Time, las = 2, cex.axis =
1.2) :
(list) object cannot be
Hello,
I have searched on the R-Project site, R-Help archives, and the Internet
at large, and I cannot find a solution to my problem.
I am running R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" on Ubuntu
13.04.
When I try to install several packages, including quantmod, with
dependencies=T se
given the model
y = x1 / 1+ b1x2^b2
given data
y<-c(2,3,4,5,6)
x1<- c(0.23,0.32,0.43,0.54,0.65)
x2<-c(0.11,021,0.31,0.41,0.33)
initial parameter
b1=0.023
b2=0.045
i am able to find the parameter of the above model usingnls method,
can u please give hint on how i can solve the same model as above
Hi,
I am trying to show time( HH:MM:SS) in my x-axis. I have these
two questions.
1. The error in the code is
Error in axis(1, at = data$Time, labels = data$Time, las = 2, cex.axis =
1.2) :
(list) object cannot be coerced to type 'double'
Should I use 'POSIXCt' or 'strptime' ?
Hi
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Alemu Tadesse
> Sent: Friday, November 08, 2013 8:41 PM
> To: r-help@r-project.org
> Subject: [R] Date handling in R is hard to understand
>
> Dear All,
>
> I usually work w
Hi Karren,
not sure if this is a problem of the software you are using to view the
image after writing? I would first check the color scaling of the image in
this software. I would interpret the black background as "no data".
regards,
Ludwig
Karren wrote
> Hi
>
> I am trying to export a raster
Dear Forum,
I have following data.frame as
fraud_data = data.frame(no_of_frauds = c(1, 2, 4, 6, 7, 9, 10), frequency =
c(3, 1, 7, 11, 13, 1, 4))
> fraud_data
no_of_frauds frequency
1 1 3
2 2 1
3 4 7
4 6 11
5
64 matches
Mail list logo