search for: wassenaar

Displaying 18 results from an estimated 18 matches for "wassenaar".

2011 Apr 17
5
cube root
This is some interesting: > -8^(1/3) [1] -2 > x=(-8:8) > y=x^(1/3) > y [1] NaN NaN NaN NaN NaN NaN NaN NaN 0.000000 1.000000 [11] 1.259921 1.442250 1.587401 1.709976 1.817121 1.912931 2.000000 So, can anybody explain this?! (Why is x[1]^(1/3)=y[1]=NaN, but -8^(1/3)=-2?) Thx!!! [[alternative HTML version deleted]]
2011 Mar 14
2
*Building* a covariance matrix efficiently
...The trivial non-optimal approach boils down to something like: Q <- matrix(rnorm(100000),ncol=200) M <- matrix(0,ncol=200,nrow=200) for (i in 1:nrow(Q)) M <- M + tcrossprod(Q[i,]) I would appreciate pointers to help me fill this lacuna in my R skills :) Cheers, Tsjerk -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group * Groningen Institute for Biomolecular Research and Biotechnology * Zernike Institute for Advanced Materials University of Groningen The Netherlands
2011 Aug 24
3
Efficient way to Calculate the squared distances for a set of vectors to a fixed vector
I am pretty new to R. So this may be an easy question for most of you. ? I would like to calculate the squared distances of a large set (let's say 20000) of vectors (let's say dimension of 5) to a fixed vector. ? Say I have a data frame MY_VECTORS with 20000 rows and 5 columns, and one 5x1 vector y. I would like to efficiently calculate the squared distances?between each of the 20000
2011 Feb 08
2
Plot colour according to column
Hi, I am trying to plot several columns in different graphs in columns and rows. The first column of my data file is the time, and the third is the 'elevation angle' with 19 different numbers. I would like to plot the rest of the columns with the x axis as time and the individual angles in different colours. Here is the code I am using right now. It plots the different columns with time,
2005 Mar 29
1
Lattice - parallel: xlim and adding lines
Hi, I'm trying to set the minimum and maximum in a parallel plot, but trying xlim=c(-1,1) gives strange results. Am I missing something? The call I give is: parallel(~X[,c(6,9,12,15,18)]|X$ff,X,panel=panel.parallel.new,groups=X$protein,layout=c(3,1),xlim=c(-1,1)) Besides, I would like to add a reference line to the plot, but can't find how to do that. I hope someone can give me a
2013 Jan 21
2
Regex for ^ (the caret symbol)?
Hello R-helpers, I am trying to search for string that includes the caret symbol, using the following code: grepl("latitude^2",temp) And R doesn't like that. It gives me: > temp<-c("latitude^2","latitude and latitude^2","longitude^2","longitude and longitude^2") > temp [1] "latitude^2" "latitude and
2007 Aug 24
2
Applying a function to an array
Dear R-users, I would like to apply a function (more precisely sd()) over the third dimension of a three-dimension array. The function apply would be interesting but the chosen function can only be applied on the rows and columns of the array according to the help file. I can use a loop to cut the array in matrices and then use apply for each replication, but it's not very nice. A small
2009 Mar 19
2
find the index of the smallest or biggest number in a vetor or data.frame
Dear R experts, How to find out the index of minimum or maxmum number in a vetor or data.frame? For example, a= n price 1 50 -2 100 0 200 -1 300 ...... I want to find out the row which the n is the smallest or largestest and extract the price. Thanks Ted -- View this message in context:
2005 Feb 17
1
Factor level coloring in trellis plot
Hi :) Was just wondering whether someone could help me with adjustments to trellis plots (parallel). I've got two way multivariate data. I want to make parallel plots for one of the factors, and want to color the lines according to the other factor. The first thing I manage, but with the other I'm lost :( Can only change the overall color. This is basically how far I get:
2012 Mar 14
3
Creating 250 submatrices from a large single matrix with 2500 variables using loops
Dear all, I have a large matrix with about 2500 variables, and 100 rows. I would like to calculate the means of the every 10 variables starting from 1:2500 and saving the results as a vector or matrix. How can I do that? Alternatively, How can I create 250 subset matrices in the order of variables 1:2500 in groups of 10 from the single matrix which had initially 2500 variables ? I guess I have
2008 Jul 18
2
matrix multiplication question
Hello, I am a newcomer to R and therefore apologize for posting such a basic question. I am trying to multiply 2 matrices t(X1)%*%X1, where t(X1) is: 1 2 3 4 5 8 12 13 20 24 26 27 31 33 34 36 37 40 41 42 45 46 47 48 49 ones 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Shadow 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0
2012 Feb 15
3
built a lower triangular matrix from dataframe
Hello! I'm trying to build a lower triangular matrix (with zeros in the diagonal) from a particular dataframe. The matrix I have to construct has 203 rows and 203 columns and that makes 20503 values to be included within (that's why I can't do it manually). To illustrate the dataframe I have, I'll give you an example of a dataframe and matrix with dimensions 6x6 (to make it
2011 Feb 13
4
A Math question
Dear all, I admit this is not anything to do R and even with Statistics perhaps. Strictly speaking this is a math related question. However I have some reasonable feeling that experts here would come up with some elegant suggestion to my question. Here my question is: What is sum of all Integers? I somewhere heard that it is Zero as positive and negative integers will just cancel each other out.
2011 Feb 23
4
The L Word
I've been wondering what L means in the R computing context, and was wondering if someone could point me to a reference where I could read about it, or tell me what it's called so that I can search for it myself. (L by itself is a little too general for a search term). I encounter it in strange places, most recently in the "save" documentation. save(..., list = character(0L),
2009 Mar 27
3
color vectors other than gray()
I'm trying to create a graph where different cells of a grid (a shapefile) will be painted with a color share scale, where the most easy way is to use gray(). Can I somehow get a vector (gradient) of colors, a vector of colors with other methods but gray()? I'm doing this until now quad_N_sp <-
2011 Jan 26
3
Need help with my homework
Hello to all again :) Again, I have an issue with my homework. I was troubling myself for two days, and I still can't get it :( So, if someone can help me, I would be so grateful... HOMEWORK 1. I need to draw function, random walk take the length of walk, and its in 2D. As a result, I have to take matrix in which are i-lines of matrix, written coordinates on i-steps radnom.walk <-
2009 Mar 05
8
R on netbooks et al?
Dear useRs, With the rise of netbooks and 'lifestyle laptops" I am tempted to get one of these to mainly run R on it. Processor power and hard disk space seem to be ok. What I wonder is the handling and feel with respect to R. Has anyone here installed or is running R on one of these, and if so, what is your experience? Would it be more of a nice looking gadget than a feasable platform
2008 Oct 15
0
R-help Digest, Vol 67, Issue 31
...ents (Elena Wilson) 97. Re: Desperatly seeking Parallel R simulation with Windows XP (Rainer M Krug) 98. Re: par() default values (Eik Vettorazzi) 99. rpvm for windows anyone ? (tolga.i.uzuner at jpmorgan.com) 100. Weibull Verteilung (Hoeks, Luis) 101. Re: Weibull Verteilung (Tsjerk Wassenaar) ---------------------------------------------------------------------- Message: 1 Date: Mon, 29 Sep 2008 10:56:13 +0100 From: Simon Wood <s.wood at bath.ac.uk> Subject: Re: [R] GAMSetup To: r-help at r-project.org Message-ID: <200809291056.13882.s.wood at bath.ac.uk> Content-Type: t...