Re: [R] R column assignment fails for lists

2016-05-04 Thread Yasir Suhail
e to store vectors, then shouldn't a[,3] <- a[,3] work? Best regards, yasir On Tue, May 3, 2016 at 9:48 PM, David Winsemius wrote: > > > On May 3, 2016, at 4:13 PM, Yasir Suhail wrote: > > > > Dear R developers and users, > > > > Consider the obj

[R] R column assignment fails for lists

2016-05-03 Thread Yasir Suhail
Dear R developers and users, Consider the object : > a <- data.frame(a=c(1,2), b=c(2,3), c=c("a,b","c,d"), stringsAsFactors = F) > a$c <- strsplit(a$c, ",") Re-assignment works fine for columns 1 and 2, but fails for column 3. If a is a valid object, the assignment should work. > a[,1] <- a[,1]

Re: [R] change file name from file0.1_data.RData to file1_data.Rdata

2012-07-20 Thread Yasir Kaheil
use function system in R for (x in 1:100){ system (paste("rename file0.",x,"_data.RData file",x,"_data.Rdata",sep="")) } - Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.com/change-file-name-from-file0-1-data-RData-to-file

Re: [R] Merging Data Frames in R

2012-07-18 Thread Yasir Kaheil
type ?merge in R - Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.com/Merging-Data-Frames-in-R-tp4636781p4636962.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https

Re: [R] PCA

2012-07-18 Thread Yasir Kaheil
in biplot you could set the limits xlim, ylim of the axes to zoom in on the plot. - Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.com/PCA-tp4636840p4636961.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Entering Data Files

2012-07-18 Thread Yasir Kaheil
type ?read.table in R - Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.com/Entering-Data-Files-tp4636943p4636959.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https

Re: [R] read.table with numeric row names

2012-07-12 Thread Yasir Kaheil
just do this: colnames(r)<-substr(colnames(r),2,nchar(colnames(r))) This will remove the X. Later when you want to use the headed to plot something, cast it as numeric: plot(colMeans(r)~as.numeric(colnames(r))) ----- Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.

Re: [R] Subset based on multiple values

2012-07-11 Thread Yasir Kaheil
yes just use %in% instead of == AllMax.. but also use table for count - Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.com/Subset-based-on-multiple-values-tp4636159p4636183.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Subset based on multiple values

2012-07-11 Thread Yasir
I see that this is your input: c(1,1,1,1,3,3,7,7,7,7) what do you want the output to be? what could the multiple values of AllMax be? - Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.com/Subset-based-on-multiple-values-tp4636159p4636167.html Sent from the R help

Re: [R] replacing NaN for every attribute in my data

2012-07-11 Thread Yasir
You can try this: for (i in 1:length(ds)) { dummy<-ds[[i]]; dummy[is.nan(dummy)]<-0 ds[[i]]<-dummy } if is.nan doesn't work, replace with is.na - Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.com/replacing-NaN-for-every-attribute-in-my-data-tp4

Re: [R] info about R arulesSequences

