Re: [R] error to convert a Compute A^-1 B from Matlab to R using solve(A, B)

2012-07-02 Thread Jessica Streicher
Have a look at ?solve and see: a a square numeric or complex matrix containing the coefficients of the linear system. your a isn't square. The help also mentions qr.solve for non-square matrices. greetings Jessi On 02.07.2012, at 13:38, gianni lavaredo wrote: > Dear Researchers, > >

Re: [R] Error() model is singular - what does that mean

2012-07-02 Thread Jessica Streicher
Just looking at it i would try renaming Task-Kind, Data-Kind an Time-Taken Those are ambiguous in the Formula. "Task-Kind" vs "Task" - "Kind" Though that might not be the error at hand :) On 02.07.2012, at 14:15, zetwal wrote: > Hello > > I have some test data that looks like that from a with

Re: [R] Error() model is singular - what does that mean

2012-07-02 Thread Jessica Streicher
Also, try googling for - R model is singular - , there seem to have been a lot of people with that particular error. On 02.07.2012, at 14:56, Jessica Streicher wrote: > Just looking at it i would try renaming Task-Kind, Data-Kind an Time-Taken > Those are ambiguous in the Formula. >

Re: [R] Printing from R Console in colour

2012-07-04 Thread Jessica Streicher
I would guess that that highly depends on -what exact "console" you have -where exactly you paste it For example, if i copy stuff from my console (Eclipse plugin StatEt) into this Mailprogram, it is still colored. With programs similar to word, they usually have paste options that tell you what

Re: [R] function on strsplit output

2012-07-06 Thread Jessica Streicher
sap<-sapply(strsplit(m,","),as.numeric) sap[which(sap <= 3)]<-0 mNew<-matrix(apply(sap,2,FUN=function(x){paste(x,collapse=",")}),ncol=4) works? On 06.07.2012, at 08:47, Sarah Auburn wrote: > Hi, > I am trying to format some data (example matrix "m" below) for which each > data point has 2 assoc

Re: [R] function on strsplit output

