[R] from table to matrix

2010-12-14 Thread JESSICA
I have a table like this: Date TIME Q A a1 A b2 A c3 B a4 B b5 B c6 C a7 C b8 C c9 I want use R language to turn it to a matrix like : a b c A 1 2 3 B 4 5 6 C 7 8 9 I am new to R , anyone can help? Than

Re: [R] help needed for strptime "000000" !

2011-02-17 Thread JESSICA
Hi thanks ! that works perfectly ! now I am wodering how to create a new table , I run the codes: x<-read.table("C:/R/DATA.txt",colClasses=c("Date","character","integer"), header=T) DateTime<-as.POSIXct(paste(x[,1],x[,2]),format="%Y-%m-%d%H%M%S") and get : "2004-11-01 23:33:11 GMT" "2004-11

[R] R help- fit distribution "fitdistr"

2016-05-25 Thread Jessica Wang
Hello, I just start using R. I want to use ??fitdistr?? to fit distribution of the data. Then how can I verify if the data really fit the distribution? Thanks [data is attached] res<-fitdistr(data$Report.delay, "Poisson") h<-hist(data$Report.delay) xfit<-floor(seq(0, 250, 50)) yfit<-dp

[R] Modelling categorical variables

2015-09-08 Thread Jessica Lavabre
problem if I have different types of predictor variable (factor and numerical)? Any help would be greatly appreciated, -- Jessica Lavabre-Micas [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] error message when downloading packages using the OS X shell

