Displaying 20 results from an estimated 5000 matches similar to: "R first.id last.id function error"
2009 Feb 08
0
Modifying forestplot function in rmeta
All,
I am using the forestplot function in rmeta.
I was able to modify the x axis range by commenting out one line and 
feeding it two new parameters (I wanted to set zero as the axis start point).
     #xrange <- c(max(min(lower, na.rm = TRUE), clip[1]), 
min(max(upper, na.rm = TRUE), clip[2]))
     #new line
     xrange <- c(xlow,xhigh)
Now I am trying to modify the text font size for
2009 Oct 21
1
formula and model.frame
Suppose I have the following function
myFun <- function(formula, data){
	f <- formula(formula)
	dat <- model.frame(f, data)
	dat
	}
Applying it with this sample data yields a new dataframe:
qqq <- data.frame(grade = c(3, NA, 3,4,5,5,4,3), score = rnorm(8), idVar = c(1:8))
dat <- myFun(score ~ grade, qqq)
However, what I would like is for the resulting dataframe (dat) to include
2011 Jan 11
1
sorting question
Hi,
I have a data frame with variables a, b, c (character vars) and t (time var, 
could be represented as POSIXct or character, depending on which is most useful. 
The format is "yyyy-mm-dd hh:mm:ss CET"). Now, I want to sort the data frame in 
ascending order by a, b, c and then in descending order by t.
Here's what I've got, but I'm not sure how to put the
2005 Mar 26
1
Function Arguments
Hello,
 
I am trying to wrap some code that I repeatedly use into a function for efficiency. The following is a toy example simply to illustrate the problem. 
 
foobar.fun<-function(data,idvar,dv){
id.list<-unique(idvar)
result<-numeric(0)
     for (i in id.list){
     tmp1<-subset(data, idvar == i)
     result[i]<-mean(get("tmp1")[[dv]])
     }
return(result)
}
 
The
2012 Dec 06
1
scope, lme, ns, nlme, splines
I want to fit a series of lme() regression models that differ only in the
degrees of freedom of a ns() spline. I want to use a wrapper function to do
this. The models will be of the form
y ~ ns(x, df=splineDF)
where splineDF is passed as an argument to a wrapper function.
This works fine if the regression function is lm(). But with lme(),
I get an error.  fitfunction() below demonstrates this.
2015 Sep 03
1
Doubts on incremental backup and command repetition
Hi,
I am trying to use rsync for incremental backup and I am facing some issues. I would like to ask your help to understand what is going on and have the proper command line. 
1) my goal is 
I the following folders:
./dest:
file3.txt
./orig:
file1.txt   file10.txt  file2.txt   file20.txt
And I would like to have as incremental backup
./dest:
backup      file1.txt     file2.txt  file3.txt
2009 Sep 14
2
problems with reshape
Hello *
I would like to reshape wide the following dataset:
> rl <- read.dta("intermedi/rapporti_lavoro.dta") [c("id_rl","prog","sil_pi","sil_cf","sil_dat_avv")]
> dim(rl)
[1] 12964     5
> object.size(rl)
1194728 bytes
> head(rl)
  id_rl prog      sil_pi           sil_cf sil_dat_avv
