Re: [R] memory.size help

2007-08-31 Thread Andris Jankevics
 #DEFININING AN EMPTY VECTOR TO HOLD ZK VALUES > for(x in 1:nrow(xk)) { > k <- intersect(i1[x,], i2[x,]) > zk[x] <- mean(unlist(k), na.rm = TRUE) > } > xk$zk <- zk > data <- na.omit(xk) -- Andris Jankevics Assistant Department of Medicina

[R] Bind together two vectors of different length...

2007-07-30 Thread Andris Jankevics
this: 1 2 3 4 5 6 7 8 9 10 1 0 3 0 5 0 7 0 9 0 How can I do this in R? Thank you. -- Andris Jankevics Assistant Department of Medicinal Chemistry Latvian Institute of Organic Synthesis Aizkraukles 21, LV-1006, Riga, Latvia __ R-help@stat.math.ethz

Re: [R] Greek symbols in xtable rows

2007-04-16 Thread Andris Jankevics
major 2 minor 4.1 year 2006 month 12 day18 svn rev40228 lan

[R] Greek symbols in xtable rows

2007-04-16 Thread Andris Jankevics
[1] "$\\Delta$" Gives a latex aoutput like: \$$\backslash$Delta\$ Thank You in advance Andris Jankevics __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://ww

Re: [R] Get "home" directory and simple I/O

2007-03-23 Thread Andris Jankevics
If you want get a username of user currently running R on Linux,you can use a system command and read enviroment variables: paste("/home/",system ("whoami",intern=TRUE),sep="") Andris Jankevics On Piektdiena, 23. Marts 2007 14:30, Alberto Monteiro wrote: > I

Re: [R] Start and Restart R over SSH

2007-02-19 Thread Andris Jankevics
Hi, You can take a look at GNU screen programm: http://www.gnu.org/software/screen/ Andris Jankevics On Pirmdiena, 19. Februāris 2007 15:56, Nils Höller wrote: > Hi, > > I have some big calculations in R to be done. > Since I can use R on a server with ssh, i was wondering if I can

[R] Interactive plots with R

2007-01-31 Thread Andris Jankevics
Hi, I wrote some simple rpanel package script for visual spectral data comparison. At this example i have a three samples and i want to zoom through x and y axis to compare differences between samples. With my script below I can zoom to some data region and add some other spetra to the plot, th

[R] question about apply function

2006-12-08 Thread Andris Jankevics
t;S3","S4","S5") I want to normalize all samples to same sum of variables: NormFun <- function (i) {(i*(1/sum(i)))} Dnorm <- apply(DATA,1,NormFun) Why I am getting tranposed matrix Dnorm? And with my experimental data (with 32k variables) i am getting a slighty diffe

Re: [R] PCA reconstruction funtion

2006-11-10 Thread Andris Jankevics
- (IrisPC1+IrisPC2),3) EPC3 <- round(Data - (IrisPC1+IrisPC2+IrisPC3),3) EPC4 <- round(Data - (IrisPC1+IrisPC2+IrisPC3+IrisPC4),3)# 0 Andris Jankevics On Piektdiena, 10. Novembris 2006 05:58, Renaud Lancelot wrote: > See ?rconst in package ade4. You will need to fit the PCA with > dudi.p

Re: [R] Simple question about Lists

2006-11-02 Thread Andris Jankevics
Hello, You can try to merge network$wieght in the data frame, and the plot a first row from it. DataF <- do.call (rbind,network$weight) Andris On Ceturtdiena, 2. Novembris 2006 12:53, Wee-Jin Goh wrote: > Hello, > > I know this must be a very simple problem, but I can't work it out > from th

Re: [R] Multivariate regression

2006-10-30 Thread Andris Jankevics
Also you can take a look on Partial Least Squares (PLS) regression. http://www.statsoft.com/textbook/stpls.html R-package: http://mevik.net/work/software/pls.html Andris Jankevics On Sestdiena, 28. Oktobris 2006 06:04, Ritwik Sinha wrote: > You can use gee ( > http://finzi.psych.upenn

Re: [R] question about dataframe ("sensory") in PLS package