2012-07-06 Thread Jessica Streicher
Could also do it in one apply i realized.. apply(m,1:2,FUN=function(x) {y<-as.numeric(strsplit(x,split=",")[[1]]);y[which(y <= 3)]<-0;paste(y,collapse=",")}) On 06.07.2012, at 10:18, Jessica Streicher wrote: > sap<-sapply(strsplit(m,","),as.nume

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-09 Thread Jessica Streicher
Since its something about the Hessian, and occurs in the vcov() call, have you thought about the note: "The vcov method uses the approximate Hessian: for reliable results the model matrix should be sensibly scaled with all columns having range the order of one. " ? I'm sorry i can't help you

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-10 Thread Jessica Streicher
Hi Jeremy, newData<-data.frame(JVeg5=factor(Jdata[,"JVeg5"]),scale(Jdata[,c("Elevation","Lat_Y_pos","Coast_dist","Stream_dist")])) Global <- polr(JVeg5 ~ Elevation + Lat_Y_pos + Coast_dist + Stream_dist, data=newData, na.action = na.omit, Hess = TRUE) summary(Global) Does this

[R] define stuff to be only usable in the same file

2012-07-10 Thread Jessica Streicher
Hello R-Help! I've looked around and have not found: A simple(short) way to hide functions and variables from the global environment. What i want is for a few of them to only be accessable from the scriptfile they're in. I probably could do fun things with environments , but that seems quite a

Re: [R] define stuff to be only usable in the same file

2012-07-10 Thread Jessica Streicher
On 10.07.2012, at 15:24, Duncan Murdoch wrote: > On 12-07-10 9:13 AM, Jessica Streicher wrote: >> Hello R-Help! >> >> I've looked around and have not found: >> >> A simple(short) way to hide functions and variables from the global >> environment.

Re: [R] define stuff to be only usable in the same file

2012-07-10 Thread Jessica Streicher
On 10.07.2012, at 16:45, Jessica Streicher wrote: > > On 10.07.2012, at 15:24, Duncan Murdoch wrote: > >> On 12-07-10 9:13 AM, Jessica Streicher wrote: >>> Hello R-Help! >>> >>> I've looked around and have not found: >>> >>> A

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-11 Thread Jessica Streicher
On 11.07.2012, at 05:11, Jeremy Little wrote: > > Dear Jessica > > thank you for the scale solution to my problem. > > I tried to manually scale my data (scaling up and removing decimals), > however, this resulted in the same error message. > > It remains vague to me w

Re: [R] define stuff to be only usable in the same file

2012-07-11 Thread Jessica Streicher
On 10.07.2012, at 17:02, Jessica Streicher wrote: > > On 10.07.2012, at 16:45, Jessica Streicher wrote: > >> >> On 10.07.2012, at 15:24, Duncan Murdoch wrote: >> >>> On 12-07-10 9:13 AM, Jessica Streicher wrote: >>>> Hello R-Help! >>>>

Re: [R] define stuff to be only usable in the same file

2012-07-11 Thread Jessica Streicher
Thanks Barry, that helped a lot, modified it a bit and it does pretty much what i wanted. On 11.07.2012, at 15:08, Barry Rowlingson wrote: > On Tue, Jul 10, 2012 at 4:02 PM, Jessica Streicher > wrote: > >> >> Forget about that, i'm stupid and can't use the too

Re: [R] Substitute list value

2012-07-13 Thread Jessica Streicher
two things: - R always counts from 1, not from 0 - listmembers are accessed by using [[ ]] , not [ ] try t1[t==ll[[1]], "v"] <- 99 greetings Jessi On 11.07.2012, at 15:47, Charles Stangor wrote: > I can't seem to determine how to get the name of a list member to > substitute: > > ll <- lis

Re: [R] Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'

2012-07-13 Thread Jessica Streicher
You could probably make them numeric, like > v<-c("a","a","b","c") > f<-factor(v) > as.numeric(f) [1] 1 1 2 3 to get a numeric "rock_id", but i wouldn't per se recommend it. You should ask someone who knows more about the scientific side of this method to tell you how factorial data is proper

Re: [R] ROC curves with ROCR

2012-07-16 Thread Jessica Streicher
Wild guess : You need to have some kind of score for ROC to work (so you can work with a threshold), so a predict() that only returns classlabels probably won't work. On 13.07.2012, at 15:25, blerta wrote: > Hi, > > I don't really understand how ROCR works. Here's another example with a > ran

Re: [R] histogram of time-stamp data

2012-07-16 Thread Jessica Streicher
pDates<-as.POSIXct(times,format="%H:%M:%S") > hist(pDates,"hours") On 16.07.2012, at 10:47, e-letter wrote: > Readers, > > A data set consists of time-stamp values: > > 00:00:00 > 23:11:00 > 06:22:00 > > The data set was imported: > > timestamps<-read.table("path/to/timestampsvalues") > hist(

Re: [R] R help

2012-07-16 Thread Jessica Streicher
https://stat.ethz.ch/mailman/listinfo/r-help at the bottom… On 16.07.2012, at 10:52, Sébastien Morant wrote: > hi > would you please remove my email from the mailing list. > thanks in advance > Sebastien > > [[alternative HTML version deleted]] > > ___

Re: [R] Format Date with Time

2012-07-16 Thread Jessica Streicher
?Date ?POSIXct and here you can find the formatting symbols: http://stat.ethz.ch/R-manual/R-patched/library/base/html/strptime.html On 16.07.2012, at 15:26, Lauren Vogric wrote: > How do I format "5/1/2012 8:00:00 PM" into a date? > > > [[alternative HTML version deleted]] > >

Re: [R] how to create table with file link in Rd File

2012-07-17 Thread Jessica Streicher
I think you need to elaborate a bit. At least I get no idea of what you want from that one sentence. On 17.07.2012, at 13:44, purushothaman wrote: > Hi > > how to create table with file link in Rd File > > Thanks > B.Purushothaman > > -- > View this message in context: > http://r.789695.n4

Re: [R] how to create table with file link in Rd File

2012-07-17 Thread Jessica Streicher
Try again please, so you have a table/dataframe or some such with 4(?) columns: module_name, class_name, function_name and function_description I guess under the second line shall be an example of data in the table, but i cannot see what belongs to what column. If you have an example table alre

Re: [R] how to create table with file link in Rd File

2012-07-17 Thread Jessica Streicher
Oh, i think i get it now, you're talking about formatting a table in a documentation file? On 17.07.2012, at 14:45, purushothaman wrote: > Hi, > > i need to create table like this > > -

Re: [R] how to create table with file link in Rd File

2012-07-17 Thread Jessica Streicher
Yepp, that makes much more sense, look at Eiks post for an answer. I'm terribly sorry, i confused Rd with RData. On 17.07.2012, at 15:18, Jessica Streicher wrote: > Oh, i think i get it now, you're talking about formatting a table in a > documentation file? > > O

Re: [R] problem with using apply for dataframe

2012-07-19 Thread Jessica Streicher
apply(mydataframe,2,function(x){ print(x);is.factor(x)}) [1] "1" "2" "3" "4" [1] "16.99" "10.34" "21.01" "23.68" [1] "1.01" "1.66" "3.50" "3.31" [1] "Male" "Male" "Male" "Female" X total_billtipsex FALSE FALSE FALSE FALSE > sapply(mydataframe,fu

[R] Boxplot names

2012-07-19 Thread Jessica Streicher
When i make Boxplots with a lot of boxes, the names of them get only written down every second "column". Since they aren't in any way ordered, you don't see anymore to what they belong. example: l<-rep(list(1:5),20); boxplot(l,names=sample(20,1:20)) Is there a way to show them all, or do i have

Re: [R] Boxplot names

2012-07-19 Thread Jessica Streicher
Copied the wrong lines, sry l<-rep(list(1:5),20); boxplot(l,names=sample(1:20,20)) of course. thanks for the answer . On 19.07.2012, at 16:17, Peter Ehlers wrote: > On 2012-07-19 06:58, Jessica Streicher wrote: >> When i make Boxplots with a lot of boxes, the names of them get

[R] "as.numeric"

2011-07-12 Thread Jessica Lam
V96 V97 V98 V99 1 16.8467742 17.5853166 19.7400328 21.7277241 21.5015489 19.1922102 20.3351524 18.1615471 18.5479946 16.8983887 > as.numeric(PE[1,90:99]) [1] 11 10 11 10 11 9 10 9 9 8 How can I solve the above problem?? Thanks so much!

Re: [R] "as.numeric"

2011-07-12 Thread Jessica Lam
It works well. Thanks so much. -- View this message in context: http://r.789695.n4.nabble.com/as-numeric-tp3661739p3662671.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

Re: [R] Execute a function

2012-07-20 Thread Jessica Streicher
You mean executing the function for all combinations of values? For example, if you have a<-b<-c<-1:2 you would get back the values of myfunc(1,1,1) myfunc(1,1,2) myfunc(1,2,1) myfunc(1,2,2) myfunc(2,1,1) myfunc(2,1,2) myfunc(2,2,1) myfunc(2,2,2) ? On 20.07.2012, at 13:05, carla moreira wrote:

Re: [R] Execute a function

2012-07-20 Thread Jessica Streicher
Well, what do you want to control there? Need a subset? Need an ordering? On 20.07.2012, at 15:00, Carla Moreira wrote: > Yes, I do. > > But I need to control how the permutations are done. > > Thank you. > > 2012/7/20 Jessica Streicher > You mean execut

Re: [R] Only one class shown in SVM plot?

2012-07-26 Thread Jessica Streicher
example but a wild guess: if your class information is numeric the default is to do eps-regression, not classification. Use factors or specify the type you want to use. ?svm might help there. On 25.07.2012, at 15:31, Meffy wrote: > Hello users! > I'm calculating a simple model using svm(

Re: [R] Only one class shown in SVM plot?

2012-07-27 Thread Jessica Streicher
Now i'm scratching my head as well, thought it might have to do with scaling at first, so i turned it off, and also tried scaling the data for the plot instead, but to no avail, it just switches the color, but doesn't show the correct contours. And it is at least predicting the stuff right, so

Re: [R] Only one class shown in SVM plot?

2012-07-27 Thread Jessica Streicher
) For example will let you view a bit of that separating plane. I'm not getting creative on how to find the best values there though.. On 27.07.2012, at 10:21, Jessica Streicher wrote: > Now i'm scratching my head as well, thought it might have to do with scaling > at first, s

Re: [R] Solving quadratic equation in R

2012-07-27 Thread Jessica Streicher
You could have googled "R solve equation", and would have easily reached http://r.789695.n4.nabble.com/R-solve-equation-td882585.html and would have in there found something like this: > z <- matrix(c(-8.313,-1,1), ncol=1) > polyroot(z) [1] 3.42626+0i -2.42626+0i > p<-polyroot(z) > p^2-p [1] 8.

[R] kernlab kpca predict

2012-07-31 Thread Jessica Streicher
Hi! The kernlab function kpca() mentions that new observations can be transformed by using predict. Theres also an example in the documentation, but as you can see i am getting an error there (As i do with my own data). I'm not sure whats wrong at the moment. I haven't any predict functions wri

Re: [R] kernlab kpca predict

2012-07-31 Thread Jessica Streicher
rmind. On 31.07.2012, at 16:25, Jessica Streicher wrote: > Hi! > > The kernlab function kpca() mentions that new observations can be transformed > by using predict. Theres also an example in the documentation, but as you can > see i am getting an error there (As i do with my own data). I&

Re: [R] Why the result is coming as NULL?

2012-08-01 Thread Jessica Streicher
I assume "result" means the invalid variable. works with sample data frame i made, so please provide an example of cdb_frame. You can use dput(cdb_frame) for that, or dput(head(cdb_frame)) if you have a lot of data. For example it could be that $Publication is a string, not numeric. On 01.08.2

Re: [R] Subseting

2012-08-02 Thread Jessica Streicher
On 02.08.2012, at 10:44, Akhil dua wrote: > Hi everyone > > I have banking data set in long format with 4 columns.One of these columns > is bank name which consist of 49 banks and I want the data for only 40 > banks out of these 49 > so can anyone help me on how to get this 40 banks data > > My

Re: [R] Subseting

2012-08-02 Thread Jessica Streicher
help? You really aren't explaining your problem well^^ On 02.08.2012, at 11:18, Akhil dua wrote: > sry its not firms > its banks > > On Thu, Aug 2, 2012 at 2:42 PM, Jessica Streicher > wrote: > > On 02.08.2012, at 10:44, Akhil dua wrote: > > > Hi everyone &g

Re: [R] Subseting

2012-08-02 Thread Jessica Streicher
; I dotn want to take the pain of writing names of 40 companies > rather than this i want to remove the date for 9 companies which i dont need > > On Thu, Aug 2, 2012 at 3:00 PM, Jessica Streicher > wrote: > data[data$Name %in% names, ] > > should work then. You do know

Re: [R] Sum two Vectors of different length

2012-08-03 Thread Jessica Streicher
Is the Index of what you cut off or add unimportant or do you have indices on which to compare them? If you just want to have the same length, not depending on any indices: v1<-1:9 v2<-1:10 minlength<-min(length(v1),length(v2)) v1[1:minlength]+v2[1:minlength] If indices are important: names(v

Re: [R] Sum two Vectors of different length

2012-08-03 Thread Jessica Streicher
Actually this might be shorter for working with indices: v1[names(v1)%in%names(v2)]+v2[names(v2)%in%names(v1)] On 03.08.2012, at 15:41, Petr PIKAL wrote: > Hi > > Your description is quite long but almost uninformative about what you > really want. > > You do not say which values you want to

Re: [R] how to identify values from a column of a dataframe, and insert them in other data.frame with the corresponding id?

2012-08-03 Thread Jessica Streicher
?merge and ?unique might help however: why is calee_id a floating point number? Ids are usually stuff thats close to a factor, integers, strings and the like, you know stuff that has a value that isn't dependant on precision. Floating points might just complicate things.. On 03.08.2012, at 12

Re: [R] Interpreting predictions of svm

2012-08-08 Thread Jessica Streicher
You should give us the data is what you should do :) Aside from that: you can only make probability predictions if you activated it when making the model. On 07.08.2012, at 17:23, Camomille wrote: > Hi, I have some difficulties in interpreting the prediction of a svm model > using the package

Re: [R] Coloring specific cells

2012-08-08 Thread Jessica Streicher
If its just a few tables, can't you just copy the text and color it in PowerPoint? If you'd like Latex output i could help maybe, but i'm not sure what you expect. On 08.08.2012, at 14:19, namit wrote: > Hi , > > > I have a data frame XYZ. i want to color the cells where ever we find "G" it

Re: [R] How can we compare two vectors?

2012-08-08 Thread Jessica Streicher
> x=c(5, 8, 28, 29, 30) > y=c(5, 8, 28, 29, 31) > x==y [1] TRUE TRUE TRUE TRUE FALSE > which(x==y) [1] 1 2 3 4 > which(x!=y) [1] 5 > x[x!=y] [1] 30 > y[x!=y] [1] 31 RTFM! - just kidding ;) also, this might not work for floating point numbers, theres a section in the documentation/fa

Re: [R] Imputing data below detection limit

2012-08-13 Thread Jessica Streicher
Tempting a use of let me google that for you.. Anyway, theres a package called Imputation. I myself used the zoo package. There are probably lots of others since its a real common problem. They usually fill in places in you data that are designated as NA. I do not completely understand what yo

Re: [R] significance of character (Anova)

2012-08-13 Thread Jessica Streicher
Also, since there apparently were warnings, how about adding them? On 13.08.2012, at 16:34, peter dalgaard wrote: > > On Aug 13, 2012, at 15:38 , Jennifer Kaiser wrote: > >>> Model: poisson, link: log >>> >>> Response: sb_ek_ber >>> >>> Terms added sequentially (first to last) >>> >>> >>>

Re: [R] Column Extraction from matrix

2012-08-16 Thread Jessica Streicher
set.seed(2) a=matrix(rnorm(400),ncol=100) #use a list aList<-list() for(i in 1:dim(a)[2]){ aList[[i]]<-matrix(a[,i],ncol=2) } #get lots of variables for(i in 1:dim(a)[2]){ assign(paste("a",i,sep=""),matrix(a[,i],ncol=2)) } On 16.08.2012, at 08:07, bantex wrote: > Hi all, > > I

Re: [R] no true negative data, need roc curve

2012-08-16 Thread Jessica Streicher
To clarify: Is TN = 0 or do you not know TN (N)? On 16.08.2012, at 11:51, vjyns wrote: > Hi, > > I want to plot ROC curve for my detection algorithm which detects > features in different images at two different thresholds. > > 6 different images used and obtained tp, fp and fn. No tn in my c

Re: [R] no true negative data, need roc curve

2012-08-17 Thread Jessica Streicher
than in threshold 1. It needs to be the same, so what the hell have you DONE? ^^ greetings Jessi On 16.08.2012, at 17:49, Jessica Streicher wrote: > To clarify: > > Is TN = 0 or do you not know TN (N)? > > On 16.08.2012, at 11:51, vjyns wrote: > >> Hi, >>

[R] The message headers matched a filter rule

2012-08-17 Thread Jessica Streicher
Pretty much every time i reply to a post in this list i get a bounce saying the above, + waiting for approval. I first thought it was because i didn't send in plain, but now they are and it hasn't become any better. Any other ideas? Is this normal? __

Re: [R] no true negative data, need roc curve

2012-08-17 Thread Jessica Streicher
Above mentioned formula is wrong - maybe a typo http://en.wikipedia.org/wiki/Receiver_operating_characteristic The false positive rate is the rate of false positives, meaning how many of the total negatives (all in reality negatives(N), that is, all negatives falsely classified as positives(fp)

Re: [R] no true negative data, need roc curve

2012-08-20 Thread Jessica Streicher
ow to plot points and lines, whats there more to explain? You can use the commands ?plot ? points ?lines and so on to find help on it. On 17.08.2012, at 13:18, Jessica Streicher wrote: > Above mentioned formula is wrong - maybe a typo > http://en.wikipedia.org/wiki/Receiver_operating_cha

Re: [R] colorful plot

2012-08-20 Thread Jessica Streicher
Dear Nooshin, most attachments will not make it into the list. Please upload it somewhere and link to it instead. alternatively you could post reproducible code to generate your plot so far. On 20.08.2012, at 15:53, nooshin bahar wrote: > Hello guys, > > I want to increase contrast of colors i

Re: [R] colorful plot

2012-08-21 Thread Jessica Streicher
filled.contour(Nooshin, main="Permeability",color.palette=rainbow) filled.contour(Nooshin, main="Permeability",color.palette=terrain.colors) filled.contour(Nooshin, main="Permeability",color.palette=topo.colors) not quite sure what to do with the heat map, but it has a "col" attribute. On 21.08.2

Re: [R] Create and Assign value into a variable from Another variable

2012-08-28 Thread Jessica Streicher
This? > x<-"y" > assign(x,1) > y [1] 1 On 28.08.2012, at 10:16, Bert Gunter wrote: > Post a small reproducible example to clarify what you want to do. > > -- Bert > > On Mon, Aug 27, 2012 at 11:48 PM, Rantony wrote: >> Hi, >> >> Here i have a variable named "MyVariable" containing particula

Re: [R] Create and Assign value into a variable from Another variable

2012-08-28 Thread Jessica Streicher
I'm not quite sure what you expect as a result there.. On 28.08.2012, at 12:34, Akkara, Antony (GE Energy, Non-GE) wrote: > Ok. > Here I have a variable called "Variable_1". > > Variable_1 <- "MyDataFrame" > > Here I want to create another variable, by assigning the value of > "Variable_1" . >

Re: [R] Mailing List

2012-09-05 Thread Jessica Streicher
Since noone but you knows what you are interested in - unlikely. You could try to set up your mailclient with rules, deleting mails coming from the list that do not contain certain keywords. On 05.09.2012, at 12:00, Marcus Tullius wrote: > Hello there, > > is there a way I can erase my name fr

Re: [R] normalization of multi-value string variable

2012-03-27 Thread Jessica Streicher
having too many to properly compute the svm, you might try to reduce it by other methods, PCA comes to mind for example, though i never used that on "binary" data before. Am 27.03.2012 um 11:34 schrieb Alekseiy Beloshitskiy: > Thank you so much, Jessica, > > The specific of

[R] Making Knitr work

2012-03-28 Thread Jessica Streicher
Might not be the best place to ask, but i could get lucky.. I have setup an eclipse environment to write sweave files lately and wanted to switch to knitr. I could get it to work on easy files, but my earlier written sweave file fails to be knit properly. Here is the error message: Quitting fr

Re: [R] Making Knitr work

2012-03-28 Thread Jessica Streicher
mes, IA > > > > On Wed, Mar 28, 2012 at 11:09 AM, Jessica Streicher > wrote: >> Might not be the best place to ask, but i could get lucky.. >> >> I have setup an eclipse environment to write sweave files lately and wanted >> to switch to knitr. I c

[R] e1071 tune.control() random parameter

2012-04-03 Thread Jessica Streicher
I'm not sure what the parameter specifies: random if an integer value is specified, random parameter vectors are drawn from the parameter space. What are the parameter vectors and what is the parameter space? What means drawn? greetings Jessi [[alternative HTML version deleted]]

Re: [R] e1071 tune.control() random parameter

2012-04-03 Thread Jessica Streicher
an do what i want to do already. But it COULD be something useful, after all it is the first argument of the function^^ On 03.04.12 14:13, Alekseiy Beloshitskiy wrote: Hello, Jessica, Can you please elaborate what you're trying to find with that function. If e.g. you want to find best p

Re: [R] plotting multiple plot in same graph

2012-04-10 Thread Jessica Streicher
Hello Arunkamar! Basically: plot(x1,y) lines(x2,y) lines(x3,y) You might need to adjust the first plot so all data is shown. For that you could use something like plot(c(min(x),max(x)) , c(min(y),max(y)),type="n") x is all data from x1,x2,x3. type="n" says that these points won't be shown in t

Re: [R] Creating a loop with an indefinite end term

2012-04-10 Thread Jessica Streicher
http://cran.r-project.org/doc/manuals/R-lang.html#while i<-2 while(value <=100){ num[i] <- num[i-1] +5 value <- num[i] i <- i+1 } something like this? greetings Jessi Am 10.04.2012 um 16:48 schrieb Steve Lavrenz: > Everyone, > > I'm very new to R, especially when it c

Re: [R] cbind, data.frame | numeric to string?

2012-04-10 Thread Jessica Streicher
Still didn't work for me without cbind , although you really don't need it ;) worked after i set options(stringsAsFactors=F). > options(stringsAsFactors=F) > df<-data.frame(intVec,chaVec) > df intVec chaVec 1 1 a 2 2 b 3 3 c > df$chaVec [1] "a" "b" "c" documentat

