and tested the smbinning package. However, it only gives the bins
for a single variable at a time.
How can I get a full scorecard model?
Thanks
Nikhil
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE
hello Team R,
i have been using R for statistical analysis of phylogeny and i have
installed the required packages phangorn and phytools but whenever i give
the command "pml.fit" the program stops and it appears thatb r for windows
GUI has stopped etc..
previously i thought it was a fault in my com
hello Team R,
i have been using R for statistical analysis of phylogeny and i have
installed the required packages phangorn and phytools but whenever i give
the command "pml.fit" the program stops and it appears thatb r for windows
GUI has stopped etc..
previously i thought it was a fault in my com
hello Team R,
i have been using R for statistical analysis of phylogeny and i have
installed the required packages phangorn and phytools but whenever i give
the command "pml.fit" the program stops and it appears thatb r for windows
GUI has stopped etc..
previously i thought it was a fault in my com
Given three TermDocumentMatrix, text1, text2 and text3, I'd like to
calculate word frequency for each of them into a data frame and rbind all
the data frames. Three are sample - I have hundreds in reality so I need to
functionalize this.
It's easy to calculate word freq for one TDM:
apply(x,
Dear R users,
I am trying to print heatmaps in a loop (with a pause). Idea is to
visualize changing correlations over time and for testing I wrote this
simple (reproducible) code below.
My problem is that levelplot() does not produce any output when I run the
code (though heatmap does). Ideally I
I need some help with using recursive least squares lm.fit.recursive
{quantreg}.
I found some references online but cannot find a reproducible example as to
how to use recursive least squares.
I'd really appreciate if anyone can point me to a reproducible example.
[[alternative HTML versi
the value 'NA' present in a column in a CSV file without R
changing it to missing?
Thanks
Nikhil
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Yes, something similar would be helpful but not among SAS proc but between
SAS and R.
Thanks
Nikhil
On Mon, Aug 29, 2011 at 11:08 PM, Jeremy Miles wrote:
>
> Do you mean things like treatment of categorical variables in regression
> procedures (which have different defaults in
d and third functions. What could be the reason? Could it be because of
the use of regular expressions?
Thanks
Nikhil
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEAS
'textplot' and then saving the graphic output. However, the
table does not look nice in the graph output.
Is there any way the output from the console can be saved in a file and then
the output from the graph window be appended to the same file?
Thanks
Nikhil
[[alternative HTML versi
base package is sourced (or in other words
upon starting a new R session). Or am I totally off?
Regards
Nikhil
On Wed, Feb 9, 2011 at 8:28 PM, Gabor Grothendieck
wrote:
> On Wed, Feb 9, 2011 at 6:12 PM, Nikhil Joshi
> wrote:
> > I am trying to read an xlsx spreadsheet (1506 rows, 501
I am trying to read an xlsx spreadsheet (1506 rows, 501columns) all
populated but getting the following error:
Please advise as to how to get around this issue.
> res <- read.xlsx("c:\\BSE_v2.xlsx",1)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.OutOfMemor
Hi, all
I wanted to fetch data from Bloomberg for govt bonds, and analyse it
further.
I am having trouble in getting data as when I use field=PX_LAST, it is
giving the prices but when I use field=CPN, or ISSUE_DT, it is not giving
the results and just bouncing back for that.
This is t
Hello All;
I am writing an R program in the form of a function to find out the summary
statistics for response variable(s) in a data frame.
I need to accept variable names from the data as arguments and use them
inside the function for various tasks. The dataset name is also one of the
arguments
Look at clustering task view
http://cran.r-project.org/web/views/Cluster.html
A simple way to do it is
library(cluster)
dat$cluster <- pam(dat, 3, stand=T)$clustering
plot(dat$lon, dat$lat, col=dat$cluster)
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carol
apply(m, 1, function(x){print(as.polynomial(x))}) # Not sure why you
are using 2 i.e. applying the formula column wise instead of 1, row
wise.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Oct 4, 2010, at 9:10 PM, Raznahan, Arm
example(factor)
iris1$Species <- factor(iris1$Species, drop=T)
will get you what you need.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Sep 21, 2010, at 7:41 AM, pdb wrote:
I'm confused, hope someone can point out
Convert to strings and use grep functions.
using c for variable is a bad idea.
a <- paste(a, collapse="")
b <- paste(b, collapse="")
d <- paste(d, collapse="")
grepl(b,a)
grepl(d,a)
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of No
DF3 <- merge(DF1, DF2, by=c("Sample_id", "RepairHours), all.y=T)
DF3$subtract <- DF3$Day_0_Read1-DF3$ ZeroMean
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Sep 14, 2010, at 8:38 AM, rasanpreet wrote:
hi
Comments below
On Sep 7, 2010, at 9:37 PM, stephen sefick wrote:
Here is a striped down example that is not working because of the 1.00
to 1. Any help would be greatly appreciated.
measure_bkf <- (structure(list(measurment_num = c(0, 0.2, 0.4, 0.6,
0.8, 1, 1.2,
1.4, 1.6, 1.8, 2, 2.2, 2.2, 2.4
or use
#not checked
rm(setdiff(ls(),c("a", "b"))
On Aug 24, 2010, at 4:55 AM, Barry Rowlingson wrote:
2010/8/24 500600 :
a <- 1
b <- 2
c <- 3
ls()[-a] # set minus to all the objects you want to retain
rm(list = ls()[-a] # will remove all the objects - except a
ls() # presto
Only beca
http://www.econ.uiuc.edu/~roger/research/R1/R1.html
On Mon, Aug 23, 2010 at 2:15 PM, Steven Ranney wrote:
> All -
>
> Does anyone know if there is a method to calculate a goodness-of-fit
> statistic for quantile regressions with package quantreg?
> Specifically, I'm wondering if anyone has imple
In additiion to Ivan's comment, in this case, you are just plotting
Yes or No. I think thats not what you want.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Aug 19, 2010, at 3:42 AM, Ivan Calandra wrote:
Hi,
I ha
what is nt? is that a typo for ns?
I don't see why you need to calculate lia within the loop.
Also
library(fBasics)
ccl <-rowprod(lia)
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Aug 17, 2010, at 6:22 PM, Hey S
?all
nikhil.l...@gmail.com
On Aug 13, 2010, at 2:49 PM, Downey, Patrick wrote:
c(1,2,3) == c(1,2,3)
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
?as.numeric
On Aug 13, 2010, at 7:50 AM, Amit Patel wrote:
For the query below I have also included the follwing information.
Thanks for
your replies
str(FeaturePresenceMatrix)
chr [1:65530, 1:40] "0" "0" "0" "0" "1" "0" "0" "0" "0" ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:65530]
with.
apply(b,2, paste, collapse="_")
On Thu, Aug 12, 2010 at 10:15 AM, Ferreira, Thiago Alves <
thiago.alves.ferre...@citi.com> wrote:
> Hello Nikhil, hope you are well today.
> I am sorry to be a pain but I have one follow up question, I am trying to
> express my results in a
default device.
One way to overcome it is to plot them to a pdf and name them
appropriately for each iteration.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Aug 11, 2010, at 6:34 AM, Ferreira, Thiago Alves wrote:
Hi everyo
How about
a <- which(row(matchM)!=matchM)
b <- matchM[a]
diag(collusionM[a,b]) <-1
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Aug 8, 2010, at 8:43 PM, david h shanabrook wrote:
It is a simple problem in that I simpl
Another way is
t1<- c("3:00","1:59","3:00","2:00")
t2 <- strptime(t1, format="%H:%M")
t2[-4]>t2[-1]
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Aug 4, 2010, at 8:47
you will have a better luck with R-sig-geo.
Unfortunately I could not find an easy way for polygon overlays.
plot(Tazshape)
lines(ugbshape) if ugbshape was a polyline instead of a polygon.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l
try using Matrix package instead
mat <- Matrix(rnorm(25),5,5)
forceSymmetric(mat)
The reason your method does not work is because matrix is effectively
a vector and the indices increase along rows within a column.
Nikhil
On Aug 3, 2010, at 7:36 AM, Ron Michael wrote:
HI, I am rea
My usual strategy of dealing with multicollinearity is to drop the
offending variable or transform one them. I would also check vif
functions in car and Design.
I think you are looking for lm.ridge in MASS package.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North
Are x1 and x2 are factors (dummy variables)? cor does not make sense
in this case.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Aug 3, 2010, at 9:10 AM, Michael Haenlein wrote:
Dear all,
I have one dependent variable y and
> a <- c( 20071031,20071130, 20071231)
b<- sort(as.Date(as.character(a), format="%Y%M%d"))
On Aug 2, 2010, at 8:03 PM, Leigh E. Lommen wrote:
I am unsure how to sort a column by date if it is currently in the
form:
MMDD
For example the months:
20071031
20071130
20071231
Etc.
Re
use 24 length vectors as parameters instead of numbers e.g. mu=rep(0.5,24)
On Mon, Aug 2, 2010 at 11:00 AM, Shentu, Yue wrote:
> Hi all,
> I'm trying to define and log-likelihood function to work with MLE.
> There will be parameters like mu_i, sigma_i, tau_i, ro_i, for i between
> 1 to 24. I
Try r-sig-geo
Look at spdep, geoR, splancs and sp packages for spatial autocorrelation.
Also look at
http://cran.r-project.org/web/views/Spatial.html
On Mon, Aug 2, 2010 at 3:40 AM, nuncio m wrote:
> Hi list,
> I am trying to fit arima model for a grid of 360x161x338 points,
> where
well
"*"(3,2) works but "*"(3,2,3) does not. You should now be able to
figure out the logic. It is related to the number of arguments that
make sense.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Aug
?replicate
?apply
?sapply
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Aug 1, 2010, at 2:42 AM, leepama wrote:
hi!! imade many codes during these days..
I study Statistics
please one more question!!
ex1<-function(n,p,
Look at sqldf package, it is easier to do sql like statements with it.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jul 25, 2010, at 6:10 PM, harsh yadav wrote:
Hi,
I am trying to execute the following SQL statement using two
mp",
"isSynchronized","timediff)] <- cbind(dataF[,"tobiitime"],
rep(1,nrow(dataF), (dataF[i,"ruiTime"]-dataF[,"tobiitime"]))
}
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jul
My mistake, instead of colnames(d1)
use substr(colnames(d1),1,1) or similar
On Jul 19, 2010, at 2:15 PM, Nikhil Kaza wrote:
Michael,
You can modify the following code to suit. Also avoid using dist as
a variable name since it is a function in base. However, are you
sure you want to do
;- n.L[[i]]}
m2 <- function(i,j){mahalanobis(j, i, var(j))}
m3 <- function(k){apply(as.matrix(k),1,m2,as.matrix(k))}
d2 <- lapply(x.L, m3)
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jul 19, 2010, at 11:37 AM, Michael Ralph M. Ab
replace dist with mahalanobis distance in the following example.
a <- cbind(runif(10), sample(1:3, 10, replace=T))
a.L <- split(a,a[,2])
dist.L <- lapply(a.L, dist)
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jul
gsub(".", " ", "abc.degg.hijk", fixed=T)
On Jul 19, 2010, at 7:37 AM, Tolga I Uzuner wrote:
Actually, I think I got it, need to use gsub.
From: Tolga I Uzuner
Sent: 19 July 2010 12:11
To: 'r-help@r-project.org'
Subject: Help with replacing a substring in a string
Dear R Users,
I am trying to
Unless I am missing something this should do it
a<- cbind(runif(10),runif(10))
b <- cbind(a[,1]+a[,2], a[,1]/a[,2])
On Jul 16, 2010, at 7:00 AM, Ravi Ramaswamy wrote:
Hi -
I am trying to map a two dimensional area A to another two
dimensional area
B using a function. For instance A =
Building on Erik's solution and because it would easier to do date
arithmetic..
d1 <- as.character(date)
d1 <- ifelse(nchar(d1)<4, paste(0,d1,sep=""),d1)
d2 <- as.Date(date, "%m%d")
On Jul 15, 2010, at 1:21 PM, btc1 wrote:
Hello, I have a vector, "dates", as a series of 3 digit elements,
write.csv(z, paste("c:/z_",i,".csv"sep=''))
You will have to modify this to prepend 0s.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jul 13, 2010, at 10:03 AM, Michael Haenlein wrote:
Dear all,
well %in% is really checking if the element is in the set and is not a
substring operator.
To get the result you want, try
content[grepl(search$signatures, content$urls),]
For multiple operations you could try
sapply(search$signatures, grepl, x=content$urls)
Nikhil Kaza
Asst. Professor
?list.files
In particular look at pattern argument.
?file.rename
?lapply
?read.table
?"["
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jul 7, 2010, at 1:11 PM, jd6688 wrote:
Here are what i am going to accomplis
explicit call to print usually works for me.
library(audio)
for (i in 1:5){
wait(60)
print(Sys.time())
}
On Jul 1, 2010, at 4:30 PM, Matt Shotwell wrote:
> Try to flush output after printing:
>
> cat(paste(Sys.time()),"\n"); flush(stdout())
>
> On Thu, 2010-07-01 at 16:1
You can do this in reshape package as mentioned earlier.
However, if you need a solution with aggregate here it is
a <- with(data, aggregate(cbind(v1,v2), by=list(x,y,z),sum))
names (a) <- c("x","y","z","v1","v2")
Nikhil Kaza
Asst. P
require(reshape)
cast(data, first+second~ ., sum)
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jun 29, 2010, at 3:05 PM, Yi wrote:
first=c('u','b','e','k','j','c',
aggregate(data$third, by=list(data$first), sum)
or
reqiure(reshape)
cast(melt(data), ~first, sum)
On Jun 28, 2010, at 9:30 PM, Yi wrote:
first=c('u','b','e','k','j','c','u','f','c','e')
second
=
c
('usa
','Brazil
','England','Korea','Japan','China','usa','France','China','England')
third=1
.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jun 26, 2010, at 4:27 PM, Derek Ogle wrote:
I am trying to use optim() to minimize a sum-of-squared deviations
function based upon four parameters. The basic function is defined
as
-11 coda_0.13-5
[5] deldir_0.0-12 maptools_0.7-34
[7] foreign_0.8-40 nlme_3.1-96
[9] MASS_7.3-6 Matrix_0.999375-39
[11] lattice_0.18-8 boot_1.2-42
[13] sp_0.9-64
loaded via a namespace (and not attached):
[1] grid_2.11.1 tools_2.11.1
Nikhil Kaza
Asst. Professor,
C
I have spdep 4.58. Perhaps it is deprecated in the new version. Try looking
for sparse matrix representation in the help files for spdep
Nikhil
On Mon, Jun 21, 2010 at 6:10 AM, Daniel Malter wrote:
>
> as.spam.listw is an unknown function. Is it in a different package?
>
> Dani
Instead of nb2mat try
as.spam.listw(nb2listw(cell2nb(...)))
this will coerce the adjacency matrix into a sparse matrix representation
saving lot of memory.
Nikhil
On Sun, Jun 20, 2010 at 10:27 PM, Daniel Malter wrote:
>
> Hi, thanks much. This works in principle. The corrected code is
.
library(spdep)
library(igraph)
x=matrix(c(0,1,0,0,0,
0,1,1,0,0,
0,0,0,0,0,
0,0,0,1,0,
0,0,0,1,0),nrow=5)
a <- nb2mat(cell2nb(nrow(x),ncol(x)), style="B", torus="TRUE")
g <- delete.vertices(graph.adjacency(a), which(x!=1)-1)
p
Matrix is just a vector. So order should work
haven't verified the following code.
a <- matrix(rnorm(4000*2000), 4000, 2000)
b <- order(a, na.last=TRUE, decreasing=TRUE)[1:50]
use %% or %/% to get the row# and column #s
Nikhil Kaza
Asst. Professor,
City and Regional Planning
Un
On Jun 16, 2010, at 9:23 AM, Stefan Petersson wrote:
Just double all the backslashes and you are fine.
In order to see the outcome, use cat() (not print).
Uwe Ligges
On 16.06.2010 09:49, Stefan Petersson wrote:
Hi,
I'm trying to build a vector of latex commands. However, I need
the comm
What does coordinates() give for a polygon? centeroid?
I suppose I could look up the code, but it would be immensely helpful
if the help page could specify it.
regards
Nikhil
On Jun 9, 2010, at 3:50 PM, Rodrigo Aluizio wrote:
> I'm not sure if this is what you want. But the
which(abs(v - .1) <= .Machine$double.eps)
seems to me too cumbersome to write. Any other easier way? all.equal
does not quite work
Nikhil
On Jun 9, 2010, at 7:54 AM, Petr PIKAL wrote:
Hi
r-help-boun...@r-project.org napsal dne 09.06.2010 13:16:40:
Dear R community,
I am puzzled by
Minor correction below. Use 0 instead of space if you are using %H
On Thu, Jun 3, 2010 at 8:55 PM, nikhil kaza wrote:
> ?ifelse
>
> > t2 <- ifelse(nchar(times)<4, paste("0", times, sep=""), times)
>
> > strptime(t2, "%H%M")
>
> Ni
?ifelse
> t2 <- ifelse(nchar(times)<4, paste(" ", times, sep=""), times)
> strptime(t2, "%H%M")
Nikhil
On Thu, Jun 3, 2010 at 5:21 PM, Peter Moore wrote:
> Hi,
> I'm newish to R, a recent convert from Matlab... So far I'm impress
Reduce might work. Not sure about the speed advantages though. It does
simplify code.
Unionall <- function(x) Reduce('union', x)
leaveout <- Unionall(leaves)
On Tue, Jun 1, 2010 at 9:53 PM, Remko Duursma wrote:
> Dear R-helpers,
>
> thanks for yesterday's speeding-up tip. Here is my next query
?difftime
?file.info
file.info(filename)$mtime
Sys.sleep(20)
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Jun 1, 2010, at 10:07 AM, zhangted001 wrote:
Hello, I have a question about how R can run automatically. Here is
?round
On May 24, 2010, at 9:26 PM, Mohan L wrote:
Dear All,
I have a data frame "data" and the below is the str of "data" :
$ Feb : int 1 1195 0 11 28 152 24 2 1 1470 ...
$ Mar : int 0 1212 0 17 27 184 15 1 1 1311 ...
$ Apr : int 2 1244 1 15 23 135 11 0 1 991 ...
$ May : int 2
Try this.
dd[order(gsub("chr","",dd$b)),]
You need regular expressions if chr is not the only characterstring
that is prepended to the numbers.
look for
?strsplit
Nikhil Kaza
University of North Carolina
nikhil.l...@gmail.com
On May 20, 2010, at 8:28 AM, Yuan Jia
My mistake.
cars2 should be initalized to have all the extra rows.
cars2 <- data.frame(matrix(rep(NA, prod(dim(cars)) + ncol(cars)),
nrow(cars)+1))
cars2[2:nrow(cars2),] <- cars
In this way, insertion at any row is possible.
Nikhil
On May 17, 2010, at 2:46 PM, Peter Ehlers wrote:
>
Works with warnings for me. but your method is better.
Nikhil
On May 17, 2010, at 1:35 PM, Peter Ehlers wrote:
data(cars)
cars2 <- cars
cars2[2:nrow(cars)+1,] <- cars2[1:nrow(cars),]
cars2[1,] <- NA
__
R-help@r-project.org mailing l
Does this work?
data(cars)
cars2 <- cars
cars2[2:nrow(cars)+1,] <- cars2[1:nrow(cars),]
cars2[1,] <- NA
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On May 17, 2010, at 11:28 AM, ecvet...@uwaterloo.ca wrote:
I hav
paths.
I am not sure about cycles. But I suppose you can just use the minimum
spanning tree and iteratively add the remaining edges to get the cycles.
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On May 4, 2010, at 7:34 AM, jcano
Thats right. serves me for not checking the code before posting.
but paste should work in anycase with collapse or when x is a single
parameter.
Nikhil
On Sun, May 2, 2010 at 10:24 AM, David Winsemius wrote:
>
> On May 2, 2010, at 10:10 AM, Nikhil Kaza wrote:
>
> say x is
say x is the variable.
plot(..., title=paste(x, "whatever else"), ...) should work as well.
same should work with file names as well.
Nikhil
On May 1, 2010, at 9:56 PM, R K wrote:
Hello,
I was wondering if someone could tell me how I can make text
dependent on a varia
Ah..constrOptim is for linear inequality constraints. your ci is a
matrix. it should be a vector.
Nikhil
On Apr 29, 2010, at 3:14 AM, Cz³owiek Kuba wrote:
> Hi,
>
> You are right, my intention was to return a set of values and to
> minimize them all in a multicriteria
fr does not return a scalar.
Nikhil
On Apr 28, 2010, at 3:35 AM, Człowiek Kuba wrote:
Hello,
I have the following problem:
I have a set of n matrix equations in the form of :
[b1] = [A] * [b0]
[b2] = [A] * [b1]
etc.
vertical vectors [b0], [b1], ... are GIVEN. We try to estimate
matrix A
?cat
On Apr 28, 2010, at 11:21 PM, Ian Seow wrote:
Hi, how do I convert a character vector into a string?
c("a","b","c") into "a b c"
Thanks!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.c
try this
?which.max
Nikhil Kaza
Asst. Professor,
City and Regional Planning
University of North Carolina
nikhil.l...@gmail.com
On Apr 27, 2010, at 11:42 PM, vikrant wrote:
Hi All,
Suppose I have 2 time series
a = 1:20
b = 5:15
and I am finding the cross correlation between these two
If I understand it correctly
par(mfrow=c(2,2))
plot(x,y)
plot(y,z)
.
should work.
On Apr 24, 2010, at 8:11 AM, Jim Lemon wrote:
On 04/24/2010 02:52 AM, tamas barjak wrote:
Hi All!
I have 2 plain questions:
1.)
I know that very primitive question, but that to grant it, that the
drawi
a <- c(1, 8, 9, 10, 8)
a[which(a==8)] <- NA
Nikhil
On Apr 6, 2010, at 7:31 AM, David Foreman wrote:
Dear All,
I seem entirely unable to solve what should be a very simple
problem. I
have imported a SPSS dataset into R using spss.get from Frank
Harrell's
Hmisc library. Th
s in the comp. That is probably the error
Nikhil
On Mar 23, 2010, at 3:38 PM, ApproxGaussian wrote:
I apologize, the "c" is in the original coding; I merely misprinted
(copy and
paste).
I have edited the orginal post to reflect this.
--
View this message in context:
http://n4.nab
missed a c(...) here,
therefore no par defined.
On Mar 23, 2010, at 12:58 PM, ApproxGaussian wrote:
par<-(e.1,e.2,e.3,e.4,e.5,e.6,e.7,e.8,e.9,e.10,e.11,e.12,e.13,e.14,e.
15,e.16,e.17,e.18,e.19,e.20,e.21,e.22,e.23,e.24,e.25,e.26,e.27,e.28)
__
R-help
rm(setdiff(ls(), c("AA", "BB")) should work.
On Mar 20, 2010, at 12:27 PM, bogaso.christofer wrote:
Dear all, in my working project, I have created huge number of
different
kind of objects including "AA" and "BB". Now I want to delete all
objects
except that "AA" and "BB". Is there any proc
ximum. The above just returns the first maximum.
Nikhil
On Feb 8, 2010, at 1:14 PM, LCOG1 wrote:
Good day all,
I am having an issue coercing my data. Below i have some data on
taxlots
and an associated TAZ(transportation analsysi zone) that each
property is
within. The main issue is th
I don't think R will complain, if you use the approach below. However,
IF, VVS1 and VVS2 are linearly dependent.
Better use the factor approach and define which factor should be the
contrast
Nikhil
On 16 Dec 2009, at 10:12AM, Petr PIKAL wrote:
what commands did you use for regressi
0[i])
write.csv(c(ONS$labels, ONS$Freq), file="prob_table.csv")
Alternately just use concatenate command in excel after you exported
the joint probs.
Nikhil
On 15 Dec 2009, at 7:53AM, Amelia Livington wrote:
Dear R helpers
Following is a part of R code.
data_lab <- ex
?merge
use all=L
On 10 Dec 2009, at 6:06AM, Venkatesh.P wrote:
Dear all,
I am facing problem with inserting the scheduled day of Observation
in the dataset. In the dataset I have only relative time (table 1)
and not
scheduled day of observation (day 1, 4, 8, 15, 22, 29, 36, 43).
I would
This is great!! Sqldf is exactly the kind of thing I was looking for,
other stuff.
I suppose you can speed up both functions 1 and 5 using aggregate and
tapply only once, as was suggested earlier. But it comes at the
expense of readability.
Nikhil
On 9 Dec 2009, at 7:59AM, Titus von
uot;))
I suppose one could save some time by not running aggregate twice on
the same dataset, but I am not sure how.
Nikhil
On 8 Dec 2009, at 7:50AM, Titus von der Malsburg wrote:
Hi, I have a data frame and want to merge adjacent rows if some
condition is
met. There's an obviou
From an old post by Gabor
http://tolstoy.newcastle.edu.au/R/help/04/01/0147.html
apply
(outer
(landmark_c,t(store_c),"-"),c(1,4),function(x)sqrt(sum(diag(x*x
On 7 Dec 2009, at 10:58PM, dolar wrote:
Hi there
I have two tables, with longitudinal and latitudinal coordinates.
what I
?unlist
if I understand you correctly.
On 24 Nov 2009, at 5:50PM, Peng Yu wrote:
I have the following list. The second item in the list is a number.
I'm wondering how to write R code to return this information for any
list?
$`1`
integer(0)
$`2`
[1] 123
$`3`
integer(0)
$`4`
integer(0)
$`5
I 've used tiddlywiki a personal notebook for other things but not for
R. It may be useful to write a css that separates out code from
description.
http://www.tiddlywiki.com/
On 22 Nov 2009, at 11:53AM, Tal Galili wrote:
Hello all,
When using R for some time, one comes across more and mor
product
To see this try
set.seed(1)
v<- runif(12, -10,10)
fr(v)
Nikhil
On 19 Nov 2009, at 6:05PM, lloyd barcza wrote:
> fr<-function(x){y<-x*D
> C<-apply(t(apply(y,1,function(c){c[c>0]})),1,prod)
> R2<-R*C
> w<-R2[R2 g<-sum(w)
> return(g)}
This is not an answer to your question, but I have used SparseM
package to represent large travel time matrices efficiently.
?as.matrix.ssr
if the traveltime matrix is symmetric.
On 9 Nov 2009, at 5:24PM, Hongwei Dong wrote:
Hi, R users,
I'm trying to transform a matrix A into B (see belo
How about
vec[1:min(which(vec==FALSE))-1]
This will return a character(0) vector if vec[1] is FALSE
Nikhil
On 9 Nov 2009, at 2:38PM, David Winsemius wrote:
vec= TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE
__
R-help@r
try
sort (table(MAT), decreasing=T)
if MAT is your matrix
I think this is what you want. though if you want to sort by the first
occurrence then it is a different story.
Nikhil
On 2 Nov 2009, at 1:35PM, Val wrote:
V1 v2 v3 v4
569 10
347 10
46 10 18
ty of using using a unique ID for the tax records and after
the analysis in R just joining the resulting table in a GIS to your
original shapefile.
Nikhil
On 28 Oct 2009, at 1:33PM, PDXRugger wrote:
Hello R Community,
I have imported a dataset which contain X Y coordinates and would
I am having trouble with the recode function that is provided in the
CAR package. I trying to create a new factors based on existing factors.
E.g.
>x <- as.factor(1:20)
>y <- recode(x, " 1:5='A'; 6:10='B'; 11:15='C'; 16:20='D' ")
>y
[1] A A A A A 6 7 8 9 A A A A A A A A A A A
Levels: 6 7 8 9
1 - 100 of 101 matches
Mail list logo