2012-07-11 Thread Yasir
H(sx); i++) { if ((k = INTEGER(sx)[i]) < l) error("'sid' invalid"); - Yasir Kaheil -- View this message in context: http://r.789695.n4.nabble.com/info-about-R-arulesSequences-tp4635949p4636161.html Sent from the R help mai

Re: [R] fitting power growth

2012-07-11 Thread Yasir
read the part on power fitting: http://www.itc.nl/~rossiter/teach/R/R_CurveFit.pdf -- View this message in context: http://r.789695.n4.nabble.com/fitting-power-growth-tp4635999p4636158.html Sent from the R help mailing list archive at Nabble.com. __ R

Re: [R] For loop help

2012-07-11 Thread Yasir
Read your data using read.table with as.is=TRUE then you could reformat the date column to make R understand that it is a date, depending on your raw date format. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/For-loop-help-tp4636155p4636157.html Sent from the R help maili

[R] X11 error while plotting in R on OSX

2012-02-01 Thread Yasir Suhail
I installed R 2.14.1 on a OSX 10.7.2 computer using MacPorts. If I fire up R on a terminal, this very simple session gives me errors. I attach sessionInfo() details as well. In addition to the warnings, I also do not get any plots on the X11 window after the warnings. So one cannot just ignore the

[R] help with summary.lm aliased

2010-08-24 Thread Yasir
Dear R users, I'm building linear models that use poly and has a lot of product terms. My model summaries look messy. I know that the summary could use aliases for the variable names, but I don't know how to get it to do that. Please help Thanks, -- View this message in context: http://r.789695.

[R] Spectral analysis with mtm-svd Multi-Taper Method Combined with Singular Value Decomposition

2009-01-26 Thread Yasir Kaheil
Hi list, Does anyone know if there is a library in R that does MTM-SVD method for spectral analysis? Thanks - Yasir H. Kaheil Columbia University -- View this message in context: http://www.nabble.com/Spectral-analysis-with-mtm-svd-Multi-Taper-Method-Combined-with-Singular-Value

Re: [R] create sequences from two "from" and "to" vectors

2009-01-09 Thread Yasir Kaheil
Great! thank you so much! Dimitris Rizopoulos-4 wrote: > > one way is using mapply(), e.g., > > mapply(":", 1:4, 3:6) > > > I hope it helps. > > Best, > Dimitris > > > Yasir Kaheil wrote: >> hi all, >> how can I create seq

[R] create sequences from two "from" and "to" vectors

2009-01-09 Thread Yasir Kaheil
hi all, how can I create sequences that start from a known vector, say x1 and end with another say x2- also suppose all the sequences will be the same length. I don't want to use a for loop x1<-c(1,2,3,4); x2<-(3,4,5,6); what I want is 1 2 3 4 2 3 4 5 3 4 5 6 Thanks - Yasi

Re: [R] generating a random signal with a known correlation

2008-08-11 Thread Yasir Kaheil
th(x)) yp<-pnorm(y) ypix<- sort(yp[,1],index.return=TRUE)$ix yp<-yp[ypix,]; yps<-yp[,1];# dummy initialization yps[xix]<-yp[,2]; #adjust mean and sd here. yqs<-qnorm(yps,mean=mean(x),sd=sd(x)); cor(x,yqs) Yasir Kaheil wrote: > > Hi, > How can I generate a random signal

[R] generating a random signal with a known correlation

2008-08-11 Thread Yasir Kaheil
Hi, How can I generate a random signal that's correlated with a given signal at a given correlation (say 0.7)? I've been looking at rmvnorm etc but don't seem to figure it out. Thanks - Yasir H. Kaheil Columbia University -- View this message in context: http://www.nabble.c

Re: [R] Fill in NA values in vector with previous character/factor

2008-07-28 Thread Yasir Kaheil
thanks, > > Owen > > __ > 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-guide.html > and

Re: [R] Is there way to multiple plots on gap.plot?

2008-07-28 Thread Yasir Kaheil
lp@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-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil Columbia University --

Re: [R] Insurance review statistical methods

2008-07-15 Thread Yasir Kaheil
/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil Columbia University -- View this message in context: http://www.nabble.com/Insurance-review-statistical-methods-tp18454105p18462572.html Sent from the R help mailing

Re: [R] netCDF to TIFF

2008-07-09 Thread Yasir Kaheil
___ > 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-guide.html > and provide commented, minimal, self-contained, reproducible code. &

Re: [R] outlining symbol in legend with blackline

2008-07-09 Thread Yasir Kaheil
ot spend our time and resources thinking about things that are so > little or so large that all they really do for us is puff us up and make > us > feel like gods. We are mammals, and have not exhausted the annoying little > problems of being mammals. > > -K. Mullis > >

Re: [R] Random Forest

2008-06-06 Thread Yasir Kaheil
s://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil Catchment Research Facility The University of Western Ontari

Re: [R] array of arrays

2008-06-04 Thread Yasir Kaheil
uide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil Catchment Research Facility The University of Western Ontario -- View this message in context: http://

Re: [R] R-Excel Macro Problem