2010-02-15 Thread Jessica Joganic
em or have any ideas as to how to solve this? Greatest appreciation, Jessica -- Jessica L Joganic Graduate Student Department of Anthropology Campus Box 1114 Washington University St. Louis, MO 63130-4899 email: jljog...@artsci.wustl.edu [[al

Re: [R] error message when downloading packages using the OS X shell

2010-02-15 Thread Jessica Joganic
**file.info* <http://file.info>*(x) : argument "destdir" is missing, with no default* Let me know if that doesn't clarify my query. If this ends up being a product of my preferring the terminal over the R.app then I'll post to the Mac people and see what they have to say. Jessica *

Re: [R] error message when downloading packages using the OS X shell

2010-02-16 Thread Jessica Joganic
p then I'll post to the > Mac people and see what they have to say. > > Jessica > ** > > On Mon, Feb 15, 2010 at 9:06 PM, David Winsemius > wrote: > >> >> On Feb 15, 2010, at 8:58 PM, Jessica Joganic wrote: >> >> Hi Fellow R Users, >>> I recently

Re: [R] error message when downloading packages using the OS X shell

2010-02-16 Thread Jessica Joganic
wnload.packages() instead of install.packages() because they are both giving me the same error message but at least download.packages() gives me some response by loading a Tcl/Tk interface to select my CRAN mirror so I at least know it's working. Thank you all! Jessica On Mon, Feb 15, 2010 at 1

Re: [R] error message when downloading packages using the OS X shell

2010-02-17 Thread Jessica Joganic
Hi everyone, I've tried your various suggestions and through a combination of them I think I've managed to make it work. This latest version appears to be much more finicky than earlier ones. Thank you so much for all your help! Best to all, Jessica > On Wed, Feb 17, 2010 at 6:32

[R] Help with assigning a value based on existing numbers

2010-03-26 Thread Jessica Cathro
erence <=269) {Month <-"8-9 months"} else if (curvedata$Date.difference <=299) {Month <-"9-10 months"} else if (curvedata$Date.difference <=329) {Month <-"10-11 months"} else if (curvedata$Date.difference <=359) {Month <-"11-12 months"} else

[R] Question re: interpolation

2010-05-02 Thread Jessica Schedlbauer
, Jessica Schedlbauer __ 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, minimal, self-contained, reproducible code.

Re: [R] Question re: interpolation

2010-05-02 Thread Jessica Schedlbauer
lumns and rows, rather than just the datapoints appearing in rows. Is this possible? Thanks, Jessica From: Felipe Carrillo [mazatlanmex...@yahoo.com] Sent: Sunday, May 02, 2010 5:53 PM To: Jessica Schedlbauer; r-help@r-project.org Subject: Re: [R] Questi

[R] Help - Probability scale on an ECDF plot

2009-10-27 Thread Jessica Goin
Hello; Can anyone tell me how to set my y-axis to a probability scale on an ECDF plot? Or alternatively, how to generate a plot of percent cumulative probability against concentration? DASplusR does this and calls it a CP plot, but I would like to be able to generate this outside of DASplusR- T

[R] help writing for loop

2009-11-25 Thread Jessica Schedlbauer
so any assistance would be much appreciated. Regards, Jessica Schedlbauer __ 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 commen

[R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread Jessica Streicher
Following problem: Say you have a bunch of parameters and want to produce results for all combinations of those: height<-c("high","low") width<-c("slim","wide") then what i used to do was something like this: l<-list() for(h in height){ l[[h]]<-list() for(w in width){

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread Jessica Streicher
o On 20.12.2012, at 15:48, Chris Campbell wrote: > Dear Jessica > > Aggregate is a function that allows you to perform loops across multiple > variables. > > tempData <- data.frame(height = rnorm(20, 100, 10), >width = rnorm(20, 50, 5), >par1 = rnorm(20)) >

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-20 Thread Jessica Streicher
w, sep="/") # doSomething() > } > } > > grid <- expand.grid(height, width, stringsAsFactors=FALSE) > as.character(grid[1,]) > # [1] "high" "slim", not the [1] "1" "1" you get with stringsAsFactors=TRUE > l[[ as.c

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-21 Thread Jessica Streicher
@David : In my mind it was quite complete enough. @William: Thanks, didn't know you could do that with data frames, if i ever have to do something similar again i might try this. On 20.12.2012, at 22:39, David Winsemius wrote: > > On Dec 20, 2012, at 10:01 AM, Jessica Stre

Re: [R] apply with missing values

2012-12-25 Thread Jessica Streicher
A bit of data might be useful. Make a small example and post the data with dput(). On 24.12.2012, at 20:21, jenna wrote: > I am trying to get the means of each participants avg saccade amplitude as a > function of the group they were in (designated by "shape_"), but there are > missing values in

Re: [R] how to get a value from a list (using paste function)?

2012-12-27 Thread Jessica Streicher
Well for one, if ever someone looks at your code, cvtest[[lambda.rule]] is much easier to read and understand than eval(parse(text=paste0("cvtest$",lambda.rule))) On 27.12.2012, at 11:44, Heramb Gadgil wrote: > I am not sure why "Never ever!" > > Can you please elaborate. What are the negative

Re: [R] how to count "A", "C", "T", "G" in each row in a big data.frame?

2013-01-09 Thread Jessica Streicher
If test is the structure, will test2<-sapply(test[,-c(1:4)],function(x){table(t(x))}) to what you want? On 09.01.2013, at 15:48, jim holtman wrote: > forgot the data. this will count the characters; you can add logic > with 'table' to count groups > > > x <- > structu

Re: [R] how to count "A", "C", "T", "G" in each row in a big data.frame?

2013-01-09 Thread Jessica Streicher
Sorry, you wanted rows, i wrote for columns #rows would be: test2<-apply(test[,-c(1:4)],1,function(x){table(t(x))}) #find single values in a row sapply(test2,function(row){ allVars<-paste(names(row),collapse="") u <- unique(strsplit(allVars,"")[[1]]) parts<-sapply(names(ro

Re: [R] Code to fetch summary info from vector

2013-01-15 Thread Jessica Streicher
Maybe rle can help a little here rle(b>1) Run Length Encoding lengths: int [1:5] 3 5 5 8 3 values : logi [1:5] FALSE TRUE FALSE TRUE FALSE r<-rle(b>1) r$lengths[r$values] [1] 5 8 # started for the maximum but need to go home now, sorry. Will continue tomorrow if noone else finishes it. g

Re: [R] Changing frequency values to 1 and 0

2013-01-16 Thread Jessica Streicher
Sorry, but i don't get the problem at all. Could you provide a bit of y by using dput()? Can you provide an example of how you want the data to look like after the transformation? On 16.01.2013, at 16:42, Andrea Goijman wrote: > Dear list, > > I'm working with a large data set, where I groupe

Re: [R] exporting simulated data

2013-01-17 Thread Jessica Streicher
Rather unspecific. Basically you'd need a loop to create the sets, and a way to write them into a file. You did not specify the format of your data. You might be able to use write, write.table or write.csv and the like. You could also have a look at ?save which allows you to save any R object.

Re: [R] Help with interpolation

2013-01-22 Thread Jessica Streicher
Next time please provide sample data in a form we can easily read in (look at ?dput for example) If i understand this right: yourData<-read.table(header=T,text=" datedays rate 1996_01_02 155.74590 1996_01_02 505.67332 1996_01_02 785.60888 1996_01_0

Re: [R] Assistant

2013-01-22 Thread Jessica Streicher
You're not giving people much to work with. I googled the error, and it seems to come from the call to optim and has likely to do with bad starting parameters. That said, the documentation of fitdistr doesn't suggest it even supports "dbeta", there is only a "beta" mentioned. On 22.01.2013, at

Re: [R] summarise subsets of a vector

2013-01-23 Thread Jessica Streicher
Or maybe x<-matrix(test,nrow=10) apply(x,2,mean) On 23.01.2013, at 00:09, Wim Kreinen wrote: > Hello, > > I have vector called test. And now I wish to measure the mean of the first > 10 number, the second 10 numbers etc > How does it work? > Thanks Wim > >> dput (test) > c(0, 0, 0, 0, 0, 0, 0

Re: [R] Dot plot of character and numeric matrix

2013-01-23 Thread Jessica Streicher
As an example: chars<-c("A","A","B") numbers<-as.numeric(as.factor(chars)) #make this numerical plot(numbers,c(0.4,0.5,0.6),xaxt="n") #xaxt="n" says to not plot the x-axis axis(side=1,at=numbers,labels=chars) #make the axis with labels On 23.01.2013, at 10:16, Ng Wee Kiat Jeremy wrote: > Dea

Re: [R] summarise subsets of a vector

2013-01-23 Thread Jessica Streicher
Professor of Anthropology > Texas A&M University > College Station, TX 77843-4352 > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >> project.org] On Behalf Of Jessica Streicher >> Sent: Wednesday, January 23

Re: [R] Fastest way to compare a single value with all values in one column of a data frame

2013-01-30 Thread Jessica Streicher
If you wanted this for all values in x that are smaller, i'd use x[x$a < y$a,] <- y for just the smallest: x[intersect(which(x$a < y$a),which.min(x$a)),] <- y On 29.01.2013, at 22:11, Dimitri Liakhovitski wrote: > Hello! > > I have a large data frame x: > x<-data.frame(item=letters[1:5],a=1:

[R] Spectrum decomposition

2013-06-18 Thread Jessica Inskip
greatly appreciated. Thank you very much, Jessica _ Jessica Inskip, PhD Candidate Cardiovascular Physiology Laboratory, K8512 | Department of Biomedical Physiology and Kinesiology Simon Fraser University, University Drive, Burnaby BC, V5A 1S6

Re: [R] Can anyone help why the errors are coming and rectify it?

2012-09-17 Thread Jessica Streicher
Now i know why using else never worked for me - really, i'd consider this more of a bug than a feature of the language ;) On 17.09.2012, at 14:35, R. Michael Weylandt wrote: > And now it is easy to see why we should all the one true brace style ;-) > > Michael > > On Mon, Sep 17, 2012 at 12:29

Re: [R] Why x[1] is not getting substituted?

2012-09-18 Thread Jessica Streicher
> paste("Trial and",x[1],"sheet") [1] "Trial and a sheet" > cat("Trial and",x[1],"sheet") Trial and a sheet On 18.09.2012, at 11:40, Sri krishna Devarayalu Balanagu wrote: > Suppose I want the output as "Trial and a sheet" without quotes > x=c("a", "b", "c") > print("Trial and x[1] sheet") > >

Re: [R] Simple - Finding vector in a vector

2012-10-08 Thread Jessica Streicher
> x<-c(NA , 1 ,NA, 1 , 1 , 1 , 1 , 1 ,1 ,NA , 1) > embed(x,3) [,1] [,2] [,3] [1,] NA1 NA [2,]1 NA1 [3,]11 NA [4,]111 [5,]111 [6,]111 [7,]111 [8,] NA11 [9,]1 NA1 > which(rowSums(embed(x,

[R] other way of making a table?

2012-10-09 Thread Jessica Streicher
I'm making tables for prediction results of classifiers (2 classes) that show the usual numbers, true positives, false positives, etc I used the command table(predictedLabels,realLabels) to make those. I just had a case though ,where one of the label vectors had only one class in it. This wil

Re: [R] other way of making a table?

2012-10-09 Thread Jessica Streicher
--- > Sent from my phone. Please excuse my brevity. > > Jessica Streicher wrote: > >> I'm making tables for prediction results of classifiers (2 classes) >> that show the usual numbers, true positives, false positives, etc >> >> I used the c

Re: [R] other way of making a table?

2012-10-09 Thread Jessica Streicher
ying > Research Engineer (Solar/BatteriesO.O#. #.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. &g

[R] append for .Rdata?

2012-10-09 Thread Jessica Streicher
Can i somehow append objects to an .Rdata file? I didn't see an option for it in the save() method. dump() won't work since i have s4 objects in there. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] r-plot help-it prints outside frame

2012-10-10 Thread Jessica Streicher
You could set xlim and slim when using plot() plot(vector,xlab="Period",ylab="Values",xlim=range(0,length(vector)+1),ylim=range(vector,est_vector,forecast)) i think - you forgot to provide data for the vectors :) On 10.10.2012, at 11:31, piranha piranha wrote: > Hello, > > i have been doing br

[R] Strange email i'm getting whenever i post to the list

2012-10-10 Thread Jessica Streicher
From: 발송실패알림 Subject:[발송실패 안내] envy721c@naver.cobSDsnLzroZwg66mU7J287J20IOyghOyGoeuQmOyngCDrqrvtlojsig==teuLiOuLpC4= The only plain english in the message is that the mail was denied by the receiver Anyone else getting this? __ R-he

Re: [R] Repeating a series of commands

2012-10-12 Thread Jessica Streicher
This is pretty confusing writeup, but if you have iterations, then yes, you need a loop or a recursion. A loop is probably easier, take a look at ?"for" or ?apply for this. there are several derivates of apply for example, say your outputs are what the code below gives you for each file,

Re: [R] median between matrix column

2012-10-15 Thread Jessica Streicher
m<-matrix(1:10,ncol=5) > m [,1] [,2] [,3] [,4] [,5] [1,]13579 [2,]2468 10 apply(m,2,function(x){median(x,m[,5])}) [1] 5.5 6.5 7.5 8.5 9.5 Though i am not 100% sure thats what you mean. But the median of each row between two columns kind of doesn't make

Re: [R] median between matrix column

2012-10-15 Thread Jessica Streicher
Actually i just saw that i copied the wrong code apply(m,2,function(x){median(c(x,m[,5]))}) it should be. Sorry if this confused anyone. On 15.10.2012, at 15:32, eliza botto wrote: > > Dear Arun and Jessica, > thnx for your reply. it realy worked out. > regards > eliza > &

Re: [R] For loop with i and j and multiple if statements... help!

2012-10-18 Thread Jessica Streicher
- Why are you making a matrix for lookzone if it is ever only one number? - changing a variable used for iteration is bad practice (input in this case) though you aren't changing the rows i guess. - There are too many x and too few y in those ifs. Plus this is shorter: test<-apply(input,

Re: [R] append for .Rdata?

2012-10-22 Thread Jessica Streicher
riment so its only around once. I'll take a look at the lazy-load stuff too, thanks. On 10.10.2012, at 19:47, J Toll wrote: > On Tue, Oct 9, 2012 at 10:35 AM, Jessica Streicher > wrote: >> Can i somehow append objects to an .Rdata file? >> >> I didn't see an o

Re: [R] Memory issue with svm modeling in R

2012-10-22 Thread Jessica Streicher
Hello Vignesh, we did not get any attachments, maybe you could upload them somewhere? On 19.10.2012, at 09:46, Vignesh Prajapati wrote: > As I found the memory problem with local machine/micro instance(amazon) for > building SVM model in R on large dataset(2,01,478 rows with 11 variables), > the

Re: [R] Memory issue with svm modeling in R

2012-10-23 Thread Jessica Streicher
t have any experience with either Rstudio or Amazon whatever. The local system seems to be windows so the above might work, don't know the other, you might need to change the memory limit at startup of the console if its not. On 22.10.2012, at 10:18, Vignesh Prajapati wrote: > Hello Jessic

Re: [R] newbie: embeding seq in a list

2012-10-30 Thread Jessica Streicher
s <- seq(0.8, 1.2, by = 0.1) as.list(s) to get the first type of list from the sequence. On 30.10.2012, at 16:51, ONKELINX, Thierry wrote: > You first example is a list of 5 items, each item is a number > The second example is a list with one item: a vector with 5 elements. > > You'll need c()

Re: [R] help - extract data using column names

2012-10-30 Thread Jessica Streicher
A look at the tutorial might help here, but anyway: Say you have that dataframe down there with the name myData (you should use dput() to give us the data btw), then you can subset that by using myData[rows,columns], where left of the comma you define which rows you want, and right of the comma

[R] lm and 450k data

2014-07-12 Thread Jessica Timms
se or if you need any more information? Any help or guidance would be massively appreciated. Best wishes Jessica Timms [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

[R] Model for lm keeps producing an error

2014-07-17 Thread Jessica Timms
Hi, I still seem to be getting errors from trying to run my altered R script, any advice? Thanks Jess Model1A = function(meth_matrix,exposure, X1, X2, X3, batch) { + + mod = lm(methcol ~ exposure+X1+X2+X3+batch, data = meth_matrix) + + + res=coef(summary(mod))[2,] + + + } > > > ##Run

Re: [R] Mean Help

2012-10-31 Thread Jessica Streicher
please provide a bit of the dataframe in the future using the dput() function > x<-data.frame(height=1:10, > color=sample(c("blue","green","brown"),10,replace=T)) > x height color 1 1 blue 2 2 green 3 3 blue 4 4 brown 5 5 blue 6 6 brown 7 7 green 8

Re: [R] Select the last rows of when specific conditions are met.

2012-11-01 Thread Jessica Streicher
I really don't understand what you want to achieve and how your data presents itself. You have several combinations of trial/subject which are unique? There is a variable for each such combination that you want to test against (tt)? In addition you have data on each such combination (several set

Re: [R] Java Exception error while reading large data in R from DB using RJDBC.

2012-11-01 Thread Jessica Streicher
I didn't have the same exception yet, but please make sure you have a stable connection (avoid wlan). I personally ran out of memory very often and had to make several queries, combining the results in R instead. This is probably not the best thing to do, but worked for me to fetch large amount

Re: [R] Java Exception error while reading large data in R from DB using RJDBC.

2012-11-01 Thread Jessica Streicher
Actually forget that loop, that was old code. Now remember i had to actually split the one query down into several queries to get everything. On 01.11.2012, at 18:38, Jessica Streicher wrote: > I didn't have the same exception yet, but please make sure you have a stable > connec

Re: [R] Error message

2012-11-05 Thread Jessica Streicher
It depends a bit on your setup, but you could have a look at ?memory.size or ?memory.limit and see if any of that helps Jessi On 05.11.2012, at 12:49, Haris Rhrlp wrote: > Dear R users, > > I have this problem with memory i guess > > AA<-array(rep(0,96096000),dim=c(16,5,3003,400)) > Error

Re: [R] Problem compiling Rnw file

2012-11-05 Thread Jessica Streicher
I'll second the full path option. Just create a variable path_to_data and concatenate it with the names of any files you need in that directory. You could also try to use relative paths if the data is "nearby" and is likely to not change that position. e.g. if the data was in '/home/r/Documents

Re: [R] Filling matrix elements with a function

2012-11-06 Thread Jessica Streicher
Not that i really understand what that shall do, but.. why do you define 2 functions that do exactly the same? why do you want to make a matrix of functions instead of a matrix with the results of functions? On 06.11.2012, at 05:11, Aimee Kopolow wrote: > Hi all, > > > I have a matrix simulat

Re: [R] how Can make function for selecting the products

2012-11-06 Thread Jessica Streicher
If i understand this correctly, what you want to use is a vector or a list as a parameter to that function. getdata<-function(letterVec){ ... query<-paste("SELECT *FROM myfile1 where MODEL in", sqlListFromVector(letterVec)) ... } sqlListFromVector<-function(v){

Re: [R] Can't see what i did wrong..

2012-11-15 Thread Jessica Streicher
Its not scaling.. so.. I guess i'll stay severely frustrated, and yes i know this is probably not enough information for anyone to help. Still, talking helps ;) On 15.11.2012, at 15:15, Jessica Streicher wrote: > with > > pred.pca<-predict(splits[[i]]$pca,trainingData

[R] Can't see what i did wrong..

2012-11-15 Thread Jessica Streicher
with pred.pca<-predict(splits[[i]]$pca,trainingData@samples)[,1:nPCs] dframe<-as.data.frame(cbind(pred.pca,class=isExplosive(trainingData,2))); results[[i]]$classifier<-ksvm(class~.,data=dframe,scaled=T,kernel="polydot",type="C-svc", C=C,kpar=list(degree=degree,scale=scale,offset=

Re: [R] Can't see what i did wrong..

2012-11-15 Thread Jessica Streicher
Now i let it run for one specific set and got the same bad result, then i deactivated the probabilities and got a good result, then i activated the probabilities again and got a good result .. huh??? On 15.11.2012, at 15:32, Jessica Streicher wrote: > Its not scaling.. so.. > > I g

Re: [R] Can't see what i did wrong..

2012-11-15 Thread Jessica Streicher
70 [12,] 0.291356830 [13,] 0.291341980 [14,] 0.291324840 [15,] 0.291326520 Now that i managed to get me (and you) a closer look - seems like class labels switched maybe? pred.svm[,2] is named "1", but seems to have the probability to be class 0 in it. This does not al

Re: [R] Can't see what i did wrong..

2012-11-15 Thread Jessica Streicher
Guess it has something t do with the values in prob.model. The classifiers with bad predicitons have positive values and the ones with good predictions have negative values. On 15.11.2012, at 17:18, Jessica Streicher wrote: > I'll try .. lets see > > dput(dframe) > struc

[R] polynomial svms and in-sample error

2012-11-16 Thread Jessica Streicher
Hi again! This might be more of a statistical question, but anyway: If i train several support vector machines with different degrees of polynomials, and as result, get that higher degrees not only have a higher test error, but also a higher in-sample error, why is that? I would assume i shoul

Re: [R] Can't see what i did wrong..

2012-11-16 Thread Jessica Streicher
Fixed it by using e1071 instead.. On 15.11.2012, at 17:43, Jessica Streicher wrote: > Guess it has something t do with the values in prob.model. The classifiers > with bad predicitons have positive values and the ones with good predictions > have negative values. > > On 15.11

Re: [R] polynomial svms and in-sample error

2012-11-16 Thread Jessica Streicher
wrong with the asumption, that if i get those probabilities, that 0.5 is the threshold to get "the default" result? On 16.11.2012, at 16:32, Jessica Streicher wrote: > Hi again! > > This might be more of a statistical question, but anyway: > If i train several support vector m

Re: [R] Deviation standard & variance

2012-11-20 Thread Jessica Streicher
At least for me this is not enough information to go on Elli. What exactly is the problem? Can you post example data? On 20.11.2012, at 18:39, Elli wrote: > How I can plot the standard deviation and variance separately or is there a > graph where I can show the two? > > > > -- > View this mes

Re: [R] Deviation standard & variance

2012-11-20 Thread Jessica Streicher
rly visible in just one plot with hundreds of variables. some kind of distribution maybe, like how likely some value of variance is? do you have an example of what it should look like? Whats the purpose of plotting it? On 20.11.2012, at 19:22, Jessica Streicher wrote: > At least for me this is

Re: [R] Deviation standard & variance

2012-11-20 Thread Jessica Streicher
Anyway, need to go home. If you really only want to plot the values of all variables, and its for some reason not important what value belongs to what exact variable: plot(variances,ylim=range(variances,sdevs)) # black circles points(sdevs,col=2,pch=3) #red crosses On 20.11.2012, at 19:32, Elli

[R] Help with glht function and binary data!

2012-11-20 Thread Jessica McLachlan
, the glht function yields the expected results without problems. Can anyone help? Is the glht function not appropriate for binary data? Or have I got something wrong? Thank you! Jessica My data and code are below. # My data: Nest<

Re: [R] For loop

2012-11-30 Thread Jessica Streicher
Hello Bikek, please use dput() next time to provide the data, its easier to use that. also: looking at the data provided, how would you want to decide which value of the non-unique times to retain? Just take the first one? They aren't all the same. On 30.11.2012, at 16:59, bibek sharma wrote:

Re: [R] For loop

2012-11-30 Thread Jessica Streicher
TRUE mtest[!duplicated(mtest[,1:2]),] id time value [1,] 13 1 [2,] 12 3 [3,] 11 4 [4,] 21 5 [5,] 23 6 On 30.11.2012, at 17:15, Jessica Streicher wrote: > Hello Bikek, > > please use dput() next time to provide the data, its easier to

Re: [R] can't integrate in loop

2012-11-30 Thread Jessica Streicher
Thats not a very precise question. I'll try anyway.. - if you use c, you need to separate the values by commas - i think you mean seq(1,100,0.1), otherwise x only has one value - function sen is not defined - If you call int(1), upper will be 1, not x[i] - why are you making a function and calling

Re: [R] Excluding all missing values with dcast ("reshape2" package)

2012-12-03 Thread Jessica Streicher
This is not a reproducible example ;) anyways, dcast has an attribute: drop should missing combinations dropped or kept? does that not do what you want? On 03.12.2012, at 16:07, michael.laviole...@dhhs.state.nh.us wrote: > > Hello--I'm doing a simple crosstab using dcast: > > rawfreq <- d

[R] Non-quadratic plots

2012-12-03 Thread Jessica Streicher
ll if necessary. thanks, 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, minimal, self-contained, reproducible code.

Re: [R] Non-quadratic plots

2012-12-03 Thread Jessica Streicher
Nevermind, found i can at least do it with pdf() and consorts, so i'll get it right in my images, and thats the main point. On 03.12.2012, at 18:06, Jessica Streicher wrote: > I'd like to make plots that do not have the quadratic layout, like having a > plot that is twice as wi

Re: [R] VarimpAUC in Party Package

2012-12-12 Thread Jessica Streicher
You need to install the party package and then load the package before you can use its functions: install.packages("party") library(party) On 11.12.2012, at 16:56, Peterson, Kim - DNR wrote: > Greetings! I'm trying to use function varimpAUC in the party package > (party_1.0-3 released Septemb

Re: [R] Hello R User

2012-12-14 Thread Jessica Streicher
dataset<-data.frame(id=c(1,1,2,3,3,3),time=c(3,5,1,2,4,6)) dataset id time 1 13 2 15 3 21 4 32 5 34 6 36 ids<-unique(dataset$id) for(id in ids){ + dataset$time[dataset$id==id]<-c(0,diff(dataset$time[dataset$id==id])) + } dataset id time 1 10 2 1

Re: [R] Splitting up of a dataframe according to the type of variables

2012-12-17 Thread Jessica Streicher
f<-factor(c(1,1,2,3)) n<-c(1,1,2,3) df<-data.frame(f,n) sapply(df,is.factor) f n TRUE FALSE df[sapply(df,is.factor)] f 1 1 2 1 3 2 4 3 df[sapply(df,is.numeric)] n 1 1 2 1 3 2 4 3 something like that? On 17.12.2012, at 11:02, Martin Spindler wrote: > Dear R users, > > I have a dataf

[R] HEGY.test, error "Mypi not found"

2010-06-25 Thread Jessica Oettel
7/library/uroot/html/HEGY.test.html it works, but for my time series it doesn't (giving names to the columns and rows did not help either...). Thanks for your help. Jessica __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] treatment of factors and errors in ridge() function with coxph

2011-04-27 Thread Jessica Myers
ariates I use. Any help with these problems would be greatly appreciated! Thanks, Jessica Myers Instructor in Medicine Division of Pharmacoepidemiology Brigham and Women's Hospital The information in this e-mail is intended only for the ...{{dropped:7}} _

[R] help: Using hotelling for a confidence region for PCA scores

2011-05-16 Thread Jessica Minkue
Hello everyone. In my last post I did not explained my problem quite well. I made a principal component analysis and took the 2 first principal components. I made ​​a chart of my points based on the score of the 2 PC. I would like to add on this graph a 95% confidence region. To do this

[R] Observation in a confidence ellipse

2011-05-28 Thread Jessica Minkue
the confidence ellipse. But I have no clue how to do it Can anyone help me? Best regards Jessica [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] GLS model - diagnostic plots

2011-06-11 Thread Craig, Jessica
I am applying a GLS model and would like to look at diagnostic plots of influence. The function (plot(model)) that works for linear models does not seem to function for GLS models. Is there a reason for this? Or is different code required? Sorry if it's a very basic question, but thanks for you

[R] Issue with assigning text to matrix

2010-06-01 Thread Jessica Queree
My issue relates to adding text to a matrix and finding that the text is converted to a number. This is the section of code I'm having trouble with: # First, I load in a list of names from a .csv file to 'names' names <- read.csv(file("Names.csv")) # Then I define a matrix which will be p

Re: [R] Issue with assigning text to matrix

2010-06-09 Thread Jessica Queree
Thanks for all your help. I found adding the 'stringsAsFactors' condition solved the problem. On 1 June 2010 17:09, Joris Meys wrote: > Hi Jessica, > > this tells me that your text is saved as a factor. > Try : > names <- read.csv(file="Names.csv",st

[R] passing a vector of variable names to the ... pairlist function argument

2011-04-21 Thread Jessica Myers
reted by the function, rather than the object names. For example, x1 <- 1:4 x2 <- 2:5 x3 <- 3:6 xs <- c("x1", "x2", "x3") If I wanted to cbind(x1, x2, x3) without typing this out, how would I do it? Thanks very much! Jessica Myers Instructor in Me

Re: [R] passing a vector of variable names to the ... pairlist function argument

2011-04-21 Thread Jessica Myers
Thanks - your last suggestion does seem to work with the ridge function, but the names of the objects get lost in the process. Is there a way to keep the object names with get? Thanks, Jessica Myers On Apr 21, 2011, at 11:00 AM, Uwe Ligges wrote: On 21.04.2011 16:03, Jessica Myers

Re: [R] How to Read command line parameters in Sweave?

2012-06-06 Thread Jessica Streicher
http://stackoverflow.com/questions/9399459/r-sweave-arguments google is your friend ;) Am 06.06.2012 um 15:29 schrieb manish gupta: > I don't want to use it as manual. I want my software to automated. > > On Wed, Jun 6, 2012 at 9:13 PM, Yihao Lu wrote: > >> you use this list as your manual?

Re: [R] How to Read command line parameters in Sweave?

2012-06-08 Thread Jessica Streicher
Well, i have my System not set up to run from command line, so i can't help you there, but the scipt solution id<-1 Sweave('test.Rnw') #printing out the id works fine for me. There were several other suggestions in the answers given in the link. Am 07.06.2012 um 09:30 schrieb Manish Gupta: >

Re: [R] How to Read command line parameters in Sweave?

2012-06-08 Thread Jessica Streicher
c(argList[2])) print(PatientId) @ results in: \begin{Schunk} \begin{Soutput} [1] "PatientId=2" \end{Soutput} \begin{Soutput} [1] "PatientId" "2" \end{Soutput} \begin{Soutput} [1] 2 \end{Soutput} \end{Schunk} Am 08.06.2012 um 11:00 schrieb Jessica Streicher: >

Re: [R] eclipse cran r

2012-06-12 Thread Jessica Streicher
http://www.walware.de/goto/statet eclipse plugin Having tried both sweave and knitr: Knitr is easier to set up by far, but i don't like its documentation, so i stayed with Sweave. I needed a few days to get it running properly though, and it needed workarounds. Am 12.06.2012 um 00:32 schrieb Tr

[R] plot.prcomp() call/eval

2012-06-28 Thread Jessica Streicher
Hi! I am getting a lot of numbers in the background of the pca screeplots if i use call("plot") and eval(somecall). Til now, creating the calls and plotting later on this way worked fine. Example: pcaI<-prcomp(iris[,1:4]) plot(pcaI) x<-call("plot",pcaI) eval(x) Anyone got an idea how i can

Re: [R] plot.prcomp() call/eval

2012-06-28 Thread Jessica Streicher
Thanks Josh, that soggy sandwhich saves me a LOT of code by the way, I'll keep it for the time being ;) greetings Jessica On 28.06.2012, at 17:15, Joshua Wiley wrote: > Hi Jessica, > > x <- call("plot", quote(pcaI)) > eval(x) > > that said, I suspect y

Re: [R] plot.prcomp() call/eval

2012-06-29 Thread Jessica Streicher
ts will be saved to files. I'm saving several lines of latex and several lines when creating the file each time i use it, and i use it often. On 28.06.2012, at 17:47, Joshua Wiley wrote: > On Thu, Jun 28, 2012 at 8:27 AM, Jessica Streicher > wrote: >> Thanks Josh, >> &

Re: [R] plot.prcomp() call/eval

2012-06-29 Thread Jessica Streicher
On 29.06.2012, at 10:05, Jessica Streicher wrote: > Well, i built the methods to create a bit of latex and plot to pdf files for > figures, especially figures with subfloats, which weren't possible with > sweave (at least i didn't find a way). So i only have to make the cal

Re: [R] plot.prcomp() call/eval

2012-06-29 Thread Jessica Streicher
Hm.. i attached a file with the code, but it doesn't show up somehow.. On 29.06.2012, at 10:13, Jessica Streicher wrote: > > > On 29.06.2012, at 10:05, Jessica Streicher wrote: > >> Well, i built the methods to create a bit of latex and plot to pdf files for >>

Re: [R] plot.prcomp() call/eval

2012-07-02 Thread Jessica Streicher
Then lets go with this: http://pastebin.com/6dtGCrpA as an example of what i do. If you've got a better idea lets hear it :) On 29.06.2012, at 17:30, Joshua Wiley wrote: > On Fri, Jun 29, 2012 at 1:20 AM, Jessica Streicher > wrote: >> Hm.. i attached a file with the code, bu

  1   2   3   >