On Oct 3, 2013, at 3:07 PM, Mary Kindall wrote:
> In the reproducible example given below, why I am not getting any result
> with generalized boosted model (gbm). Other methods does show me the
> desired result.
> In the example data file (attached) example.txt, the predictors x3 and x4
> are co
Hi,
Try:
library(zoo)
z2<- read.zoo(text="Date WBK_Last WBK_1d_Close
2003-01-03 13.88506 14.08276
2003-01-06 14.11254 13.88506
2003-01-07 14.07033 14.11254
2003-01-14 14.24165 14.30967
2003-01-22 14.28913 14.30563
2003-01-29 13.95664 14.16483
2007-01-01 14.87033 15.112
Hi Cleber,
When you install Rtools, it asks you the home directory of R, and there it
puts a directory called src and Tcl. You need to copy those over to
whereever you are making R.
So for example, I have:
C:\usr\R\R-devel\Tcl
Where I tar -xf R devel into C:\usr\R\
and then copy the src and T
stop because
*had a stone in the middle of the way*
*in the middle of the way had a stone*
(by vinicius de moraes)
#
so, one more help? somebody? :-)
thanks...
cleber
building package 'tcltk'
making init.d from init.c
making tcltk.d from tcltk.c
making tcltk_win.d from t
Hello,
I have a list of four files. Each file is a list of gene models, and each
gene model has attributes in file columns. The sample_week-over-sample_week
fold change value foreach i in file is in column 5. The gene model ID is in
column 1. To make it more complicated, each gene i may not be fou
Hi Cleber
It cant find /tmp which does not exist on standard win32 mount system.
Are you sure you dont have to call the "make all..." from the cygwin
bash ("cygwin terminal") and not the "msdos" pseudo terminal ?
W.
Le 04/10/2013 17:03, Cleber N.Borges a écrit :
hello all,
I am trying to co
Hi,
May be this helps:
set.seed(24)
dat1<- as.data.frame(matrix(sample(1:50,100,replace=TRUE),10,10))
colnames(dat1)<- paste0("Col",1:ncol(dat1))
rnd.data1 <- function(x,n,ColSub,ColIndex=FALSE){
library(matrixStats)
if(ColIndex){
index <- seq_len(ncol(x))%in% ColSub
Mins1 <- colMins(x[in
Hi,
I have a short demo at https://gist.github.com/izahn/5785265 that
might get you started.
Best,
Ista
On Fri, Oct 4, 2013 at 12:51 PM, Mohamed Anany
wrote:
> Hello everybody,
> I just started using R and I'm presenting a poster for R day at Kennesaw
> State University and I really need some h
bingo! :-)
I got one pass to advanced!
my TMP environment variable is:
%SystemRoot%\TEMP
thanks
cleber
Em 04/10/2013 22:02, Joshua Wiley escreveu:
Hi Cleber,
You need to set TMPDIR to a valid directory, the default /tmp/ does
not work on Windows.
From the cmd shell:
set TMPDIR=C:/TMP
thanks.
I am logged in the MS-DOS.
I thought that cygwin is not necessary...
in cygwin terminal, when I type: "where sh"
CLEBER@pinkfloyd /cygdrive/c
$ where sh
C:\cygwin\bin\sh.exe
C:\Rtools\bin\sh.exe
so, I have two version of "sh"
and the cygwin will be priority...
I will make more test an
Hi Cleber,
You need to set TMPDIR to a valid directory, the default /tmp/ does not
work on Windows.
>From the cmd shell:
set TMPDIR=C:/TMP
for example
and then run make all recommended
Cheers,
Josh
On Fri, Oct 4, 2013 at 5:03 PM, Cleber N.Borges wrote:
> hello all,
> I am trying to compi
There two different "transport" or "portable" file types that SAS creates: 1.
using Proc CPORT
2. using the XPORT engine in a LIBNAME statement.
That may not mean much to a non-SAS user, but people often use 'xpt' as a file
extension for both approaches. If Proc CPORT was used to write the file
hello all,
I am trying to compile the R in Win7
and compiles one small part
but the script don't move from the 'base' directory to 'stats'
I installed the Rtools likee administrator
and call the terminal (MS-DOS) like administrator too.
if somebody can tell me any tips, I thank in advanced
cleb
Duncan
I looked at
support.sas.com/techsup/technote/ts140.pdf
and it is a bit difficult to decipher. I then replaced the string "^@" in the
file contents with "!". There is some concordance with he sample text shown in
support.sas.com/techsup/technote/ts140.pdf but I don't know exactl
OS X 10.8
R 3.0.1
foreign 0.8-55 (2013-09-02)
Colleagues,
I received a SAS XPT file that I cannot read using the foreign package.
The command:
read.xport(FILENAME)
results in the following message:
Error in lookup.xport(file) : file not in SAS transfer format
I am able to read th
On 10/05/13 05:15, John Kane wrote:
X[,names(X)[4]] works fine for me. I had never thought of doing this. Neat
idea.
Perhaps I am being obtuse, but how would X[,names(X)[4]] differ from X[,4]?
cheers,
Rolf Turner
__
R-help@r-project.org
Wonderful!
Thank you Arun!
Irene
Â
Irene Ruberto
Da: arun kirshna [via R]
Inviato: Giovedì 3 Ottobre 2013 22:51
Oggetto: Re: String substitution
Hi,
Try:
dat$y<- as.character(dat$y)
dat1<- dat
dat2<- dat
library(stringr)
 dat$y[NET]<- substr(wor
Writing loops are the bane of my existence. I have this function, which
works:
rnd.data<-function(x){ min.x<-min(x[,2]) max.x<-max(x[,2])
min.y<-min(x[,3]) max.y<-max(x[,3]) data.table(x = runif(34, min.x,
max.x))[, y := runif(34, min.y, max.y)] }
it's purpose is to simulate data within parameter
Hello everybody,
I just started using R and I'm presenting a poster for R day at Kennesaw
State University and I really need some help in terms of web scraping.
I'm trying to extract used cars data from www.cars.com to include the
mileage, year, model, make, price, CARFAX availability and Technolog
Hi,
May be this helps:
set.seed(45)
df1<-
data.frame(datetime=as.POSIXct("2011-05-25",tz="GMT")+0:200*30*60,value=sample(1:40,201,replace=TRUE),value2=
sample(45:90,201,replace=TRUE))
df2<- df1[ave(1:nrow(df1),as.Date(df1[,1]),FUN=length)==48,]
dim(df2)
#[1] 192 3
#or
library(plyr)
df3<-df
Dear John Nash
Thank you very much for your inputs on how to fit a non-linear growth curve
without running into "singular gradient". I wasn't aware of the package
"nlmrt" which seems to provide very helpful functions, indeed. I'll try to
figure out how nlxb() can be applied to my data (I a
On Oct 4, 2013, at 2:35 PM, peter dalgaard wrote:
>
> On Oct 4, 2013, at 21:16 , Mary Kindall wrote:
>
>> Y[Y < mean(Y)] = 0 #My edit
>> Y[Y >= mean(Y)] = 1 #My edit
>
> I have no clue about gbm, but I don't think the above does what I think you
> think it does.
>
> Y <- as.integer(Y >=
On Oct 4, 2013, at 21:16 , Mary Kindall wrote:
> Y[Y < mean(Y)] = 0 #My edit
> Y[Y >= mean(Y)] = 1 #My edit
I have no clue about gbm, but I don't think the above does what I think you
think it does.
Y <- as.integer(Y >= mean(Y))
might be closer to the mark.
--
Peter Dalgaard, Professor
On Oct 4, 2013, at 2:16 PM, Mary Kindall wrote:
> This reproducible example is from the help of 'gbm' in R.
>
> I ran the following code in R, and works fine as long as the response is
> numeric. The problem starts when I convert the response from numeric to
> binary (0/1). It gives me an erro
"My question is, Is binarizing the response will have so much effect that it
does not find anythin useful in the predictors?"
Yes. Dichotomizing throws away most of the information in the data.
Which is why you shouldn't do it.
This is a statistics, not an R question, so any follow-up should be
p
This reproducible example is from the help of 'gbm' in R.
I ran the following code in R, and works fine as long as the response is
numeric. The problem starts when I convert the response from numeric to
binary (0/1). It gives me an error.
My question is, is converting the response from numeric t
labels1<- paste0("[",with(allPerms,paste(A,B,C,sep="|")),"]")
vals2<-as.matrix(cumsum(as.data.frame(t(allPerms
dimnames(vals2)<- list(NULL,labels1)
all.equal(vals,vals2)
#[1] TRUE
A.K.
- Original Message -
From: Keith S Weintraub
To: "r-help@r-project.org"
Cc:
Sent: Friday, O
Folks,
I have a working version of the code below for my "real world" problem. I was
wondering if there was a better way to do this.
I have 3 sets of parameters and I want to iterate over all combinations and
label the results.
Would some of the plyr tools make this easier?
# Input Scenarios
Do you have the correct fonts installed on Windows?
John Kane
Kingston ON Canada
> -Original Message-
> From: cels...@163.com
> Sent: Wed, 2 Oct 2013 23:51:58 +0800 (CST)
> To: r-help@r-project.org
> Subject: [R] Drawing garbled
>
> Hi:
>I am Chinese, I am developing a java appl
Hi,
Try:
annoTranscripts<- read.csv("matched.txt", sep = '\t', stringsAsFactors =
FALSE,quote="",header=FALSE)
str(annoTranscripts)
'data.frame': 367274 obs. of 12 variables:
$ V1 : chr "comp103529_c0_seq1" "comp129123_c0_seq1" "comp129123_c0_seq1"
"comp129124_c0_seq1" ...
$ V2 : chr "XM
Is there ever a case that X[,names(X)[4]] would give a different result
than X[,4]? Or is this just a case of the "the longest distance between
any 2 points is a shortcut"?
Well I guess if X has non-unique names then you might see a difference, but
having a data frame with non-unique names and us
> > annoTranscripts <- read.table("matched.txt", sep = '\t', stringsAsFactors =
> > FALSE)
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
> line 5933 did not have 12 elements
>
> However, all lines do have 12 columns.
>
> > lines <- readLines("matched.txt")
> .
X[,names(X)[4]] works fine for me. I had never thought of doing this. Neat
idea.
John Kane
Kingston ON Canada
> -Original Message-
> From: jimmycl...@gmail.com
> Sent: Fri, 4 Oct 2013 12:06:50 -0400
> To: r-help@r-project.org
> Subject: [R] quote a column of a dataframe by its name
>
Hello,
I had no problems, and it shouldn't. What exactly do you mean by "not
working"?
Hope this helps,
Rui Barradas
Em 04-10-2013 17:06, Jie escreveu:
Dear All,
I have a question, suppose X is a dataframe, with column names as
"x1", "x2", "x3", . And I would like to use the i-th colum
Sorry, this sample code seems to be OK.
I will look into my original problem and update it soon.
Best wishes,
On Fri, Oct 4, 2013 at 12:06 PM, Jie wrote:
> Dear All,
>
> I have a question, suppose X is a dataframe, with column names as
> "x1", "x2", "x3", . And I would like to use the i-th
Dear All,
I have a question, suppose X is a dataframe, with column names as
"x1", "x2", "x3", . And I would like to use the i-th column by X[,'xi'].
But it seems the single quote and double quote are different.
So if I run X[, names(X)[i]], it has some error.
Please use the below example code
> I have some data I want to plot together with a best-fit line. (see MWE
> below)
...
> Can someone help me with that? What am I doing wrong?
Not logging the lm. Also, you've calculated lm() the wrong way round; you've
regressed x on y.
Try
plot(log(d), xlab="log(x)", ylab="log(y)")
abline(l
Perhaps looking at your data will suggest an appropriate number, viz.
plot(data,type="b",xlim=c(0,20),ylim=c(0,50))
par(new=T)
ind<-1:19 # in this case where the data length is 19
data.ind<-data.frame(ind,data)
data.lo<-loess(data~ind,data.ind)
data.pre<-predict(data.lo,data.frame(ind = seq(1,19
Well you logged the x and y values before plotting but did not log the lm(). I
think this means you have plotted abline() off the scale.
I'm not sure how to fix it though.
John Kane
Kingston ON Canada
> -Original Message-
> From: hans_han...@gmx.de
> Sent: Fri, 4 Oct 2013 07:16:49 -0
Hello there,
I have some data I want to plot together with a best-fit line. (see MWE
below)
The points from the first plot does appear as expected, but the abline does
not appear, no matter what I change. I removed the log parameter before, but
the abline is a very steep line around the origin. I
Hi,
set.seed(49)
X = matrix(rnorm(100), 10, 10)
X1<- X
result<-0
for(m in 1:nrow(X)){ for(n in 1:ncol(X)){ if(X[m,n] != 0){ result
= result + (X[m,n] / (1 + abs(m - n))) } }}
indx<-which(X!=0,arr.ind=TRUE)
indx1<-1+abs(indx[,1]-indx[,2])
X1[indx]<- X1[indx]/indx1
#or
re
Hello,
I have a seemingly simple problem that a tab-delimited file can't be read in.
> annoTranscripts <- read.table("matched.txt", sep = '\t', stringsAsFactors =
> FALSE)
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 5933 did not have 12 elements
However
Hi,
I have a data frame, data, containing two columns: one- the TimeStamp
(formatted using data$TimeStamp <-
as.POSTIXct(as.character(data$TimeStamp), format = "%d/%m/%Y %H:%M") )
and two- the data value.
The data frame has been read from a .csv file and should contain 48
values for ea
Hi Peter,
The ssconvert tool (part of gnumeric) is very good at converting spreadsheets
to csv-files.
There is a wrapper in the "gnumeric" package on cran.
Cheers,
Thomas
> Date: Fri, 4 Oct 2013 09:08:50 +0100
> From: Barry Rowlingson
> To: Peter Maclean
> Cc: "r-help@r-project.org"
> Subjec
Thanks Ista,
Can you please suggest any useful link(s) which explain RcmdrPlugin.temis
and tm package other than Cran-R one?
Thanks
Umesh
On Tue, Oct 1, 2013 at 11:40 PM, Ista Zahn wrote:
> Do you know about task views? Try
> http://cran.r-project.org/web/views/NaturalLanguageProcessing.html
Hi,
set.seed(49)
X = matrix(rnorm(100), 10, 10)
X1<- X
result<-0
for(m in 1:nrow(X)){ for(n in 1:ncol(X)){ if(X[m,n] != 0){ result
= result + (X[m,n] / (1 + abs(m - n))) } }}
indx<-which(X!=0,arr.ind=TRUE)
indx1<-1+abs(indx[,1]-indx[,2])
X1[indx]<- X1[indx]/indx1
#or
Bill,
Thanks for replying.
The data is weekly time series data. Assume there is 52 weeks in the year. Of
the 52 weeks, I typically only have data for weeks 8 through 40.
4-Apr-10, 8, 27.2
11-Apr-10, 9, 32.3
18-Apr-10, 10, 31.7
DataXYZ, 40, 13.4
data <-
c(0,24.57,29.93,24.19,12.25,48.07,
Thank you for your answer. This is what I needed.
> From: s.elli...@lgcgroup.com
> To: r-help@r-project.org
> Date: Fri, 4 Oct 2013 15:13:49 +0100
> Subject: Re: [R] Trying to avoid nested loop
>
>
> > I'm trying to avoid using nested loops in the following code but I'm
> > not sure how to pro
The function I have been trying to use is: spatial_sync_raster
The maintainer has let me know that this is available in his spatial.tools
package, which you can get from CRAN:
install.packages("spatial.tools")
problem solved.
Thanks
jenny
-Original Message-
From: David Winsemius [mai
> I'm trying to avoid using nested loops in the following code but I'm
> not sure how to proceed. Any help would be greatly appreciated.
> With regards,Phil
> X = matrix(rnorm(100), 10, 10)
> result = 0
> for(m in 1:nrow(X)){
> for(n in 1:ncol(X)){
> if(X[m,n] != 0){
I got sorted,
Thanks all
On Fri, Oct 4, 2013 at 2:03 PM, S Ellison wrote:
> > I have a set of data and I need to find out how many points are below a
> > certain value but R will not calculate this properly for me.
> R will. But you aren't.
>
> > Negative numbers seem to be causing the issue.
Dear R users.
I'm trying to avoid using nested loops in the following code but I'm not sure
how to proceed. Any help would be greatly appreciated.
With regards,Phil
X = matrix(rnorm(100), 10, 10)
## Version with nested loopsresult = 0
for(m in 1:nrow(X)){ for(n in 1:ncol(X)){if(X[m,n] !=
Hello!
I am learning Shiny. In my ui am allowing the user to read in 3 files. Here
is a piece of my ui.r code:
sidebarPanel(
fileInput('file1','Select File 1:'),
fileInput('file2','Select File 2:'),
fileInput('fileopt','Select Optional File:'),
actionButton("goButton","RUN")
)
> -Original Message-
> Got it! I agree it should had been more obvious to me... :)
I wouldn't feel too bad about that. I've spent most of the last 25 years
discovering the hard way that statistics is very much a field where things are
'obvious' only _after_ you know the answer...
S
Dear Arun,Thanks indeed
> Date: Thu, 3 Oct 2013 10:22:38 -0700
> From: smartpink...@yahoo.com
> To: r-help@r-project.org
> Subject: Re: [R] vif
>
> Hi Eliza,
>
> Then, "res" needs a slight modification
>
>
> library(car)
> res<- lapply(colnames(h),function(x) {x1<- h[,x];dat1<-
> do.call(rbi
I think you have chosen a model that is ill-suited to the data.
My initial thoughts were simply that the issue was the usual nls()
"singular gradient" (actually jacobian if you want to be understood in
the optimization community) woes, but in this case the jacobian really
is bad.
My quick an
> I have a set of data and I need to find out how many points are below a
> certain value but R will not calculate this properly for me.
R will. But you aren't.
> Negative numbers seem to be causing the issue.
You haven't got any negative numbers in your data set. In fact, you haven't got
any nu
Hi
I have never used the automap package and your syntax for xyplot does not
seem to be in the correct format for lattice.
A quick search showed that vgm.panel.xyplot from gstat package may give you
some ideas.
It appears that there are some particular adaptations for lattice for
spatial plot
On Oct 3, 2013, at 16:30 , Hermann Norpois wrote:
> Thanks for answering.
>
> I already started hunting. But my first doubt was if I used prcomp correctly
> (and this is in the moment my most important point). So far as I understood
> your answer is yes. Is that correct?
Yes. There are a cou
Assuming you want to read in data from an AOO or LO spreadsheet, have a look at
the gnumeric package. I have only used it once or twice but it seems to work
well and is quite flexible.
John Kane
Kingston ON Canada
> -Original Message-
> From: pmaclean2...@yahoo.com
> Sent: Thu, 3 Oct
On 3 Oct 2013, at 22:39, "Monaghan, David" wrote:
> I was wondering, has anyone has encountered an R package that performs random
> projection/random mapping? RP is a procedure that is akin to Principal
> Components Analysis in that it accomplishes dimensionality reduction, but is
> far more
Hi, thanks.
the printing one by one seems the only working solution. I also tried the
grid.arrange function but couldnt output what I am after.
Now the plots are placed in one page but I got the message "error using
packet 1: promise already under evalution: recursive default arguments
reference
On Fri, Oct 4, 2013 at 5:57 AM, Peter Maclean wrote:
> Anyone aware of a package or technique to import odf data file into R, I will
> appreciate his/her help.
A quick scan of R-help points me here:
http://www.omegahat.org/ROpenOffice/
Reports of that working (or not) would be appreciated - I'
63 matches
Mail list logo