similar to: how to apply a self-written function to a data frame

Displaying 20 results from an estimated 400 matches similar to: "how to apply a self-written function to a data frame"

2008 Mar 01
1
jpeg and margin text
Hi guys, I use R 2.6.2 and Windows XP. I’ve got the following question: I wrote a lot of text into the margin of a plot. When I use the “jpeg”-function, only a little part of the margin text is displayed in the final jpeg? Any ideas to change it? Source-Code: datenbankdaten<-data.frame(LETTERS[1:20],
2007 Jun 28
2
TukeyHSD
Hello everyone, So I ran an anova with aov and then I want to run post-hoc comparisons but keep receiving this message : > no applicable method for "TukeyHSD" Here is my code: > d<-read.table("d.txt") > d > Obs subj Hand Gaze RT > 1 1 s1 1 1 401.4 > 2 2 s2 1 1 363.3...... > summary(ano <-
2013 May 28
0
[LLVMdev] unexpectedly loop hanging
As an update, it is a memory problem which I don't know how to fix. I tried to skip the problematic piece of code when in the case when the loop hangs. So I did something like : if( instr ) { LLVMContext& C = instr->getContext(); Value* values[cnt]; errs()<<"\ngy: \n"; if(!(desters==7)){ // this
2006 May 24
0
the computation of exact p-value for the nonparametric cor-test with ties
Hello, I wuold like to propose my modifications of the original cor.test to you : I tried to calcolate the correct p-value for Spearman and Kendall's test with ties. Let me know what you think. Thanks you for your time. Antonietta di Salvatore test <- function(x, ...) UseMethod("test") test.default <- function(x, y, alternative = c("two.sided",
2013 May 28
1
[LLVMdev] unexpectedly loop hanging
Hi, I don't know much about this issue, but this malloc error won't be solved by a change to delete[] or free. In fact, if you use the incorrect one for simple types, you may not notice it. The error you have seems to me like a memory corruption because you went out of bound and corrupted the memory somewhere, Valgrind may help you figure out what is going on. Cheers, Matthieu
2013 May 03
0
[LLVMdev] set of integers to metadata
I also tried the following, with no compilation errors, but segfault, core dumped: *LLVMContext& C = is->getContext(); Value* values[size]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } llvm::ArrayRef<Value*> bla = values[size]; is->setMetadata("path",MDNode::get(C,bla));* On Fri, May 3, 2013
2009 Sep 09
3
tinc for iphone & ipod touch
Hello, I've managed to create a tinc build for IPhone and IPod touch. Since the device does not support TUN interface, TUNEMU was used: http://code.gerade.org/tunemu/ Please find the patch in the attachment (to be used with tinc-1.0.9). The patch does the following: - updates src/Makefile.in & src/Makefile.am so required libraries are attached and tunemu.c is compiled - updates
2012 May 22
4
“For” calculation is so slow
Dear All, The function I wrote can run well with the small data, but with the large data, the function runs very very slowly. How can I correct it? Thank you very much. My function as below: a<-c(1:240) b<-c(1:240) l=function(a,b){ v=0 u=0 uv=0 v[1]=0 u[1]=0 uv[1]=0 for (i in 1:(length(s)-1)){ v[i]<-((gx[[i]][b,(gx[[i]][a,1]+1)])-(gx[[i]][a,gx[[i]][a,1]+1]))/(gx[[i]][a,gx[[i]][a,1]+1])
2013 May 28
3
[LLVMdev] unexpectedly loop hanging
Hello everyone, I was able to get all the execution paths between 2 points (basic blocks) in my program (with the condition to traverse a loop only once). I mapped all the basic blocks to integers and created a correspondent directed graph. I was able to get all the paths (a path is represented by an integer identifier). For my target program I have 72 paths, but the program hangs unexpectedly
2013 May 03
2
[LLVMdev] set of integers to metadata
Hello everyone, I want to pass a set of integers using metadata but I don't know how. I have tried: the integers are in array[] *1. * LLVMContext& C = is->getContext(); Value* values[size]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } *is->setMetadata("path",MDNode::get(C,values));* failes when setMetadata(),
2011 Nov 25
1
Multiple selection, renaming and saving the results
Dear all, I have a big data frame: str(data1) 'data.frame': 18272 obs. of 11 variables: $ tag : int 100001 100002 100003 100005 100007 100008 100009 100011 100012 100014 ... $ sp : Factor w/ 18 levels "acassp","acocar",..: 13 5 7 14 14 18 3 11 13 10 ... $ gx : num 20 10 35 68 88 63 123 115 137 136 ... $ gy : num 30 25 24 1 10 40 45 25 23 45 ...
2007 Sep 23
2
return(x=x,y=y,prob=prob) hasn't been used in R now?
Dear friends, Now, when i use the argument return(x=x,y=y,prob=prob) , R displays the waring message: Warning message: The return value for multiple variables wasn't used in: return(x = x, y = gy, prob = prob) I used the methods of "help.search("return")" and "?return" to get some help, but didn't find info on it. Anybody knows how it should be used
2004 Dec 22
0
weighted kernel density estimation
Dear wizaRds, I use the MASS::kde2d function to estimate density of the two first principal components. I do that to have a graphic visualisation of a "group structure" in my dataset. So far, no problem. But i would like to estimate that density using weights according to the COS?? values that tells me if my observation is well represented on the factorial plan 1-2. I would like to
2002 Oct 12
1
reshape
I'd like to convert a data.frame from (long format): gen maxh resp 1 12.3 y . . . . . . where resp is a factor with levels "y" and "n" to the wide format: gen maxh.y maxh.n . . . . . . I've done it as follows: maxh.y <- split(maxh, resp)$y gy <- split(gen, resp)$y yes <-
2006 Jun 14
1
Estimate region of highest probabilty density
Estimate region of highest probabilty density Dear R-community I have data consisting of x and y. To each pair (x,y) a z value (weight) is assigned. With kde2d I can estimate the densities on a regular grid and based on this make a contour plot (not considering the z-values). According to an earlier post in the list I adjusted the kde2d to kde2d.weighted (see code below) to estimate the
2014 Mar 06
1
Create dataframe in C from table and return to R
Hi , I am trying to create a dataframe in C and sebd it back to R. Can anyone point me to the part of the source code where it is doing , let me explain the problem I am having . -------------------------------------------------------------------- My simple implementation is like this SEXP formDF() { SEXP dfm ,df , dfint , dfStr,lsnm; char *ab[3] =
2004 Aug 12
1
Error Using pm.getabst()
R Users: After installing Bioconductor, RSXML and all the relevant Win32 DLLs (libxml2, zlib, iconv), I receive the following error message when using pm.getabst() Error in xmlRoot(absts) : no applicable method for "xmlRoot" I receive this when using the example from help(pm.getabst). Downloading the target XML file, parsing it with xmlTreeParse and applying xmlRoot returns no
2005 Oct 11
1
problem with roaming profiles
Hi, i'm using samba version 3.0.9-2.6-SUSE on suse 9.1 platform with about 40 clients both win XP SP2 and win 2000 SP4 and over 200 users. My problem is with win xp roaming profiles. It caches profiles onto local drive and every time user logs off it starts to synchronize users profile. If there are more than one profiles cached it tries to synchronize all of them and asks username and
2011 Feb 15
1
gList and gTree methods of grid::grobX
Dear all, In an attempt to draw fill patterns in grid graphics, I have encountered a behavior of grobX that I cannot understand from the documentation. Consider this, library(grid) ## gTree g1 <- gTree(children=gList( rectGrob(0.5,0.5, width=unit(0.8,"npc"), height=unit(2,"cm")), circleGrob(r=0.3)), vp=viewport(0.5,0.5)) ##
2003 Dec 01
0
No subject
so apparently the printer name and the share name for the printer need to be the same so cups knows where to send the print job. <p>By the way, my configuration file was generated by SWAT, so it was SWAT that put the *&nbsp;command's in the conf file, and it was SWAT that allowed me to name the share something other than the name of the printer. <p>Dan <p>Ries van Twisk