search for: lapointe

Displaying 20 results from an estimated 30 matches for "lapointe".

2006 Apr 05
2
gsub in data frame
...bla",2),2,2)) d # I want to replace the "--" by "\N" and still get a data frame. # I tried: out <-gsub("--","\\\\N",as.matrix(d)) #using as.matrix to get rid of factors out cat(out) # But I lost my data frame ### end Any idea? Regards, Pierre Lapointe ************************************************** AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}
2006 Apr 24
2
Change the language of the labels in a graph
...ench labels by changing Sys.putenv. I should get "Mai" instead of "May". Sys.putenv(LANGUAGE="fr") x <- as.Date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"), "%d%b%Y") y <-1:4 plot(x,y) Regards, Pierre Lapointe ************************************************** AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}
2007 Feb 11
2
Extract NULL column in a matrix e.g. matrix[,-NULL]
...;-matrix(runif(5^2),5,5) #remove column 3 aa[,-3] #remove no column aa[,-NULL] Error in -NULL : invalid argument to unary operator I know I could use ifelse, but it would complicate my model a lot. Is there a direct way to specify that the number of columns to remove is 0? Pierre Lapointe [[alternative HTML version deleted]]
2005 May 22
4
Calling R from R and specifying "wait until script is finished"
...file with something like: PING 1.1.1.1 -n 1 -w 60000 >NUL (to delay 60 seconds) But that would require that I know how long each of my scripts take. Is there an easier way? Something like calling R from R and specifying that the script has to be finished before continuing. Thanks Pierre Lapointe *********************************************************************************** AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}
2005 May 19
5
Arranging Plots
Dear all, I'd appreciate any hints how to arrange some plots. I have three plots. I would like to arrange them in the following order: - Plot 1 and Plot 2 should be in the upper row - Plot 3 should be in the lower row but centered in the middle. I hope the following sketch will help understanding my problem ================ | === === | || P1| |P2 | | || | | | | | === === |
2006 Jul 19
1
How would you export a 3-dimensional array to an SQL database?
Hello, How would you export a 3-dimensional array to an SQL database? a<-array(1:24, 2:4) Is there an open source DB that would be more adequate for this type of operation? Is there a way to reshape/flatten a 3-dimensional array? Regards, Pierre Lapointe ************************************************** AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}
2006 Nov 06
2
grep searching for sequence of 3 consecutive upper case letters
Hello, I need to identify all elements which have a sequence of 3 consecutive upper case letters, anywhere in the string. I tested my grep expression on this site: http://regexlib.com/RETester.aspx But when I try it in R, it does not filter anything. str <-c("AGH", "this WOUld be good", "Not Good at All") str[grep('[A-Z]{3}',str)] #looking for a
2006 Jun 09
3
sqlSave() and rownames=TRUE makes my Rgui crash
...month 05 day 11 svn rev 38024 language R version.string Version 2.3.0 Patched (2006-05-11 r38024) Pierre Lapointe ************************************************** AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}
2005 May 13
1
Lowest data level since DateX
...XP T ... 2000-12-21 2000-12-20 2000-12-29 i.e. the last date at which the stocks were trading at a lower level than the most recent closing. I know it has to do with min/max, pmin/pmax, cummin/cummax or rev(), but I can't figure it out. Any help? Regards, Pierre Lapointe Assistant Market Strategist *********************************************************************************** AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}
2005 May 25
1
Plot: Distance between tick and tick label on y-axis
...=-1.5) #does not work I understand from ?axis that padj will take its direction from the par(las). In this case, padj will move labels up and down for both x-axis and y-axis. I want my y-axis labels to be horizontal. I can I reduce the distance between y-axis ticks and labels? Regards, Pierre Lapointe Assistant Market Strategist *********************************************************************************** AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}
2005 May 26
1
Useful tip: Use Google to find R scripts
Hello, Ever wondered how people use a particular function in their programs? Use Google to find actual scripts: filetype:R boxplot will return real R scripts using the boxplot function. Regards, Pierre Lapointe Assistant Market Strategist *********************************************************************************** AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}
2005 Jun 08
1
RODBC question: problem importing series with blank cells
...wnload.php/35699 <http://www.tradebit.com/download.php/35699> And here's the code I use: library(RODBC) chan <- odbcConnectExcel("C:/book54.xls") #load data ts<- sqlFetch(chan, "Sheet1") close(chan) ts<-ts[-1,] str(ts) head(ts) tail(ts) Regards, Pierre Lapointe Assistant Market Strategist National Bank Financial *********************************************************************************** AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}
2005 Jun 14
1
Matrix stability problem
....290 0.52 However, solve(A,b) gives me a vector that is not close to the expected solution: > solve(A,b) [,1] [1,] 0.2140000 [2,] 0.2612857 # Far from 0.2 [3,] 0.5088571 Do you know any function/package in R that could help me get a result closer to the expected one? Regards, Pierre Lapointe *********************************************************************************** AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}
2006 Nov 07
1
Gregexpr - extract results with lapply
Gregexpr - extract results with lapply Hello, I need to extract sequences of three upper case letters in a string. In other words, in this string: str <-c("ABC", "this WOUld be gOOD") The result I'm looking for is ABC WOU OOD. With gregexpr, I can get the position and length of the sequences gregexpr('[A-Z]{3}',str,perl=TRUE) [[1]] [1] 1
2007 Jan 16
1
system(mysql... Does not recognize < as passing an attribute (No HTML)
Hi, This is my command line request: mysql -u root -ppassword -D quant <c:/cline.txt This line works from the command line in windows. In R, when I try to use the system function, it does not work, > system(paste('mysql -u root -ppassword -D quant <c:/cline.txt'),show.output.on.console = TRUE) ERROR 1102 (42000): Incorrect database name '<c:/cline.txt' It seems
2005 May 12
2
Batch mode problem: figure margins too large (code corrected for word wrap)
...os mingw32 system i386, mingw32 status Patched major 2 minor 1.0 year 2005 month 05 day 09 language R Be nice with me. I've been a R user for only 2 weeks. Regards, Pierre Lapointe Assistant Market Strategist National Bank Financial *********************************************************************************** AVIS DE NON-RESPONSABILITE: Ce document transmis par courrier electronique est destine uniquement a la personne ou a l'entite a qui il est adresse et peu...
2006 Jan 22
1
Solve for x in Ax=B with vectors, not matrices
...R? solve(A,B) won't work because A is not a square matrix solve(A,B) Error in solve.default(A, B) : 'A' (3 x 1) must be square I understand that I might have many solutions but note that the sum of x is 1 and all x are positive (x are weightings in % of the total). Regards, Pierre Lapointe ***************************************** AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{dropped}}
2009 May 08
1
Merging two data frames with 3 common variables makes duplicated rows
...rame is called "tmv" with 6 variables and 239 rows: > tmv[1:10,] temps nom prenom sexe dist style 1 01:59:36 Cyr Steve H 45 free 2 02:09:55 Gosselin Erick H 45 free 3 02:12:18 Desfosses Sacha H 45 free 4 02:12:23 Lapointe Sebastien H 45 free 5 02:12:52 Labrie Michel H 45 free 6 02:12:54 Leblanc Michel H 45 free 7 02:13:02 Thibeault Sylvain H 45 free 8 02:13:49 Martel Stephane H 45 free 9 02:14:03 Lavoie Jean-Philippe H 45 free 10 02:14:...
2005 May 12
1
How to make label in multi plot
Dear R-Help, As a reference about multi plot, http://finzi.psych.upenn.edu/R/Rhelp02a/archive/48725.html I want to know how can I make a label for each row. I mean like, ------------ ------------- -------------- | | | | | | Group A | plot1 | | plot 2 | | plot 3 |
2005 May 16
0
Turnpoints (pastecs): How to specify a limit on the number of tur npoints?
...platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Patched major 2 minor 1.0 year 2005 month 05 day 09 language R > Regards, Pierre Lapointe Assistant Market Strategist *********************************************************************************** AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}