similar to: r-help

Displaying 20 results from an estimated 3000 matches similar to: "r-help"

2011 May 12
2
Exporting interactive 3D plots with axes and labels
Hi, I have a question about exporting interactive 3D plots. I use the following code to plot a contour of a trivariate normal distribution: library(mvtnorm) library(rgl) library(misc3d) n=25 x=seq(-3,3,length=n) X=cbind(rep(x,each=n**2),rep(rep(x,each=n),n),rep(x,n**2)) p=array(dmvnorm(X,sigma=diag(3)*0.5+0.5),c(n,n,n)) contour3d(p,x,x,x,level=mean(p)) lim=c(-3,3)
2002 Aug 01
6
update() can not find objects (PR#1861)
Full_Name: Yi-Xiong Zhou Version: 1.5.1 OS: win2000pro Submission from: (NULL) (64.169.249.42) Update() can not find objects when it is used in a function, which is in turn being called by another function. Here is a R script to show the problem: ######## begin of the test script ########## fun1 <- function() { x <- matrix(rnorm(500), 20,25) y <- rnorm(20) oo <- lm(y~x)
2010 Feb 11
2
Using contour3d: axes, plotting to file, with lattice
I am looking for examples of how to plot with contour3d() to a PNG or PDF file, add axes and other elements to the isosurface plot, and use contour3d in conjunction with lattice. Regarding lattice, I'm not necessarily looking for conditioning on the data shown in the isosurface plots, just a way to show multiple plots in one figure and label them. I am new to the packages misc3d and rgl.
2012 Nov 11
2
changing the signs in rows or columns in matrices and check them if they are identical
Dear R users, i have this problem with matrices i want to check between two matrices if they are isomorphic i will give an example for what excactly i want   1 -1  1                                 -1  1   1 -1   1  -1                                1  -1  -1   1  1   -1                                1   1  -1 this two matrices are isomorphic beacause if i change the first 2 columns the matrices
2020 May 02
1
issues with environment handling in model.frame()
Dear all, model.frame behaves in a way I don't expect when both its formula and subset argument are passed through a function call. This works as expected: model.frame(~wool, warpbreaks, breaks < 15) #> wool #> 14 A #> 23 A #> 29 B #> 50 B fun1 <- function(y) model.frame(~wool, warpbreaks, y) fun1(with(warpbreaks, breaks < 15)) #> wool #> 14
2012 Aug 12
3
Error in if-command
Hello everybody, I don't understand what I'm doing wrong. But it isn't possible that each element of the if-condition is tested for each vector element? y <- c(1:20) > y [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 > if (y == c(4,5,9,11,17)) { print("yes") } else { print("no")} [1] "no" warning: In if (y == c(4, 5, 9, 11,
2012 Nov 17
3
transform input argument (matrix) of function
Dear list!   I would like to write a function to transform matrix, which is input argument of a written function. It is easy with new matrix (see below), but my idea is to transform input argument (matrix) of function without any additional matrixes. Here is an example: fun1 <- function(xy) { xy <- cbind(xy[,1], xy[,2], xy[,1] + xy[,2]) return(xy) }   df1 <- matrix(c(1,2,3,1,2,3), ncol =
2013 Mar 10
1
misc3d Contour export to vtk
So I wanted to export a contour3d object into VTK and it worked well enough, except the top of the ball (the contour) was missing. Example below, or gist here: https://gist.github.com/muschellij2/5126544 rm(list=ls()) require(misc3d) f <- function(x, y, z) x^2+y^2+z^2 x <- seq(-2,2,len=20) ball <- contour3d(f,4,x,x,x, draw=FALSE) drawScene.rgl(ball) ### get the triangles allids
2011 Nov 23
2
How to increase precision to handle very low P-values
Hello, Rlisters I have to compute p-values that are on the tail of the distribution, P-values < 10^-20. However, my current implementations enable one to estimate P-values up to 10^-12, or so. A typical example is found below, where t is my critical value. ########### example - code adapted from Rassoc ####################### rho01 = 0.5 rho105 = 0.5 rho005 = 0.5 t = 8 z = 2
2010 Mar 03
2
Screen settings for point of view in lattice and misc3d
I'm making some 3D plots with contour3d from misc3d and wireframe from lattice. I want to view them from below; i.e. the negative z-axis. I can't figure out how to do so. I would like my point of view looking up from below, with the z, y, and x axes positive going away. Can anyone tell me the correct settings for screen to achieve this? Here is what I've found so far:
2008 Dec 11
4
how to plot implicit functions
Dear R users -- I think this question was asked before but there was no reply to it. I would appreciate any suggestion any of you might have. I am interested in plotting several "implicit functions" (F(x,y,z)=0) on the same fig. Is there anyone who has an example code of how to do this? Thank you Yihsu
2007 May 17
1
use loop or use apply?
Hi, I have two matrices, A (axd) and B (bxd). I want to get another matrix C (axb) such that, C[i,j] is the Euclidean distance between the ith row of A and jth row of B. In general, I can say that C[i,j] = some.function (A[i,], B[j,]). What is the best method for doing so? (assume a < b) I have been doing some exploration myself: Consider the following function: get.f, in which,
2020 Apr 22
3
how to add my own passes to LTO pass
Hi, I have a module pass and I hope to use it to optimize a real-world program. I need LTO,and I have got LTO plugin. But How can I add my passes to LTO Pass. I can't find solution. What should I do? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200422/76d2b046/attachment.html>
2012 Nov 16
2
Question about contour3d and writeWebGL: rgl and misc3d package
I saw that in rgl:::writeWebGL that "Polygons will only be rendered as filled; there is no support in WebGL for wireframe or point rendering.". I found that you can easily use contour3d to make reproducible contour web figures, such as (taken from contour3d help) library(AnalyzeFMRI) a <- f.read.analyze.volume(system.file("example.img", package=
2007 Jan 06
1
listing all functions in R
Dear List, I'm building an R syntax highlighting file for GeSHi [*] for a website I am currently putting together. The syntax file needs a list of keywords to highlight. How can I generate a list of all the functions in a base R installation? Ideally the list would be formatted like this: "'fun1', 'fun2', 'fun3'" when printed to the screen so I can copy
2002 Apr 12
1
Problems with memory
Dear all, I've started working with R (vs 1041) a few weeks ago, and now I'm having problems with the amount of memory. I'm working on the windows-me, my computer has 128 Mb of memory. I'm using the R under the emacs (ESS-5.1.20) and it is started by the command: Rterm --min-vsize=10M --max-vsize=100M --min-nsize=500k --max-nsize=1M I've been had problems when executing a
2007 Nov 13
2
[LLVMdev] BasicAliasAnalysis and out-of-bound GEP indices
Hi! While investigating into the PR1782 I spent some time analyzing BasicAliasAnalysis.cpp. While the mentioned problem should be fixed now (I hope), I have discovered some other possibilities for a bug to occur. In the case of checking for aliasing of two pointer values, where at least one of them is a GEP instruction with out-of-bound indices, BasicAliasAnalysis can return NoAlias, even if the
2006 Aug 09
3
objects and environments
Dear list, I have two functions created in the same environment, fun1 and fun2. fun2 is called by fun1, but fun2 should use an object which is created in fun1 fun1 <- function(x) { ifelse(somecondition, bb <- "o", bb <- "*") ## mymatrix is created, then myresult <- apply(mymatrix, 1, fun2) } fun2 <- function(idx) { if (bb == "o) { #
2011 Apr 07
2
Two functions as parametrs of a function.
Hi R users: I'm trying to make a function where two of the parameters are functions, but I don't know how to put each set of parameters for each function. What am I missing? I try this code: f2<-function(n=2,nsim=100,fun1=rnorm,par1=list(),fun2=rnorm,par2=list()){ force(fun1) force(fun2) force(n) p1<-unlist(par1) p2<-unlist(par2) force(p1) force(p2)
2012 Nov 08
5
map two names into one
Thanks. Yes. Your approach can identify: Glaxy ace S 5830 and S 5830 Glaxy ace But you can not identify using same program: Iphone 4S 16 G Iphone 4S 16G How should I solve both in same time. Kind regards,Tammy [[alternative HTML version deleted]]