Re: [R] Creating a loop with an indefinite end term

2012-04-10 Thread Jessica Streicher
> x<-numeric(1) > x [1] 0 > x[2]<-2 > x [1] 0 2 you don't really need to define the length? Am 10.04.2012 um 17:45 schrieb Albyn Jones: > Here are a couple of constructions that work. > > albyn > === > > num <- rep(0,10) > for (i in 2:10) { >

[R] Centering (e.g. on prcomp)

2012-04-12 Thread Jessica Streicher
ilable. So how would i properly transform it? greetings Jessica __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, min

Re: [R] Centering (e.g. on prcomp)

2012-04-12 Thread Jessica Streicher
Ah.. forget it, something must have gone wrong while i was testing (probably messed up some apply()). Seems you can just subtract the returned means - i hope at least. Am 12.04.2012 um 14:30 schrieb Jessica Streicher: > Hi! > > I'm doing a PCA on some testdata (only 2 features

Re: [R] Splitting data into test and train (80:20) kepping attributes similar

2012-04-25 Thread Jessica Streicher
Well, it throws an error, because there is no such function in default R. A bit of googling showed it might be the one in the caTools package. execute this: install.packages("caTools") library(caTools) before executing your code Am 25.04.2012 um 12:39 schrieb Dwaipayan Dasgupta: > Hi, > Could