1   638    1 04567XXXXXX
2001 Dec 27
3
reshape error in 1.4 (PR#1231)
Full_Name: Kevin Wright
Version: 1.4
OS: Windows 95
Submission from: (NULL) (170.54.59.160)
Note: This was the 1.4 build for Windows that Brian Ripley made available.
The first example in the help for reshape doesn't work for me.  When I cut and
paste, this is what happens:
>      data(Indometh,package="nls")
>      summary(Indometh)
 Subject      time            conc      
2008 Dec 16
2
Syncing file with reference to another one
I have the following situation: file2 on remote host and file1 on
localhost. file1 and file2 are mostly the same. Simply running
 rsync remotehost:file2 file2
will actually transfer the entire file. But I would like to use the
factt that I have local file1 that is mostly similar to file2. I.e.
how can I make rsync to use file1 as a reference while transferring
file2? (cp file1 file2 locally and
2003 Oct 30
1
Trouble reshaping some data
I would appreciate some advice on the following task. I have
some data that currently looks like this:
  t1 <- data.frame(id=c(1,1,2,2), 
aspect=c("A","B","A","B"), score=c(10,9,11,12))
I'd like it to look like this:
  id  A  B
   1 10  9
   2 11 12
reshape() looks like a good candidate for this job but I'm
not really sure about the roles of
2002 May 20
1
Numeric ids
HI,
I had read from the rsync man page on transferring files using the user's
numeric id and gid. I have a user which resides on 2 remote sites, having
the same user names, but different uid and gid on both sites. I'm
transferring the files as a root user.
    		site A			site B	
		-----------------------------------------------
		usr_A			usr_A
		uid  = 100		uid = 200
		file1(usr_A)	
					
2017 Dec 20
1
utils::unzip ignores overwrite argument, effectively
It does give a warning, but then it overwrites the files, anyway.
Reproducible example below.
This is R 3.4.3, but it does not seem to be fixed in R-devel:
https://github.com/wch/r-source/blob/4a9ca3e5ac6b19d7faa7c9290374f7604bf0ef64/src/main/dounzip.c#L171-L174
FYI,
G?bor
dir.create(tmp <- tempfile())
setwd(tmp)
cat("old1\n", file = "file1")
cat("old2\n", file
2012 Mar 16
1
R merge two dataframes with different row?
Hi everyone,
I have a question for R code to merge.
Say I have two dataframes:
File1 is:
V1    V2    V3    V4
1    100    101    name1
2    200    201    name2
2    300    301    name3
3    400    401    name4
3    500    501    name5
4    600    601    name6
4    700    701    name7
File2 is:
V1    V2    V3    V4
1    50    55    p1
3    402    449    p2
4    550    650    p3
4    651    660   
2002 Sep 24
2
rsync to a symlink directory
Here is the structure of my servers :
Source :
/home/test1/link_dir
                sub_dir1
                      file1
                      file2
                      ...
                sub_dir2
                ...
Destination:
/home/test2/real_dir
                sub_dir1
                      file1
                      file2
                      ...
                subdir2
           
2016 Jun 09
1
for loop example
> From: Indunil Jayasooriya <indunil75 at gmail.com>
> > >
> > > [root at centos67 loop]# cat file1
> > > firstname1
> > > firstname2
> > >
> > > [root at centos67 loop]# cat file2
> > > lastname1
> > > lastname2
> > >
> > > I need a OUTPUT like this
> > >
> > >
> > >
2004 Jun 21
2
problems with --read-batch and --write-batch with --files-from
Hello,
I want to use the --read/write-batch options, but i have problems to do so.
The shell script [1] leads to the following error:
[sender] expand file_list to 131072 bytes, did move
delta-transmission disabled for local transfer or --whole-file
file1
rsync: writefd_unbuffered failed to write 64 bytes: phase "unknown":
Daten?bergabe unterbrochen (broken pipe)
rsync error: error in
2009 Dec 09
1
reshape() makes R run out of memory (PR#14121)
Full_Name: Alexander L. Belikoff
Version: 2.8.1
OS: Ubuntu 9.04 (x86_64)
Submission from: (NULL) (67.244.71.200)
I'm trying to reshape the following data frame:
ID                     DATE1             DATE2      VALUE_TYPE        VALUE
'abcd1233'         2009-11-12        2009-12-23     'TYPE1'           123.45
...
VALUE_TYPE is a string and is a factor with only 2 values
2010 Jul 27
2
[LLVMdev] inline callsites whose function definitions are in different file?
On 7/27/2010 12:40 PM, Devang Patel wrote:
> On Tue, Jul 27, 2010 at 7:46 AM, Chuck Zhao<czhao at eecg.toronto.edu>  wrote:
>>   LLVM (2.7 release version) provides 2 implementations for inlining
>> function callsites:
>>
>> - InlineSimple.cpp (-inline):               inline simple callsites
>> according to its cost analysis
>> - InlineAlways.cpp
2009 Oct 04
2
Row to Column help
Dear R Community,
I am attempting to transpose a dataset from rows to columns but am stuck. I
have tried using reshape() with little luck, possibly due to the categorical
nature of the data. For example:
id<-c(1,2,2,3,3,3)
author<-c("j","k","k","l","l","l")
2008 Apr 24
0
[LLVMdev] Compile units in debugging intrinsics / globals
Hi,
> Suppose I have the following source:
> 
> file1:
>   #include "file2"
>   #include "file3"
>   int fn1(void) ...
> 
> file2:
>   int a;
> 
> file3:
>   int fn2(void) ... 
>  
> then fn1, along with all the base types etc appear to be in compile unit
> "file1", the variable a appears to be in compile unit