Displaying 20 results from an estimated 20000 matches similar to: "error in my previous message"
2009 Feb 11
2
sorting a matrix by the column
this is a bad question but I can't figure it out and i've tried. if i
sort the 2 column
matrix , temp1, by the first column, then things work as expected. But,
if I sort the 1 column matrix, temp2, then it gets turned coerced to a
vector. I realize that I
need to use drop=FALSE but i've put it in a few different places with no
success. Thanks.
temp1 <-
2008 Mar 11
2
persp question
someone sent in a question earlier about doing
something in 3D so i took a stab at it purely
for educational purposes ( i'm not even sure that I understood the question actually ).
Unfortunately, persp gives me an error that I don't understand because it says "object y not found". I'm sending y in as a parameter to persp similar to what ?persp shows in one of oits examples
2006 Oct 17
1
looking for a cleaner way to do something
I have two numeric vectors each of length 17 and each is named the exact
same way.
so
obsnum ppppp ppppm pppmp . dot dot dot......
temp1 is 1417 52 63 85
obsnum ppppp ppppm pppmp . dot dot dot......
temp2 is 1213 41 50 97
what i want to have is a resultant matrix with 2 rows and 16 columns
where the 16
2011 Mar 29
2
List extraction
I have created a list of tables with the same columns but different number of
row.
Example (actual list has ~200 elements):
> temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04))
> temp2<- data.frame(ID=c("Herb","Shrub",
> "Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3))
> L<-list(a=temp1,b=temp2)
> L
$a
2006 Jan 04
3
matrix math
I am using R 2.1.1 in an windows XP environment.
I have 2 dataframes, temp1 and temp2.
Each dataframe has 20 variables (“cocolumns") and 525 observations (“rows”). All variables are numeric.
I want to create a new dataframe that also has 20 columns and 525 rows. The values in this dataframe should be the sum of the 2 other dataframe.
(i.e. temp1$column
2012 Oct 31
2
Aggregate Table Data into Cell Frequencies
R-help -
I have this set of aggregated tables (sample data below via dput()). And I
would like to have delayValue as the column variables with the "temp"
(temp1, temp2, temp3) values as the row variables. However I would like to
have the temp variables *aggregated into single rows* so that I have the
frequency ("Freq" | counts) of each time each "delayValue" occurs
2008 Oct 01
9
time segments intersection
Hi all,
Please, how could I calculate the time that two time segments has in
common? Is there any function to perform this calculation?
For instance, given four POSIXlt objects...
endPeriod<-as.POSIXlt("2008-09-30")
startPeriod<-as.POSIXlt("2007-10-01")
endProject<-as.POSIXlt("2007-05-31")
startProject<-as.POSIXlt("2006-12-01")
that limit
2010 Nov 19
3
Sweave Dynamic Graph Question
i have a time Series of IBM closing px from 1/1/2000 to today
I want to graph the time serie by dividing the graph by year and month
all the monthly graphs with the same year will go to one page. so from
1/1/2000 to 11/19/2010. i will have
11 pages, and each page will have 12 graphs (jan to dec) except for 2010.
I am able to do it in R, but when i use sweave, I can only print the last
page.
2006 Mar 03
1
NA in eigen()
Hi,
I am using eigen to get an eigen decomposition of a square, symmetric
matrix. For some reason, I am getting a column in my eigen vectors (the
52nd column out of 601) that is a column of all NAs. I am using the option,
symmetric=T for eigen. I just discovered that I do not get this behavior
when I use the option EISPACK=T. With EISPACK=T, the 52nd eigenvector is
(up to rounding error) a
2009 May 28
2
Replace is leaking?
Okay, someone explain this behaviour to me:
Browse[1]> replace(rep(0, 4000), temp1[12] , temp2[12])[3925]
[1] 0.4462404
Browse[1]> temp1[12]
[1] 3926
Browse[1]> temp2[12]
[1] 0.4462404
Browse[1]> replace(rep(0, 4000), 3926 , temp2[12])[3925]
[1] 0
For some reason, R seems to shift indices along when doing this replacement.
Has anyone encountered this bug before? It seems to crop up
2011 Mar 09
2
Anomaly with unique and match
I stumbled onto this working on an update to coxph. The last 6 lines
below are the question, the rest create a test data set.
tmt585% R
R version 2.12.2 (2011-02-25)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
# Lines of code from survival/tests/singtest.R
> library(survival)
Loading required package: splines
2008 Aug 26
1
parse and eval character vector
Dear R-help,
I have a character vector, some elements will be numeric, some not,
and some even empty. E.g.:
temp1 <- c("abcd"," 2 ","")
I'm only interested in the numeric elements, the rest I can just throw
away. It is easy enough to loop through the vector:
temp <- try(eval(parse(text=temp1[1])), silent=TRUE); class(temp) # try-error
temp <-
2012 Nov 07
1
Issues with Heat Map Images
Hello,
I have a large data set from RNA sequencing and I am trying to make a heat
map of my data. I have am having issues formatting my heat map figure. My
data set is large with the log2 fold change for over 6oo genes across 4
treatments. My csv file is formatted as such:
Gene Drought Ozone
Temp1 Temp2
Glyma0041s00260
2005 Nov 23
2
vector of permutated products
Given an x-vector with, say, 3 elements, I would like to compute the
following vector of permutated products
(1-x1)*(1-x2)*(1-x3)
(1-x1)*(1-x2)*x3
(1-x1)*x2*(1-x3)
x1*(1-x2)*(1-x3)
(1-x1)*x2*x3
x1*(1-x2)*x3
x1*x2*(1-x3)
x1*x2*x3
Now, I already have the correctly sorted matrix of permutations! So, the
input looks something like:
#input
x<-c(0.3,0.1,0.2)
Nx<-length(x)
Ncomb<-2^Nx
2005 Dec 29
1
Problems with calloc function.
Hi all,
I have a C code in Linux, it has 7 pointers and compile e run OK, but when I
run in R happens problems with calloc function, it returns NULL.
###############################################
> int *temp1,*temp2,*temp3,*temp4;
temp1 = (int *)calloc(col,sizeof(int));
if(temp1 == NULL){
printf("\n\n No Memory1!");
exit(1);
}
temp2 = (int *)calloc(col,sizeof(int));
2006 Oct 16
1
Bugs with partial name matching during partial replacement (PR#9299)
This is a rather interesting, but I don't think it is a bug - it is
just things that "you are not supposed to do"... you are assuming
a certain evaluation order of the 4 "$" operators in
" D$ABC[D$M] = D$V[D$M] " as in:
temp1 <- D$M # 2nd and 4th
temp2 <- D$V[temp1] # 3rd
D$ABC[temp1] = temp2 # 1st
What R did was this:
2011 May 14
1
Identify Objects that end with .f (and all caps)
Dear R Helpers,
I am trying to find a way to identify all the objects in my environment
that are all caps and then end with .f. I can do the all caps part pretty
easily, but I have tried a number of variations on the \ and can't get a
recognition of that operator. As a simple example
A.f<-"foo1"
AA.f<-"foo2"
aa.f<-"foo3"
A.a<-"foo4"
ls()
2015 Jul 09
3
[LLVMdev] New backend help request.
I'm trying to figure out how to map more complex CISC instructions now. For
example on the 68000, you have things like --
add.w (a0)+,(a1)+
So that equates to:
temp1 = load a0
add 2, a0
temp2 = load a1
temp1 = add temp1, temp2
store temp1, a1
add 2, a1
How do I express that in a form for LLVM?
I see things like pre_store and post_store, but I cant find anything in the
way of documentation
2025 Jan 28
1
R CMD check says no visible binding for global variable
Naresh,
I am not sure how you are creating your data.frame so it has no, I think, column names. There are two scenarios including one where it is not really a valid data.frame and one where it can be handled before any other use as shown below. If it cannot be used, you might need to modify how your SQL or the function you call creates it so it includes either names it chooses or that you supply.
2010 Oct 17
4
how to convert string to object?
temp = "~aparch("
temp1 = paste(temp,1, sep = "")
temp2 = paste(temp1,1, sep = ",")
temp3 = paste(temp2, ")",sep = "")
temp 3 is a character but I want to convert to formula object. How do I do
this?
--
View this message in context: http://r.789695.n4.nabble.com/how-to-convert-string-to-object-tp2999281p2999281.html
Sent from the R help mailing