Re: [R] Splitting data into test and train (80:20) kepping attributes similar

2012-04-25 Thread Jessica Streicher
rights to upgrade to the newest version. > Is there anything else I can try? Im trying to split my data into 80:20 > keeping the ratio of 0,1 in the Y variable(binary) constant. > > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.or

Re: [R] Basic matrix manipulation problem

2012-04-26 Thread Jessica Streicher
> M [,1] [,2] [,3] [,4] x 1.75 2.25 3.25 3.75 y 6.25 6.75 7.25 7.75 plot(t(M)) Does just fine for me oO then again, as you write it, you actually have a data frame there.. so.. > D AAB BAB CCD DCD x 1.75 2.25 3.25 3.75 y 6.25 6.75 7.25 7.75 plot(t(D)) Does just fine for me as well oO

Re: [R] Splitting data into test and train (80:20) kepping attributes similar

2012-04-26 Thread Jessica Streicher
set but throws up an error of > Warning message: > In rbind(s1, s2) : > number of columns of result is not a multiple of vector length (arg 2) > > I understand that I am trying to append vectors of unequal vector lengths but > don’t know how to work around this process.

Re: [R] repeat matrix rows as a whole

2012-04-26 Thread Jessica Streicher
a <- matrix(1:8, 2, 4, byrow=TRUE) b<-t(a) r<-rep(b,5) # can insert anything for 5 matrix(r,ncol=dim(a)[2],byrow=T) [,1] [,2] [,3] [,4] [1,]1234 [2,]5678 [3,]1234 [4,]5678 [5,]1234 [6,]5678