2008-05-25 Thread Yasir Kaheil
glad to hear things worked out. y nmarti wrote: > > Ok, so I'm embarrassed to admit I made a really dumb mistake. My VBA page > was declared as "Sheet1" code when it should have been "Module1" code. > I knew it was something stupid. Sorry for the inconve

Re: [R] SVD on a matix

2008-05-25 Thread Yasir Kaheil
ind that. > > Thanks for your help > - Yasir H. Kaheil Catchment Research Facility The University of Western Ontario -- View this message in context: http://www.nabble.com/SVD-on-a-matix-tp17441337p17455129.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] R-Excel Macro Problem

2008-05-25 Thread Yasir Kaheil
uot;Data", Range("Sheet1!A1:E2000")) > I receive the error. > I have the VBA "References" RExcelVBAlib checked. > > Any suggestions would be appreiciated, > Nate > - Yasir H. Kaheil Catchment Research Facility The University of Western Ontario --

Re: [R] Question about Runuran (Triangular Distribution)

2008-05-23 Thread Yasir Kaheil
www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil Catchment Research Facility The University of Western Ontario -- View this message in context: http://www.nabble.com/Question-about-Runuran-%28Triangular-Di

Re: [R] question for Logic Regression

2008-05-19 Thread Yasir Kaheil
nnealing) > > new<-data.frame(Z) > new<-NULL > alltrees <- predict(logicfit, new) > > names(logicfit) > > doesn't have coef class. > > thanks > > > > > Yasir Kaheil wrote: >> >> try >> alltrees <- predict(fit, mod

Re: [R] question for Logic Regression

2008-05-18 Thread Yasir Kaheil
reg(fit$model , model.dat2) > > could anyone enlighten me a little. > thanks > leo > > __ > 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-guide.html > and provide

Re: [R] merging data frames

2008-05-16 Thread Yasir Kaheil
A 30 > X NA 10 NA > Y NA NA 21 > > > Could any one help me how can I merge 3 dataframes. > > appreciate your help. Thank you. > > srini > > __ > R-help@r-project.org mail

Re: [R] Lattice box percentile plot

2008-05-16 Thread Yasir Kaheil
set(list(box.dot=list(pch=3,col="red"))) > > bwplot(B~A,panel=panel.bpplot, probs=seq(.01,.49,by=.01)) > > I’d really appreciate it if someone could tell me how to change the fill > colour as well as it is driving me mad. > > Chears. > > - Yasir H. Kahe

Re: [R] re ading and analyzing a text file

2008-05-16 Thread Yasir Kaheil
p@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-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil Catchment Research Fac

Re: [R] How to extract estimates, Std. Error, t Value and Pr(>|t|) from summary

2008-05-16 Thread Yasir Kaheil
___ > 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-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil

Re: [R] plot 2 bars

2008-05-13 Thread Yasir Kaheil
> 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-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil Catchment R

Re: [R] Creating data.frames dynamically