2006-08-01 Thread Andris Jankevics
(DATAY) <- c("respone_1","response_2") KAL <- data.frame (N = rownames(DATAX)) KAL$Y <- DATAY KAL$X <- DATAX KAL$X KAL$Y DATAX is a matrix of testing data, but DATAY is a matrix of responses. Andris Jankevics On Pirmdiena, 31. Jūlijs 2006 05:45, [EMAIL PROTECTED]

Re: [R] data extraction

2006-06-30 Thread Andris Jankevics
This should work: data[seq(1,nrow(data),10),] Andris On Piektdiena, 30. Jūnijs 2006 14:45, yohannes alazar wrote: > Dear mailing list I have a data that have 20,000 rows and 20 columns. Io > wonted to extract the 10th row only. Example the 10th, 20th, 30th > 40th�..2 th. can you please hel

[R] Indexing vector with repeated values

2006-05-26 Thread Andris Jankevics
5 But how can I find a break points for vector with random values and random number sequence intervals? Why result for interval (1,2) is 4, if there is only 3 values of "1"? Can I get from vector Z a smal vector Zs 1,2,3,4,5 ? Thanks a lot

Re: [R] Question about PLS regression

2006-04-18 Thread Andris Jankevics
I am sorry. It was my fault. My example is wrong. I need also rearrange a validation data set too. But I have a sligthy different results with my real data. Where can the problem be? Andris Jankevics On Otrdiena, 18. Aprīlis 2006 17:55, Andris Jankevics wrote: > Hello useRs, > > I am

[R] Question about PLS regression

2006-04-18 Thread Andris Jankevics
0.1) VAL <- data.frame(num=c(1:10)) VAL$X <- as.matrix(cbind(X1v,X2v,X3v,X4v,X5v)) predict (PLS,VAL,4) predict (PLS2,VAL,4) Thank You, Andris Jankevics __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Random variable input in mlm

2006-03-31 Thread Andris Jankevics
RED[,2] Y1x <- Y1 - PRED[,1] SSEY1 <- sum(Y1x[1:length(V[,2])]^2) SSEY2 <- sum(Y2x[1:length(V[,2])]^2) RES <- data.frame (Vars = structure(dimnames(as.matrix(D))[2],dim =1),SSEY1 = SSEY1, SSEY2 = SSEY2) print (RES) } lapply (1:(length(Z)-1),

[R] Question about for loop?

2006-03-29 Thread Andris Jankevics
Hello useRs, I can't figure out how can I store a data frame of values of X and D from this loop: Z <- c(1:10) for (i in 1:(length(Z)-2)) {D <- x[1:(2+i)]; X <- paste("x",sep="",i) print (X) print (D)

Re: [R] R Installation in Ubuntu 5.04 [Hoardy Hedgehog]

2006-03-10 Thread Andris Jankevics
You have to install Xserver (x.org or XFree86) devel packages before compiling. On Piektdiena, 10. Marts 2006 17:31, M Senthil Kumar wrote: > Hello there, > > I had been learning to use R for some time and I am trying to install it > on Ubuntu 5.04 Linux. I downloaded the tarball, there was some

Re: [R] Update R 2.1.1-1 -> 2.2.1 on UBUNTU

2006-03-01 Thread Andris Jankevics
In my opinion line in /etc/apt/sources.lst shoud be similar like this: deb http://cran.r-project.org/bin/linux/debian/stable ./ On Trešdiena, 1. Marts 2006 10:13, Florence Débarre wrote: > On Mer 1 mars 2006 8:58, Prof Brian Ripley a écrit : > > Maybe you need to spell cran.R-project.org in Engli

Re: [R] install RPM file on Redhat

2006-02-27 Thread Andris Jankevics
Hello, As a root users type a command like this: rpm -iU R-2.2.1-1.rh4AS.i686.rpm On Pirmdiena, 27. Februāris 2006 08:02, Erin Hodgess wrote: > Dear R People: > > I downloaded the RPM for Red Hat Linux. > > How do I install this, please? When I looked > at the R Intallation manual, it seemed to