Re: [R] Splitting data into test and train (80:20) kepping attributes similar

2012-04-26 Thread Jessica Streicher
Ad_1 <- subset(Attrition_data_1,Attrition_ind=="1") Ad_0 <- subset(Attrition_data_1,Attrition_ind=="0") s1<-sample(1:dim(Ad_0)[1],0.8*dim(Ad_0)[1])# 80% of the non-attrites s2<-sample(1:dim(Ad_1)[1],0.8*dim(Ad_1)[1])# 80% of attritees s3<- Ad_0 [-s1,] summary(s3) s4<- Ad_1 [-s2,] summary(s4)

[R] kernlab kpca code

2012-04-26 Thread Jessica Streicher
Hi! how do i get to the source code of kpca or even better predict.kpca(which it tells me doesn't exist but should) ? (And if anyone has too much time: Now if i got that right, the @pcv attribute consists of the principal components, and for kpca, these are defined as projections of some rando

Re: [R] kernlab kpca code

2012-04-26 Thread Jessica Streicher
Thanks a lot, totally forgot cran there. Hm.. so they're multiplying some specifically computed Kernelmatrix with the pcv's.. interesting.. too tired to check the math there, guess i'll just accept its possible and go to sleep. Am 26.04.2012 um 18:10 schrieb Steve Lianoglou

[R] Where would i put feature requests for a library?

2012-04-27 Thread Jessica Streicher
Hi! If i found a problem with the code of one of the libraries (not core), or, in my current case, would wish something minor changed for convenience, where can i get contact? Can i put it in the "official" bug repository? (Problem discription for anyone interested: Why call the default functio

[R] error fitting coxph model

2012-05-02 Thread Jessica Myers
e outcome that I'm using has almost everyone having an event (~98,000 events out of 100,000). I have fit other models like this with no problem, but on one particular dataset it fails. Thanks! Jessica Myers Instructor in Medicine Brigham and Women's Hospital The information in

Re: [R] `mapply(function(x) function() x, c("a", "b"))$a()' returns `"b"'

2012-05-03 Thread Jessica Streicher
As i see it you will save the actual "text" of the function - and when you call it later on it takes the last value of x it has encountered as the value. I guess you want the x not to be saved as x, but as "a" or "b", so, as its value. I am not sure how to do that however as of yet. Am 03.05.2

Re: [R] `mapply(function(x) function() x, c("a", "b"))$a()' returns `"b"'

2012-05-03 Thread Jessica Streicher
Now.. i just tried around and this might be a bit strange way to do things.. createFunc<-function(v){ v_out<-NULL for(i in v){ v_out[[i]]<-substitute(function(){x},list(x=i)) } return(v_out) } > y<-createFunc(c("a","b")) > y $a function() { "a"

Re: [R] `mapply(function(x) function() x, c("a", "b"))$a()' returns `"b"'

2012-05-03 Thread Jessica Streicher
So, to get back to mapply: eval(mapply(function(x) substitute(function() z,list(z=x)), c("a", "b"))$a)() or like this: mapply(function(x) eval(substitute(function(i) z*i,list(z=x))), c(2,3))[[1]](2) Am 03.05.2012 um 16:02 schrieb Jessica Streicher: > Now.. i just trie

Re: [R] error fitting coxph model

2012-05-03 Thread Jessica Myers
th df = 2 and df = 4. Thanks, Jessica On May 3, 2012, at 10:00 AM, David Winsemius wrote: On May 2, 2012, at 3:02 PM, Jessica Myers wrote: Hi, I am using coxph from the survival package to fit a large model (100,000 observations, ~35 covariates) using both ridge regression (on binary covar

[R] pdf, pairs and subfloats

2012-05-03 Thread Jessica Streicher
Hi there! I have found a trange problem with getting pairs()-plots to show properly in latex \subfloat environments. If i generate images of these plots with pdf() and include them in subfloats, they will either show up in grayscale, or sometimes the datapoints of the pairplots are missing. Mi

Re: [R] pdf, pairs and subfloats

2012-05-03 Thread Jessica Streicher
I was bored and have tried doing it with console and texworks (also uses pdflatex) texworks preview shows it properly colored, but in acrobat reader it is black and white again. Still scratching my head.. Am 03.05.2012 um 17:14 schrieb Jessica Streicher: > Hi there! > > I have found

Re: [R] How to plot PCA output?

2012-05-07 Thread Jessica Streicher
That depends on what you want to plot there. Basically, you could just use plot() with pcaResult$x. You might need to define which PCs you want to plot there though. pcaResult<-prcomp(iris[,1:4]) plot(pcaResult$x) # gives the first 2 PCs plot(pcaResult$x[,2:3]) #gives the second vs the 3rd PC o

Re: [R] How to plot PCA output?

2012-05-07 Thread Jessica Streicher
To add: If thats not it, maybe you could be a bit more specific about what you consider the "result", and how you want it visualized. Am 07.05.2012 um 15:24 schrieb Jessica Streicher: > That depends on what you want to plot there. Basically, you could just use > plot() with

Re: [R] How to plot PCA output?

2012-05-07 Thread Jessica Streicher
singular values as computed by princomp. Normally 0 <= scale <= 1, and a warning will be issued if the specified scale is outside this range. Am 07.05.2012 um 16:01 schrieb Christian Cole: > Hi Jessica, > > Yes, that does help. It confirms my digging around in the prcomp obj

Re: [R] How to plot PCA output?

2012-05-07 Thread Jessica Streicher
se, i wouldn't use that scaling, just use what the prcomp() or princomp() function returns to you. Am 07.05.2012 um 16:11 schrieb Jessica Streicher: > Biplot, depending on what parameters you give it, scales the data in a > certain way. > > See > http://stat.ethz.ch/R-manua

Re: [R] Renaming names in R matrix

2012-05-15 Thread Jessica Streicher
example: > x<-c(1,1,1) > y<-c(2,2,2) > m<-rbind(x,y) > m [,1] [,2] [,3] x111 y222 > dimnames(m) [[1]] [1] "x" "y" [[2]] NULL > dimnames(m)[[1]]<-c("a","b") > m [,1] [,2] [,3] a111 b222 Am 15.05.2012 um 11:19 schrieb Gundala Viswanath: > I ha

[R] random time serie

2008-06-04 Thread jessica . gervais
know if there is a specific R - function for that ? Many thanks in advance, Jessica _ Jessica Gervais Tel: +352- 425991-628 Mail: [EMAIL PROTECTED] Resource Centre for Environmental Technologies, Public Research Centre Henri Tudor, Technoport Schlassgoart

[R] Derivation of data points

2008-01-16 Thread jessica . gervais
parameters ? Many thanks in advance, Jessica _____ Jessica Gervais Tel: +352- 425991-628 Mail: [EMAIL PROTECTED] Resource Centre for Environmental Technologies, Public Research Centre Henri Tudor, Technoport Schlassgoart, 66 rue de Luxembourg, P.O. BOX 14

[R] regular expression for na.strings / read.table

2008-02-12 Thread jessica . gervais
NULL NULL NULL NULL NA [9,] NULL NANULL NULL NULL NULL NULL NULL stars have deaseper, but all the rest too ! The pb comes from the fact that if a field does not contain any *, the command if(length(grep("\\*",x,value=T))==1) return NULL in

[R] blank plot----how do I make symbols appear

2012-09-28 Thread Jessica da Silva
esidual Metacarpal Length",ylab="Residual Hand Strength (Broad Dowel)", main="Males") abline(reg1,lty=1) abline(reg2,lty=2) abline(reg3,lty=3) abline(reg4,lty=4) abline(reg5,lty=6) -- *Jessica da Silva* PhD Candidate Molecular Ecology & Evolution Program Applied Biodiv

Re: [R] from table to matrix

2010-12-14 Thread JESSICA [via R]
Thank you guys I learnt a lot . But when I tried to run the library(ecodist) function, R says there is no package called "ecodist". why? __ View message @ http://r.789695.n4.nabble.com/from-table-to-matrix-tp3087972p3088184.html

Re: [R] from table to matrix

2010-12-14 Thread JESSICA [via R]
Hi Jonathan,thanks a lot! Mine is windows operating system so I will try other ways . About your question, do you want to get a matrix like this: 0 1 2 3 ...1817393 5524385 0687 0 64 0 71 0 55 ...

[R] fixed effect significance_NB mixed models_further pursuit

2009-01-07 Thread Jessica S Veysey
7 Jan 09 Hello, I am using R version 2.7.0 in a Windows XP context. I am also using the glmm.admb package (created by Dave Fournier, Hans Skaug, and Anders Nielson) to run mixed-effects negative binomial models. To the best of my knowledge and ability, I have searched and studied the R-

[R] repeated measures ANOVA - among group differences

2009-03-31 Thread Jessica L Hite/hitejl/O/VCU
I have data on the proportion of clutches experiencing different fates (e.g., 4 different sources of mortality) for 5 months . I need to test 1) if the overall proportion of these different fates is different over the entire study and 2) to see if there are monthly differences within (and among)

<    1   2   3   >