2008-05-11 Thread Yasir Kaheil
> [[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 > http://www.R-project.org/posting-guide.html > and provide commented

Re: [R] question about subseting a dataframe

2008-05-09 Thread Yasir Kaheil
> > __ > 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-guide.html > and provide commented, minimal, self-contained, reprodu

Re: [R] applying cor.test to a (m, n) matrix

2008-05-08 Thread Yasir Kaheil
__ > 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-guide.html > and provide commented, minimal, self-contained, reproducible code. > > -

Re: [R] help with regsubsets

2008-05-08 Thread Yasir Kaheil
gt; __ > 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-guide.html > and provide commented, minimal, self-contained, reproducible code. > &g

Re: [R] miniscule font size on R console output

2008-05-08 Thread Yasir Kaheil
SE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil, Ph.D. Catchment Research Facility The University of Western Ontario -- View this message in context: http://www.

Re: [R] pivoting - summing up factors

2008-05-07 Thread Yasir Kaheil
iling list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > - Yasir H. Kaheil, Ph.D. Catchment Research Facili

Re: [R] Spatial join between two datasets using x and y co-ordinates

2008-05-06 Thread Yasir Kaheil
# > > [[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 > http://www.R-project.org/post

Re: [R] General Plotting Question

2008-05-06 Thread Yasir Kaheil
ze data as we speak and R along with all of your help is an > invaluable tool. Am I missing something easy, do I not understand the > logic/philosophy, or...? > thanks > > Stephen > > On Tue, May 6, 2008 at 12:53 PM, Yasir Kaheil <[EMAIL PROTECTED]> wrote: > >>

Re: [R] Plotting separate populations in scatterplot3d

2008-05-06 Thread Yasir Kaheil
straightforward, but I've spent 4 > days on this already. > > > > Any help would be greatly appreciated. > > Regards, > EJ > > > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinf

Re: [R] General Plotting Question

2008-05-06 Thread Yasir Kaheil
0220", "0.0230", > "0.0240", "0.0280", "0.0300", "0.0720", "0.0890", "0.1000", > "0.1200", "0.1280", "0.1400", "0.1500", "0.1880", "0.1910", > &qu

Re: [R] Is there in R a function equivalent to the mround, as found in most spreadsheets?

2008-05-06 Thread Yasir Kaheil
ab) Fax 39 055 333 273 > [EMAIL PROTECTED] http://www4.unifi.it/dssnp/ > > __ > 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/posti

Re: [R] axis and tick widths decoupled (especially in rugs!)

2008-05-05 Thread Yasir Kaheil
a decent thick-lined > rug, without the horizontal line also becoming equally thick. > Is there any way to do this without having to resort to segments? > > Tnx! > - Yasir H. Kaheil, Ph.D. Catchment Research Facility The University of Western Ontario -- View this mes

Re: [R] bwplot

2008-05-05 Thread Yasir Kaheil
t; equivalent parameter in bwplot. > > thanks, > > Cédric > __ > 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-guide.html > and pro

Re: [R] barplot with log base 2 scale or shift the x-axis

2008-05-03 Thread Yasir Kaheil
user parameter "offset" barplot(d,offset = -2) #assuming that d is your data Summer Nitely wrote: > > Hi, > I have data that is on a log base 2 scale. It goes from negative factors > of > 2 to positive ones. I am using barplot. However, I don't want the data > centered at 0 - I want the min

Re: [R] interactive rotatable 3d scatterplot

2008-05-02 Thread Yasir Kaheil
#Install library rgl #here is the is the function: rgl.plot3d<-function(z, x, y, cols="red",axes=T,new=T) {xr<-range(x) x01<-(x-xr[1])/(xr[2]-xr[1]) yr<-range(y) y01<-(y-yr[1])/(yr[2]-yr[1]) zr<-range(z) z01<-(z-zr[1])/(zr[2]-zr[1]) if(new) rgl.clear() if(axes) {xlab<-pretty(x) yl

Re: [R] Excluding/removing row and column names on text output files

2008-05-02 Thread Yasir Kaheil
try: write.table(x, file="/Users/Desktop/Data.txt", row.names= FALSE, col.names= FALSE, sep="", append=TRUE) this should do it. If you don't want to append, just turn that opion off. Stropharia wrote: > > Dear R users, > > I've had no joy finding a solution to this online or in any of my R

Re: [R] re moving rows from matrix

2008-05-02 Thread Yasir Kaheil
you could do it using apply like the first two replies mentioned or you could just use the index way for example: (assuming your matrix name is ym and the values are greater than 25 and less than 50 and the column is column 3).. if you mean "any column" use the first two replies. > ym<-array(runi

[R] xYplot legend keys labels

2008-05-02 Thread Yasir Kaheil
I came across this little problem in the xYplot function recently and I found it very poorly documented. The legend (keys) in the xYplot is very confusing, especially if you want to change the data labels you have in the data frame column names... say for example you want something with a subscrip

Re: [R] predict.glm & newdata

2008-04-30 Thread Yasir Kaheil
You could just say: yhat=predict(reg1,x2) the function predict will assing x2 to 'newdata' by default. thanks Daniel Malter wrote: > > Hi, > > could it be the "newdata" argument? When I run predict with the newdata > argument, I get an error message - a different one though. The second > rea